lkml.org 
[lkml]   [2008]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 19/22 -v3] um: Use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version.

This also removes the following redundant information display:

- 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>
---

Index: tree-linus/arch/um/Kconfig
===================================================================
--- tree-linus.orig/arch/um/Kconfig
+++ tree-linus/arch/um/Kconfig
@@ -11,6 +11,7 @@ config GENERIC_HARDIRQS
config UML
bool
default y
+ select HAVE_GENERIC_SHOW_MEM

config MMU
bool
Index: tree-linus/arch/um/kernel/mem.c
===================================================================
--- tree-linus.orig/arch/um/kernel/mem.c
+++ tree-linus/arch/um/kernel/mem.c
@@ -295,35 +295,6 @@ void free_initrd_mem(unsigned long start
}
#endif

-void show_mem(void)
-{
- int pfn, total = 0, reserved = 0;
- int shared = 0, cached = 0;
- int high_mem = 0;
- struct page *page;
-
- printk(KERN_INFO "Mem-info:\n");
- show_free_areas();
- pfn = max_mapnr;
- while (pfn-- > 0) {
- page = pfn_to_page(pfn);
- total++;
- if (PageHighMem(page))
- high_mem++;
- if (PageReserved(page))
- reserved++;
- else if (PageSwapCache(page))
- cached++;
- else if (page_count(page))
- shared += page_count(page) - 1;
- }
- printk(KERN_INFO "%d pages of RAM\n", total);
- printk(KERN_INFO "%d pages of HIGHMEM\n", high_mem);
- printk(KERN_INFO "%d reserved pages\n", reserved);
- printk(KERN_INFO "%d pages shared\n", shared);
- printk(KERN_INFO "%d pages swap cached\n", cached);
-}
-
/* Allocate and free page tables. */

pgd_t *pgd_alloc(struct mm_struct *mm)
--



\
 
 \ /
  Last update: 2008-04-07 17:57    [W:0.114 / U:3.264 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site