]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/node.c
sched: fine-tune SD_MC_INIT
[linux-2.6-omap-h63xx.git] / drivers / base / node.c
index fc7e9bf0cdbcd0294119ca4d21b6b6a5ed8fe025..f5207090885a8fc80f28b670b95a6fa13ca87418 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/nodemask.h>
 #include <linux/cpu.h>
 #include <linux/device.h>
+#include <linux/swap.h>
 
 static struct sysdev_class node_class = {
        .name = "node",
@@ -70,6 +71,10 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
                       "Node %d Inactive(anon): %8lu kB\n"
                       "Node %d Active(file):   %8lu kB\n"
                       "Node %d Inactive(file): %8lu kB\n"
+#ifdef CONFIG_UNEVICTABLE_LRU
+                      "Node %d Unevictable:    %8lu kB\n"
+                      "Node %d Mlocked:        %8lu kB\n"
+#endif
 #ifdef CONFIG_HIGHMEM
                       "Node %d HighTotal:      %8lu kB\n"
                       "Node %d HighFree:       %8lu kB\n"
@@ -99,6 +104,10 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
                       nid, K(node_page_state(nid, NR_INACTIVE_ANON)),
                       nid, K(node_page_state(nid, NR_ACTIVE_FILE)),
                       nid, K(node_page_state(nid, NR_INACTIVE_FILE)),
+#ifdef CONFIG_UNEVICTABLE_LRU
+                      nid, K(node_page_state(nid, NR_UNEVICTABLE)),
+                      nid, K(node_page_state(nid, NR_MLOCK)),
+#endif
 #ifdef CONFIG_HIGHMEM
                       nid, K(i.totalhigh),
                       nid, K(i.freehigh),
@@ -183,6 +192,8 @@ int register_node(struct node *node, int num, struct node *parent)
                sysdev_create_file(&node->sysdev, &attr_meminfo);
                sysdev_create_file(&node->sysdev, &attr_numastat);
                sysdev_create_file(&node->sysdev, &attr_distance);
+
+               scan_unevictable_register_node(node);
        }
        return error;
 }
@@ -202,6 +213,8 @@ void unregister_node(struct node *node)
        sysdev_remove_file(&node->sysdev, &attr_numastat);
        sysdev_remove_file(&node->sysdev, &attr_distance);
 
+       scan_unevictable_unregister_node(node);
+
        sysdev_unregister(&node->sysdev);
 }