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.c85
1 files changed, 53 insertions, 32 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 59ea42e1ef0..61b25f4eabe 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -136,6 +136,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
136 unsigned long allowed; 136 unsigned long allowed;
137 struct vmalloc_info vmi; 137 struct vmalloc_info vmi;
138 long cached; 138 long cached;
139 unsigned long pages[NR_LRU_LISTS];
140 int lru;
139 141
140/* 142/*
141 * display in kilobytes. 143 * display in kilobytes.
@@ -154,51 +156,70 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
154 156
155 get_vmalloc_info(&vmi); 157 get_vmalloc_info(&vmi);
156 158
159 for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
160 pages[lru] = global_page_state(NR_LRU_BASE + lru);
161
157 /* 162 /*
158 * Tagged format, for easy grepping and expansion. 163 * Tagged format, for easy grepping and expansion.
159 */ 164 */
160 len = sprintf(page, 165 len = sprintf(page,
161 "MemTotal: %8lu kB\n" 166 "MemTotal: %8lu kB\n"
162 "MemFree: %8lu kB\n" 167 "MemFree: %8lu kB\n"
163 "Buffers: %8lu kB\n" 168 "Buffers: %8lu kB\n"
164 "Cached: %8lu kB\n" 169 "Cached: %8lu kB\n"
165 "SwapCached: %8lu kB\n" 170 "SwapCached: %8lu kB\n"
166 "Active: %8lu kB\n" 171 "Active: %8lu kB\n"
167 "Inactive: %8lu kB\n" 172 "Inactive: %8lu kB\n"
173 "Active(anon): %8lu kB\n"
174 "Inactive(anon): %8lu kB\n"
175 "Active(file): %8lu kB\n"
176 "Inactive(file): %8lu kB\n"
177#ifdef CONFIG_UNEVICTABLE_LRU
178 "Unevictable: %8lu kB\n"
179 "Mlocked: %8lu kB\n"
180#endif
168#ifdef CONFIG_HIGHMEM 181#ifdef CONFIG_HIGHMEM
169 "HighTotal: %8lu kB\n" 182 "HighTotal: %8lu kB\n"
170 "HighFree: %8lu kB\n" 183 "HighFree: %8lu kB\n"
171 "LowTotal: %8lu kB\n" 184 "LowTotal: %8lu kB\n"
172 "LowFree: %8lu kB\n" 185 "LowFree: %8lu kB\n"
173#endif 186#endif
174 "SwapTotal: %8lu kB\n" 187 "SwapTotal: %8lu kB\n"
175 "SwapFree: %8lu kB\n" 188 "SwapFree: %8lu kB\n"
176 "Dirty: %8lu kB\n" 189 "Dirty: %8lu kB\n"
177 "Writeback: %8lu kB\n" 190 "Writeback: %8lu kB\n"
178 "AnonPages: %8lu kB\n" 191 "AnonPages: %8lu kB\n"
179 "Mapped: %8lu kB\n" 192 "Mapped: %8lu kB\n"
180 "Slab: %8lu kB\n" 193 "Slab: %8lu kB\n"
181 "SReclaimable: %8lu kB\n" 194 "SReclaimable: %8lu kB\n"
182 "SUnreclaim: %8lu kB\n" 195 "SUnreclaim: %8lu kB\n"
183 "PageTables: %8lu kB\n" 196 "PageTables: %8lu kB\n"
184#ifdef CONFIG_QUICKLIST 197#ifdef CONFIG_QUICKLIST
185 "Quicklists: %8lu kB\n" 198 "Quicklists: %8lu kB\n"
186#endif 199#endif
187 "NFS_Unstable: %8lu kB\n" 200 "NFS_Unstable: %8lu kB\n"
188 "Bounce: %8lu kB\n" 201 "Bounce: %8lu kB\n"
189 "WritebackTmp: %8lu kB\n" 202 "WritebackTmp: %8lu kB\n"
190 "CommitLimit: %8lu kB\n" 203 "CommitLimit: %8lu kB\n"
191 "Committed_AS: %8lu kB\n" 204 "Committed_AS: %8lu kB\n"
192 "VmallocTotal: %8lu kB\n" 205 "VmallocTotal: %8lu kB\n"
193 "VmallocUsed: %8lu kB\n" 206 "VmallocUsed: %8lu kB\n"
194 "VmallocChunk: %8lu kB\n", 207 "VmallocChunk: %8lu kB\n",
195 K(i.totalram), 208 K(i.totalram),
196 K(i.freeram), 209 K(i.freeram),
197 K(i.bufferram), 210 K(i.bufferram),
198 K(cached), 211 K(cached),
199 K(total_swapcache_pages), 212 K(total_swapcache_pages),
200 K(global_page_state(NR_ACTIVE)), 213 K(pages[LRU_ACTIVE_ANON] + pages[LRU_ACTIVE_FILE]),
201 K(global_page_state(NR_INACTIVE)), 214 K(pages[LRU_INACTIVE_ANON] + pages[LRU_INACTIVE_FILE]),
215 K(pages[LRU_ACTIVE_ANON]),
216 K(pages[LRU_INACTIVE_ANON]),
217 K(pages[LRU_ACTIVE_FILE]),
218 K(pages[LRU_INACTIVE_FILE]),
219#ifdef CONFIG_UNEVICTABLE_LRU
220 K(pages[LRU_UNEVICTABLE]),
221 K(global_page_state(NR_MLOCK)),
222#endif
202#ifdef CONFIG_HIGHMEM 223#ifdef CONFIG_HIGHMEM
203 K(i.totalhigh), 224 K(i.totalhigh),
204 K(i.freehigh), 225 K(i.freehigh),