From: Jes Sorensen <jes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch] trim output of show_mem()
Date: Wed, 13 Sep 2006 14:44:00 +0000 [thread overview]
Message-ID: <yq0zmd3esi7.fsf@jaguar.mkp.net> (raw)
Hi,
This patch goes on top of the patch I posted earlier today. It trims
the number of lines of memory information output per node down from 5
lines to one line per node. Kinda helps if you have 1024 live nodes in
a system and you are dumping to the console :)
Cheers,
Jes
Cut the number of lines of memory info output per node from five
to one line.
Signed-off-by: Jes Sorensen <jes@sgi.com>
---
arch/ia64/mm/discontig.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: linux-2.6/arch/ia64/mm/discontig.c
=================================--- linux-2.6.orig/arch/ia64/mm/discontig.c
+++ linux-2.6/arch/ia64/mm/discontig.c
@@ -551,12 +551,13 @@ void show_mem(void)
show_free_areas();
printk(KERN_INFO "Free swap: %6ldkB\n",
nr_swap_pages<<(PAGE_SHIFT-10));
+ printk(KERN_INFO "Node memory in pages:\n");
for_each_online_pgdat(pgdat) {
unsigned long present;
unsigned long flags;
int shared = 0, cached = 0, reserved = 0;
- printk(KERN_INFO "Node ID: %d\n", pgdat->node_id);
+ printk(KERN_INFO "Node %d:", pgdat->node_id);
pgdat_resize_lock(pgdat, &flags);
present = pgdat->node_present_pages;
for(i = 0; i < pgdat->node_spanned_pages; i++) {
@@ -580,10 +581,8 @@ void show_mem(void)
total_reserved += reserved;
total_cached += cached;
total_shared += shared;
- printk(KERN_INFO "\t%ld pages of RAM\n", present);
- printk(KERN_INFO "\t%d reserved pages\n", reserved);
- printk(KERN_INFO "\t%d pages shared\n", shared);
- printk(KERN_INFO "\t%d pages swap cached\n", cached);
+ printk("\tRAM: %ld, reserved: %d, shared: %d, "
+ "swap cached: %d\n", present, reserved, shared, cached);
}
printk(KERN_INFO "%ld pages of RAM\n", total_present);
printk(KERN_INFO "%d reserved pages\n", total_reserved);
next reply other threads:[~2006-09-13 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 14:44 Jes Sorensen [this message]
2006-09-13 15:03 ` [patch] trim output of show_mem() Robin Holt
2006-09-14 11:10 ` Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq0zmd3esi7.fsf@jaguar.mkp.net \
--to=jes@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox