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@xxxxxxx>
--
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
# HG changeset patch
# User André Przywara <andre.przywara@xxxxxxx>
# 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)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|