]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm: switch node meminfo Active & Inactive pages to Kbytes
authorJohn Blackwood <john.blackwood@ccur.com>
Fri, 4 Jul 2008 17:00:05 +0000 (10:00 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Jul 2008 16:14:05 +0000 (09:14 -0700)
commit 2d5c1be8870383622809c25935fff00d2630c7a5 upstream

There is a bug in the output of /sys/devices/system/node/node[n]/meminfo
where the Active and Inactive values are in pages instead of Kbytes.

Looks like this occurred back in 2.6.20 when the code was changed
over to use node_page_state().

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/node.c

index e59861f18ce55616981e7ca9fbc5ad2a6698f04f..8bbd21de5950c6e676592bc2a3755733c1c30856 100644 (file)
@@ -70,8 +70,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       nid, K(i.totalram),
                       nid, K(i.freeram),
                       nid, K(i.totalram - i.freeram),
-                      nid, node_page_state(nid, NR_ACTIVE),
-                      nid, node_page_state(nid, NR_INACTIVE),
+                      nid, K(node_page_state(nid, NR_ACTIVE)),
+                      nid, K(node_page_state(nid, NR_INACTIVE)),
 #ifdef CONFIG_HIGHMEM
                       nid, K(i.totalhigh),
                       nid, K(i.freehigh),