diff options
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r-- | fs/proc/proc_misc.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 5c10ea157425..9f2cfc30f9cf 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/mman.h> | 26 | #include <linux/mman.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/config.h> | ||
30 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
31 | #include <linux/mmzone.h> | 30 | #include <linux/mmzone.h> |
32 | #include <linux/pagemap.h> | 31 | #include <linux/pagemap.h> |
@@ -120,7 +119,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
120 | { | 119 | { |
121 | struct sysinfo i; | 120 | struct sysinfo i; |
122 | int len; | 121 | int len; |
123 | struct page_state ps; | ||
124 | unsigned long inactive; | 122 | unsigned long inactive; |
125 | unsigned long active; | 123 | unsigned long active; |
126 | unsigned long free; | 124 | unsigned long free; |
@@ -129,7 +127,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
129 | struct vmalloc_info vmi; | 127 | struct vmalloc_info vmi; |
130 | long cached; | 128 | long cached; |
131 | 129 | ||
132 | get_page_state(&ps); | ||
133 | get_zone_counts(&active, &inactive, &free); | 130 | get_zone_counts(&active, &inactive, &free); |
134 | 131 | ||
135 | /* | 132 | /* |
@@ -142,7 +139,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
142 | allowed = ((totalram_pages - hugetlb_total_pages()) | 139 | allowed = ((totalram_pages - hugetlb_total_pages()) |
143 | * sysctl_overcommit_ratio / 100) + total_swap_pages; | 140 | * sysctl_overcommit_ratio / 100) + total_swap_pages; |
144 | 141 | ||
145 | cached = get_page_cache_size() - total_swapcache_pages - i.bufferram; | 142 | cached = global_page_state(NR_FILE_PAGES) - |
143 | total_swapcache_pages - i.bufferram; | ||
146 | if (cached < 0) | 144 | if (cached < 0) |
147 | cached = 0; | 145 | cached = 0; |
148 | 146 | ||
@@ -167,11 +165,14 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
167 | "SwapFree: %8lu kB\n" | 165 | "SwapFree: %8lu kB\n" |
168 | "Dirty: %8lu kB\n" | 166 | "Dirty: %8lu kB\n" |
169 | "Writeback: %8lu kB\n" | 167 | "Writeback: %8lu kB\n" |
168 | "AnonPages: %8lu kB\n" | ||
170 | "Mapped: %8lu kB\n" | 169 | "Mapped: %8lu kB\n" |
171 | "Slab: %8lu kB\n" | 170 | "Slab: %8lu kB\n" |
171 | "PageTables: %8lu kB\n" | ||
172 | "NFS Unstable: %8lu kB\n" | ||
173 | "Bounce: %8lu kB\n" | ||
172 | "CommitLimit: %8lu kB\n" | 174 | "CommitLimit: %8lu kB\n" |
173 | "Committed_AS: %8lu kB\n" | 175 | "Committed_AS: %8lu kB\n" |
174 | "PageTables: %8lu kB\n" | ||
175 | "VmallocTotal: %8lu kB\n" | 176 | "VmallocTotal: %8lu kB\n" |
176 | "VmallocUsed: %8lu kB\n" | 177 | "VmallocUsed: %8lu kB\n" |
177 | "VmallocChunk: %8lu kB\n", | 178 | "VmallocChunk: %8lu kB\n", |
@@ -188,13 +189,16 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
188 | K(i.freeram-i.freehigh), | 189 | K(i.freeram-i.freehigh), |
189 | K(i.totalswap), | 190 | K(i.totalswap), |
190 | K(i.freeswap), | 191 | K(i.freeswap), |
191 | K(ps.nr_dirty), | 192 | K(global_page_state(NR_FILE_DIRTY)), |
192 | K(ps.nr_writeback), | 193 | K(global_page_state(NR_WRITEBACK)), |
193 | K(ps.nr_mapped), | 194 | K(global_page_state(NR_ANON_PAGES)), |
194 | K(ps.nr_slab), | 195 | K(global_page_state(NR_FILE_MAPPED)), |
196 | K(global_page_state(NR_SLAB)), | ||
197 | K(global_page_state(NR_PAGETABLE)), | ||
198 | K(global_page_state(NR_UNSTABLE_NFS)), | ||
199 | K(global_page_state(NR_BOUNCE)), | ||
195 | K(allowed), | 200 | K(allowed), |
196 | K(committed), | 201 | K(committed), |
197 | K(ps.nr_page_table_pages), | ||
198 | (unsigned long)VMALLOC_TOTAL >> 10, | 202 | (unsigned long)VMALLOC_TOTAL >> 10, |
199 | vmi.used >> 10, | 203 | vmi.used >> 10, |
200 | vmi.largest_chunk >> 10 | 204 | vmi.largest_chunk >> 10 |