aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index b8d48852649..9f2cfc30f9c 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -119,7 +119,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
119{ 119{
120 struct sysinfo i; 120 struct sysinfo i;
121 int len; 121 int len;
122 struct page_state ps;
123 unsigned long inactive; 122 unsigned long inactive;
124 unsigned long active; 123 unsigned long active;
125 unsigned long free; 124 unsigned long free;
@@ -128,7 +127,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
128 struct vmalloc_info vmi; 127 struct vmalloc_info vmi;
129 long cached; 128 long cached;
130 129
131 get_page_state(&ps);
132 get_zone_counts(&active, &inactive, &free); 130 get_zone_counts(&active, &inactive, &free);
133 131
134/* 132/*
@@ -141,7 +139,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
141 allowed = ((totalram_pages - hugetlb_total_pages()) 139 allowed = ((totalram_pages - hugetlb_total_pages())
142 * sysctl_overcommit_ratio / 100) + total_swap_pages; 140 * sysctl_overcommit_ratio / 100) + total_swap_pages;
143 141
144 cached = get_page_cache_size() - total_swapcache_pages - i.bufferram; 142 cached = global_page_state(NR_FILE_PAGES) -
143 total_swapcache_pages - i.bufferram;
145 if (cached < 0) 144 if (cached < 0)
146 cached = 0; 145 cached = 0;
147 146
@@ -166,11 +165,14 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
166 "SwapFree: %8lu kB\n" 165 "SwapFree: %8lu kB\n"
167 "Dirty: %8lu kB\n" 166 "Dirty: %8lu kB\n"
168 "Writeback: %8lu kB\n" 167 "Writeback: %8lu kB\n"
168 "AnonPages: %8lu kB\n"
169 "Mapped: %8lu kB\n" 169 "Mapped: %8lu kB\n"
170 "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"
171 "CommitLimit: %8lu kB\n" 174 "CommitLimit: %8lu kB\n"
172 "Committed_AS: %8lu kB\n" 175 "Committed_AS: %8lu kB\n"
173 "PageTables: %8lu kB\n"
174 "VmallocTotal: %8lu kB\n" 176 "VmallocTotal: %8lu kB\n"
175 "VmallocUsed: %8lu kB\n" 177 "VmallocUsed: %8lu kB\n"
176 "VmallocChunk: %8lu kB\n", 178 "VmallocChunk: %8lu kB\n",
@@ -187,13 +189,16 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
187 K(i.freeram-i.freehigh), 189 K(i.freeram-i.freehigh),
188 K(i.totalswap), 190 K(i.totalswap),
189 K(i.freeswap), 191 K(i.freeswap),
190 K(ps.nr_dirty), 192 K(global_page_state(NR_FILE_DIRTY)),
191 K(ps.nr_writeback), 193 K(global_page_state(NR_WRITEBACK)),
192 K(ps.nr_mapped), 194 K(global_page_state(NR_ANON_PAGES)),
193 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)),
194 K(allowed), 200 K(allowed),
195 K(committed), 201 K(committed),
196 K(ps.nr_page_table_pages),
197 (unsigned long)VMALLOC_TOTAL >> 10, 202 (unsigned long)VMALLOC_TOTAL >> 10,
198 vmi.used >> 10, 203 vmi.used >> 10,
199 vmi.largest_chunk >> 10 204 vmi.largest_chunk >> 10