aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/node.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 2bdd8a94ec94..2872e86837b2 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -66,8 +66,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
66 struct sysinfo i; 66 struct sysinfo i;
67 67
68 si_meminfo_node(&i, nid); 68 si_meminfo_node(&i, nid);
69 69 n = sprintf(buf,
70 n = sprintf(buf, "\n"
71 "Node %d MemTotal: %8lu kB\n" 70 "Node %d MemTotal: %8lu kB\n"
72 "Node %d MemFree: %8lu kB\n" 71 "Node %d MemFree: %8lu kB\n"
73 "Node %d MemUsed: %8lu kB\n" 72 "Node %d MemUsed: %8lu kB\n"
@@ -78,13 +77,33 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
78 "Node %d Active(file): %8lu kB\n" 77 "Node %d Active(file): %8lu kB\n"
79 "Node %d Inactive(file): %8lu kB\n" 78 "Node %d Inactive(file): %8lu kB\n"
80 "Node %d Unevictable: %8lu kB\n" 79 "Node %d Unevictable: %8lu kB\n"
81 "Node %d Mlocked: %8lu kB\n" 80 "Node %d Mlocked: %8lu kB\n",
81 nid, K(i.totalram),
82 nid, K(i.freeram),
83 nid, K(i.totalram - i.freeram),
84 nid, K(node_page_state(nid, NR_ACTIVE_ANON) +
85 node_page_state(nid, NR_ACTIVE_FILE)),
86 nid, K(node_page_state(nid, NR_INACTIVE_ANON) +
87 node_page_state(nid, NR_INACTIVE_FILE)),
88 nid, K(node_page_state(nid, NR_ACTIVE_ANON)),
89 nid, K(node_page_state(nid, NR_INACTIVE_ANON)),
90 nid, K(node_page_state(nid, NR_ACTIVE_FILE)),
91 nid, K(node_page_state(nid, NR_INACTIVE_FILE)),
92 nid, K(node_page_state(nid, NR_UNEVICTABLE)),
93 nid, K(node_page_state(nid, NR_MLOCK)));
94
82#ifdef CONFIG_HIGHMEM 95#ifdef CONFIG_HIGHMEM
96 n += sprintf(buf + n,
83 "Node %d HighTotal: %8lu kB\n" 97 "Node %d HighTotal: %8lu kB\n"
84 "Node %d HighFree: %8lu kB\n" 98 "Node %d HighFree: %8lu kB\n"
85 "Node %d LowTotal: %8lu kB\n" 99 "Node %d LowTotal: %8lu kB\n"
86 "Node %d LowFree: %8lu kB\n" 100 "Node %d LowFree: %8lu kB\n",
101 nid, K(i.totalhigh),
102 nid, K(i.freehigh),
103 nid, K(i.totalram - i.totalhigh),
104 nid, K(i.freeram - i.freehigh));
87#endif 105#endif
106 n += sprintf(buf + n,
88 "Node %d Dirty: %8lu kB\n" 107 "Node %d Dirty: %8lu kB\n"
89 "Node %d Writeback: %8lu kB\n" 108 "Node %d Writeback: %8lu kB\n"
90 "Node %d FilePages: %8lu kB\n" 109 "Node %d FilePages: %8lu kB\n"
@@ -99,25 +118,6 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
99 "Node %d Slab: %8lu kB\n" 118 "Node %d Slab: %8lu kB\n"
100 "Node %d SReclaimable: %8lu kB\n" 119 "Node %d SReclaimable: %8lu kB\n"
101 "Node %d SUnreclaim: %8lu kB\n", 120 "Node %d SUnreclaim: %8lu kB\n",
102 nid, K(i.totalram),
103 nid, K(i.freeram),
104 nid, K(i.totalram - i.freeram),
105 nid, K(node_page_state(nid, NR_ACTIVE_ANON) +
106 node_page_state(nid, NR_ACTIVE_FILE)),
107 nid, K(node_page_state(nid, NR_INACTIVE_ANON) +
108 node_page_state(nid, NR_INACTIVE_FILE)),
109 nid, K(node_page_state(nid, NR_ACTIVE_ANON)),
110 nid, K(node_page_state(nid, NR_INACTIVE_ANON)),
111 nid, K(node_page_state(nid, NR_ACTIVE_FILE)),
112 nid, K(node_page_state(nid, NR_INACTIVE_FILE)),
113 nid, K(node_page_state(nid, NR_UNEVICTABLE)),
114 nid, K(node_page_state(nid, NR_MLOCK)),
115#ifdef CONFIG_HIGHMEM
116 nid, K(i.totalhigh),
117 nid, K(i.freehigh),
118 nid, K(i.totalram - i.totalhigh),
119 nid, K(i.freeram - i.freehigh),
120#endif
121 nid, K(node_page_state(nid, NR_FILE_DIRTY)), 121 nid, K(node_page_state(nid, NR_FILE_DIRTY)),
122 nid, K(node_page_state(nid, NR_WRITEBACK)), 122 nid, K(node_page_state(nid, NR_WRITEBACK)),
123 nid, K(node_page_state(nid, NR_FILE_PAGES)), 123 nid, K(node_page_state(nid, NR_FILE_PAGES)),