Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / fs / proc / proc_misc.c
index 16271a1..f8eebe6 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/mman.h>
 #include <linux/proc_fs.h>
 #include <linux/ioport.h>
-#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/mmzone.h>
 #include <linux/pagemap.h>
@@ -53,8 +52,6 @@
 #include <asm/div64.h>
 #include "internal.h"
 
-#include <linux/vs_cvirt.h>
-
 #define LOAD_INT(x) ((x) >> FSHIFT)
 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
 /*
@@ -140,7 +137,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
 {
        struct sysinfo i;
        int len;
-       struct page_state ps;
        unsigned long inactive;
        unsigned long active;
        unsigned long free;
@@ -149,7 +145,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
        struct vmalloc_info vmi;
        long cached;
 
-       get_page_state(&ps);
        get_zone_counts(&active, &inactive, &free);
 
 /*
@@ -162,7 +157,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
        allowed = ((totalram_pages - hugetlb_total_pages())
                * sysctl_overcommit_ratio / 100) + total_swap_pages;
 
-       cached = get_page_cache_size() - total_swapcache_pages - i.bufferram;
+       cached = global_page_state(NR_FILE_PAGES) -
+                       total_swapcache_pages - i.bufferram;
        if (cached < 0 || vx_flags(VXF_VIRT_MEM, 0))
                cached = 0;
 
@@ -187,11 +183,14 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
                "SwapFree:     %8lu kB\n"
                "Dirty:        %8lu kB\n"
                "Writeback:    %8lu kB\n"
+               "AnonPages:    %8lu kB\n"
                "Mapped:       %8lu kB\n"
                "Slab:         %8lu kB\n"
+               "PageTables:   %8lu kB\n"
+               "NFS_Unstable: %8lu kB\n"
+               "Bounce:       %8lu kB\n"
                "CommitLimit:  %8lu kB\n"
                "Committed_AS: %8lu kB\n"
-               "PageTables:   %8lu kB\n"
                "VmallocTotal: %8lu kB\n"
                "VmallocUsed:  %8lu kB\n"
                "VmallocChunk: %8lu kB\n",
@@ -208,13 +207,16 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
                K(i.freeram-i.freehigh),
                K(i.totalswap),
                K(i.freeswap),
-               K(ps.nr_dirty),
-               K(ps.nr_writeback),
-               K(ps.nr_mapped),
-               K(ps.nr_slab),
+               K(global_page_state(NR_FILE_DIRTY)),
+               K(global_page_state(NR_WRITEBACK)),
+               K(global_page_state(NR_ANON_PAGES)),
+               K(global_page_state(NR_FILE_MAPPED)),
+               K(global_page_state(NR_SLAB)),
+               K(global_page_state(NR_PAGETABLE)),
+               K(global_page_state(NR_UNSTABLE_NFS)),
+               K(global_page_state(NR_BOUNCE)),
                K(allowed),
                K(committed),
-               K(ps.nr_page_table_pages),
                (unsigned long)VMALLOC_TOTAL >> 10,
                vmi.used >> 10,
                vmi.largest_chunk >> 10