4 #include <linux/kernel.h>
6 #include <linux/mman.h>
15 #include <asm/pgtable.h>
22 static int meminfo_proc_show(
struct seq_file *
m,
void *
v)
25 unsigned long committed;
26 unsigned long allowed;
35 #define K(x) ((x) << (PAGE_SHIFT - 10))
43 total_swapcache_pages -
i.bufferram;
60 "SwapCached: %8lu kB\n"
63 "Active(anon): %8lu kB\n"
64 "Inactive(anon): %8lu kB\n"
65 "Active(file): %8lu kB\n"
66 "Inactive(file): %8lu kB\n"
67 "Unevictable: %8lu kB\n"
70 "HighTotal: %8lu kB\n"
78 "SwapTotal: %8lu kB\n"
81 "Writeback: %8lu kB\n"
82 "AnonPages: %8lu kB\n"
86 "SReclaimable: %8lu kB\n"
87 "SUnreclaim: %8lu kB\n"
88 "KernelStack: %8lu kB\n"
89 "PageTables: %8lu kB\n"
90 #ifdef CONFIG_QUICKLIST
91 "Quicklists: %8lu kB\n"
93 "NFS_Unstable: %8lu kB\n"
95 "WritebackTmp: %8lu kB\n"
96 "CommitLimit: %8lu kB\n"
97 "Committed_AS: %8lu kB\n"
98 "VmallocTotal: %8lu kB\n"
99 "VmallocUsed: %8lu kB\n"
100 "VmallocChunk: %8lu kB\n"
101 #ifdef CONFIG_MEMORY_FAILURE
102 "HardwareCorrupted: %5lu kB\n"
104 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
105 "AnonHugePages: %8lu kB\n"
112 K(total_swapcache_pages),
117 K(pages[LRU_ACTIVE_FILE]),
118 K(pages[LRU_INACTIVE_FILE]),
121 #ifdef CONFIG_HIGHMEM
124 K(
i.totalram-
i.totalhigh),
125 K(
i.freeram-
i.freehigh),
134 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
149 #ifdef CONFIG_QUICKLIST
159 vmi.largest_chunk >> 10
160 #ifdef CONFIG_MEMORY_FAILURE
161 ,atomic_long_read(&mce_bad_pages) << (
PAGE_SHIFT - 10)
163 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
183 .open = meminfo_proc_open,
189 static int __init proc_meminfo_init(
void)
191 proc_create(
"meminfo", 0,
NULL, &meminfo_proc_fops);