WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] add per-node summary for heap info

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] add per-node summary for heap info
From: "Andre Przywara" <andre.przywara@xxxxxxx>
Date: Fri, 21 Dec 2007 23:41:06 +0100
Delivery-date: Fri, 21 Dec 2007 14:42:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (X11/20070728)
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] add per-node summary for heap info, Andre Przywara <=