From: "Andre Przywara" <andre.przywara@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] add per-node summary for heap info
Date: Fri, 21 Dec 2007 23:41:06 +0100 [thread overview]
Message-ID: <476C4102.3060206@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
When dumping heap info (using the Xen console handlers, e.g. CTRL-a)
there are entries printed for each node and zone combination. This is
helpful, but summarizing the node's memory usage would be better. This
patch adds three lines per node after the heap dump. The first line
shows the number of DMA-capable pages, the second one the number of
higher pages, the third is the sum of these both numbers.
Proves useful when debugging NUMA handling.
Andre.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
[-- Attachment #2: node_summary.diff --]
[-- Type: text/plain, Size: 1633 bytes --]
# HG changeset patch
# User André Przywara <andre.przywara@amd.com>
# Date 1198270784 -3600
# Node ID be672cea6a62e04f0e420ce4794a85846efe6be2
# Parent 1a9f3e26552d9913c3771d874c342a3262e5addf
added per-node heap summary
diff -r 1a9f3e26552d -r be672cea6a62 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c Fri Dec 21 17:34:38 2007 +0100
+++ b/xen/common/page_alloc.c Fri Dec 21 21:59:44 2007 +0100
@@ -1040,18 +1040,36 @@ static void dump_heap(unsigned char key)
{
s_time_t now = NOW();
int i, j;
+ unsigned long sumpernode [ MAX_NUMNODES * 2 ];
printk("'%c' pressed -> dumping heap info (now-0x%X:%08X)\n", key,
(u32)(now>>32), (u32)now);
for ( i = 0; i < MAX_NUMNODES; i++ )
{
+ sumpernode[ i * 2 ] = 0; sumpernode[ i * 2 + 1 ] = 0;
if ( !avail[i] )
continue;
for ( j = 0; j < NR_ZONES; j++ )
+ {
printk("heap[node=%d][zone=%d] -> %lu pages\n",
i, j, avail[i][j]);
- }
+ sumpernode[i*2+(j<(dma_bitsize - PAGE_SHIFT)?0:1)]+=avail[i][j];
+ }
+ }
+
+ for ( i = 0; i < MAX_NUMNODES; i++ )
+ {
+ if ( !avail[i] )
+ continue;
+ printk("head[node=%d][dmazone] -> %lu pages\n", i,
+ sumpernode[ i * 2 ]);
+ printk("head[node=%d][highzone] -> %lu pages\n", i,
+ sumpernode[ i * 2 + 1 ]);
+ printk("head[node=%d][allzones] -> %lu pages\n", i,
+ sumpernode[i*2] + sumpernode[i*2+1]);
+ }
+
}
static __init int register_heap_trigger(void)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2007-12-21 22:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=476C4102.3060206@amd.com \
--to=andre.przywara@amd.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.