]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/base/node.c
[PATCH] zoned vm counters: conversion of nr_unstable to per zone counter
[mirror_ubuntu-artful-kernel.git] / drivers / base / node.c
index 6fed520d00f4c8ed5d1ceac712070f4ccfd3f3da..b73d869c9d48e97b130cf35251175c94fc50e3f6 100644 (file)
@@ -40,18 +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_writeback < 0)
-               ps.nr_writeback = 0;
 
        n = sprintf(buf, "\n"
                       "Node %d MemTotal:     %8lu kB\n"
@@ -69,6 +64,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       "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 Slab:         %8lu kB\n",
                       nid, K(i.totalram),
                       nid, K(i.freeram),
@@ -80,11 +76,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       nid, K(i.totalram - i.totalhigh),
                       nid, K(i.freeram - i.freehigh),
                       nid, K(node_page_state(nid, NR_FILE_DIRTY)),
-                      nid, K(ps.nr_writeback),
+                      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(node_page_state(nid, NR_PAGETABLE)),
+                      nid, K(node_page_state(nid, NR_UNSTABLE_NFS)),
                       nid, K(node_page_state(nid, NR_SLAB)));
        n += hugetlb_report_node_meminfo(nid, buf + n);
        return n;