aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-07-25 22:46:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:10 -0400
commit79b0cbd113a9de1eaa3322528ccaeb97bd9189cc (patch)
tree650bfdad8ca79b1c55053aff7b321b582067bd85
parent8dad322f5449010c14990dd6934878f576b2ee60 (diff)
um: use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/um/kernel/mem.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index e2274ef3155d..61d7e6138ff5 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -264,37 +264,6 @@ void free_initrd_mem(unsigned long start, unsigned long end)
264} 264}
265#endif 265#endif
266 266
267void show_mem(void)
268{
269 int pfn, total = 0, reserved = 0;
270 int shared = 0, cached = 0;
271 int high_mem = 0;
272 struct page *page;
273
274 printk(KERN_INFO "Mem-info:\n");
275 show_free_areas();
276 printk(KERN_INFO "Free swap: %6ldkB\n",
277 nr_swap_pages<<(PAGE_SHIFT-10));
278 pfn = max_mapnr;
279 while (pfn-- > 0) {
280 page = pfn_to_page(pfn);
281 total++;
282 if (PageHighMem(page))
283 high_mem++;
284 if (PageReserved(page))
285 reserved++;
286 else if (PageSwapCache(page))
287 cached++;
288 else if (page_count(page))
289 shared += page_count(page) - 1;
290 }
291 printk(KERN_INFO "%d pages of RAM\n", total);
292 printk(KERN_INFO "%d pages of HIGHMEM\n", high_mem);
293 printk(KERN_INFO "%d reserved pages\n", reserved);
294 printk(KERN_INFO "%d pages shared\n", shared);
295 printk(KERN_INFO "%d pages swap cached\n", cached);
296}
297
298/* Allocate and free page tables. */ 267/* Allocate and free page tables. */
299 268
300pgd_t *pgd_alloc(struct mm_struct *mm) 269pgd_t *pgd_alloc(struct mm_struct *mm)