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