mirror of
https://github.com/adulau/aha.git
synced 2025-01-03 22:53:18 +00:00
[S390] More verbose show_mem() like other architectures.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
a5a60a2bee
commit
be2864b5ee
1 changed files with 23 additions and 15 deletions
|
@ -61,30 +61,38 @@ void diag10(unsigned long addr)
|
||||||
|
|
||||||
void show_mem(void)
|
void show_mem(void)
|
||||||
{
|
{
|
||||||
int i, total = 0, reserved = 0;
|
int i, total = 0, reserved = 0;
|
||||||
int shared = 0, cached = 0;
|
int shared = 0, cached = 0;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
|
||||||
printk("Mem-info:\n");
|
printk("Mem-info:\n");
|
||||||
show_free_areas();
|
show_free_areas();
|
||||||
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
|
printk("Free swap: %6ldkB\n", nr_swap_pages << (PAGE_SHIFT - 10));
|
||||||
i = max_mapnr;
|
i = max_mapnr;
|
||||||
while (i-- > 0) {
|
while (i-- > 0) {
|
||||||
if (!pfn_valid(i))
|
if (!pfn_valid(i))
|
||||||
continue;
|
continue;
|
||||||
page = pfn_to_page(i);
|
page = pfn_to_page(i);
|
||||||
total++;
|
total++;
|
||||||
if (PageReserved(page))
|
if (PageReserved(page))
|
||||||
reserved++;
|
reserved++;
|
||||||
else if (PageSwapCache(page))
|
else if (PageSwapCache(page))
|
||||||
cached++;
|
cached++;
|
||||||
else if (page_count(page))
|
else if (page_count(page))
|
||||||
shared += page_count(page) - 1;
|
shared += page_count(page) - 1;
|
||||||
}
|
}
|
||||||
printk("%d pages of RAM\n",total);
|
printk("%d pages of RAM\n", total);
|
||||||
printk("%d reserved pages\n",reserved);
|
printk("%d reserved pages\n", reserved);
|
||||||
printk("%d pages shared\n",shared);
|
printk("%d pages shared\n", shared);
|
||||||
printk("%d pages swap cached\n",cached);
|
printk("%d pages swap cached\n", cached);
|
||||||
|
|
||||||
|
printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY));
|
||||||
|
printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK));
|
||||||
|
printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED));
|
||||||
|
printk("%lu pages slab\n",
|
||||||
|
global_page_state(NR_SLAB_RECLAIMABLE) +
|
||||||
|
global_page_state(NR_SLAB_UNRECLAIMABLE));
|
||||||
|
printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init setup_ro_region(void)
|
static void __init setup_ro_region(void)
|
||||||
|
|
Loading…
Reference in a new issue