Include missing linux/slab.h inclusions
[linux-3.10.git] / fs / proc / meminfo.c
index 78faedc..1efaaa1 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/seq_file.h>
 #include <linux/swap.h>
 #include <linux/vmstat.h>
-#include <asm/atomic.h>
+#include <linux/atomic.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include "internal.h"
@@ -40,7 +40,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
                * sysctl_overcommit_ratio / 100) + total_swap_pages;
 
        cached = global_page_state(NR_FILE_PAGES) -
-                       total_swapcache_pages - i.bufferram;
+                       total_swapcache_pages() - i.bufferram;
        if (cached < 0)
                cached = 0;
 
@@ -81,9 +81,11 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
                "Writeback:      %8lu kB\n"
                "AnonPages:      %8lu kB\n"
                "Mapped:         %8lu kB\n"
+               "Shmem:          %8lu kB\n"
                "Slab:           %8lu kB\n"
                "SReclaimable:   %8lu kB\n"
                "SUnreclaim:     %8lu kB\n"
+               "KernelStack:    %8lu kB\n"
                "PageTables:     %8lu kB\n"
 #ifdef CONFIG_QUICKLIST
                "Quicklists:     %8lu kB\n"
@@ -97,14 +99,17 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
                "VmallocUsed:    %8lu kB\n"
                "VmallocChunk:   %8lu kB\n"
 #ifdef CONFIG_MEMORY_FAILURE
-               "HardwareCorrupted: %8lu kB\n"
+               "HardwareCorrupted: %5lu kB\n"
+#endif
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+               "AnonHugePages:  %8lu kB\n"
 #endif
                ,
                K(i.totalram),
                K(i.freeram),
                K(i.bufferram),
                K(cached),
-               K(total_swapcache_pages),
+               K(total_swapcache_pages()),
                K(pages[LRU_ACTIVE_ANON]   + pages[LRU_ACTIVE_FILE]),
                K(pages[LRU_INACTIVE_ANON] + pages[LRU_INACTIVE_FILE]),
                K(pages[LRU_ACTIVE_ANON]),
@@ -126,12 +131,20 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
                K(i.freeswap),
                K(global_page_state(NR_FILE_DIRTY)),
                K(global_page_state(NR_WRITEBACK)),
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+               K(global_page_state(NR_ANON_PAGES)
+                 + global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
+                 HPAGE_PMD_NR),
+#else
                K(global_page_state(NR_ANON_PAGES)),
+#endif
                K(global_page_state(NR_FILE_MAPPED)),
+               K(global_page_state(NR_SHMEM)),
                K(global_page_state(NR_SLAB_RECLAIMABLE) +
                                global_page_state(NR_SLAB_UNRECLAIMABLE)),
                K(global_page_state(NR_SLAB_RECLAIMABLE)),
                K(global_page_state(NR_SLAB_UNRECLAIMABLE)),
+               global_page_state(NR_KERNEL_STACK) * THREAD_SIZE / 1024,
                K(global_page_state(NR_PAGETABLE)),
 #ifdef CONFIG_QUICKLIST
                K(quicklist_total_size()),
@@ -145,7 +158,11 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
                vmi.used >> 10,
                vmi.largest_chunk >> 10
 #ifdef CONFIG_MEMORY_FAILURE
-               ,atomic_long_read(&mce_bad_pages) << (PAGE_SHIFT - 10)
+               ,atomic_long_read(&num_poisoned_pages) << (PAGE_SHIFT - 10)
+#endif
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+               ,K(global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
+                  HPAGE_PMD_NR)
 #endif
                );