diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-05-26 07:51:31 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-26 07:51:35 -0400 |
commit | de66ee979d0ea45171cc2501750e9f9f22f5a690 (patch) | |
tree | 5ab1a5c6b596b9b786902fb380274e1e1f4ceb13 /drivers/base/node.c | |
parent | 916f676f8dc016103f983c7ec54c18ecdbb6e349 (diff) | |
parent | 4db70f73e56961b9bcdfd0c36c62847a18b7dbb5 (diff) |
Merge branch 'linus' into x86/urgent
Merge reason: we want to queue up a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r-- | drivers/base/node.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index b3b72d64e805..793f796c4da3 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/memory.h> | 9 | #include <linux/memory.h> |
10 | #include <linux/vmstat.h> | ||
10 | #include <linux/node.h> | 11 | #include <linux/node.h> |
11 | #include <linux/hugetlb.h> | 12 | #include <linux/hugetlb.h> |
12 | #include <linux/compaction.h> | 13 | #include <linux/compaction.h> |
@@ -179,11 +180,14 @@ static ssize_t node_read_vmstat(struct sys_device *dev, | |||
179 | struct sysdev_attribute *attr, char *buf) | 180 | struct sysdev_attribute *attr, char *buf) |
180 | { | 181 | { |
181 | int nid = dev->id; | 182 | int nid = dev->id; |
182 | return sprintf(buf, | 183 | int i; |
183 | "nr_written %lu\n" | 184 | int n = 0; |
184 | "nr_dirtied %lu\n", | 185 | |
185 | node_page_state(nid, NR_WRITTEN), | 186 | for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) |
186 | node_page_state(nid, NR_DIRTIED)); | 187 | n += sprintf(buf+n, "%s %lu\n", vmstat_text[i], |
188 | node_page_state(nid, i)); | ||
189 | |||
190 | return n; | ||
187 | } | 191 | } |
188 | static SYSDEV_ATTR(vmstat, S_IRUGO, node_read_vmstat, NULL); | 192 | static SYSDEV_ATTR(vmstat, S_IRUGO, node_read_vmstat, NULL); |
189 | 193 | ||