[PATCH] zoned vm counters: conversion of nr_bounce to per zone counter
[powerpc.git] / drivers / base / node.c
index c3bf051..772eada 100644 (file)
@@ -40,22 +40,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
        int n;
        int nid = dev->id;
        struct sysinfo i;
-       struct page_state ps;
        unsigned long inactive;
        unsigned long active;
        unsigned long free;
 
        si_meminfo_node(&i, nid);
-       get_page_state_node(&ps, nid);
        __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid));
 
-       /* Check for negative values in these approximate counters */
-       if ((long)ps.nr_dirty < 0)
-               ps.nr_dirty = 0;
-       if ((long)ps.nr_writeback < 0)
-               ps.nr_writeback = 0;
-       if ((long)ps.nr_slab < 0)
-               ps.nr_slab = 0;
 
        n = sprintf(buf, "\n"
                       "Node %d MemTotal:     %8lu kB\n"
@@ -72,6 +63,9 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       "Node %d FilePages:    %8lu kB\n"
                       "Node %d Mapped:       %8lu kB\n"
                       "Node %d AnonPages:    %8lu kB\n"
+                      "Node %d PageTables:   %8lu kB\n"
+                      "Node %d NFS Unstable: %8lu kB\n"
+                      "Node %d Bounce:       %8lu kB\n"
                       "Node %d Slab:         %8lu kB\n",
                       nid, K(i.totalram),
                       nid, K(i.freeram),
@@ -82,12 +76,15 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       nid, K(i.freehigh),
                       nid, K(i.totalram - i.totalhigh),
                       nid, K(i.freeram - i.freehigh),
-                      nid, K(ps.nr_dirty),
-                      nid, K(ps.nr_writeback),
+                      nid, K(node_page_state(nid, NR_FILE_DIRTY)),
+                      nid, K(node_page_state(nid, NR_WRITEBACK)),
                       nid, K(node_page_state(nid, NR_FILE_PAGES)),
                       nid, K(node_page_state(nid, NR_FILE_MAPPED)),
                       nid, K(node_page_state(nid, NR_ANON_PAGES)),
-                      nid, K(ps.nr_slab));
+                      nid, K(node_page_state(nid, NR_PAGETABLE)),
+                      nid, K(node_page_state(nid, NR_UNSTABLE_NFS)),
+                      nid, K(node_page_state(nid, NR_BOUNCE)),
+                      nid, K(node_page_state(nid, NR_SLAB)));
        n += hugetlb_report_node_meminfo(nid, buf + n);
        return n;
 }