提交 816add4e 编写于 作者: J Jes Sorensen 提交者: Tony Luck

[IA64] trim output of show_mem()

Cut the number of lines of memory info output per node from five
to one line.
Signed-off-by: NJes Sorensen <jes@sgi.com>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 709a6c1c
...@@ -551,12 +551,12 @@ void show_mem(void) ...@@ -551,12 +551,12 @@ void show_mem(void)
show_free_areas(); show_free_areas();
printk(KERN_INFO "Free swap: %6ldkB\n", printk(KERN_INFO "Free swap: %6ldkB\n",
nr_swap_pages<<(PAGE_SHIFT-10)); nr_swap_pages<<(PAGE_SHIFT-10));
printk(KERN_INFO "Node memory in pages:\n");
for_each_online_pgdat(pgdat) { for_each_online_pgdat(pgdat) {
unsigned long present; unsigned long present;
unsigned long flags; unsigned long flags;
int shared = 0, cached = 0, reserved = 0; int shared = 0, cached = 0, reserved = 0;
printk(KERN_INFO "Node ID: %d\n", pgdat->node_id);
pgdat_resize_lock(pgdat, &flags); pgdat_resize_lock(pgdat, &flags);
present = pgdat->node_present_pages; present = pgdat->node_present_pages;
for(i = 0; i < pgdat->node_spanned_pages; i++) { for(i = 0; i < pgdat->node_spanned_pages; i++) {
...@@ -580,10 +580,9 @@ void show_mem(void) ...@@ -580,10 +580,9 @@ void show_mem(void)
total_reserved += reserved; total_reserved += reserved;
total_cached += cached; total_cached += cached;
total_shared += shared; total_shared += shared;
printk(KERN_INFO "\t%ld pages of RAM\n", present); printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, "
printk(KERN_INFO "\t%d reserved pages\n", reserved); "shrd: %10d, swpd: %10d\n", pgdat->node_id,
printk(KERN_INFO "\t%d pages shared\n", shared); present, reserved, shared, cached);
printk(KERN_INFO "\t%d pages swap cached\n", cached);
} }
printk(KERN_INFO "%ld pages of RAM\n", total_present); printk(KERN_INFO "%ld pages of RAM\n", total_present);
printk(KERN_INFO "%d reserved pages\n", total_reserved); printk(KERN_INFO "%d reserved pages\n", total_reserved);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册