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-changelog

[Xen-changelog] [xen-unstable] x86: debug key prints memory node info of

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: debug key prints memory node info of each domain
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 05 Aug 2008 06:00:09 -0700
Delivery-date: Tue, 05 Aug 2008 06:00:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1217924904 -3600
# Node ID aea47e7e8c0d6941b24c786e23565bbfbff6d953
# Parent  87300352440be551f6ac8832d1d697b081f06ea4
x86: debug key prints memory node info of each domain

This patch will collect memory location (the domain has how many pages
in different node) of each domain and display if you input debug key.

Signed-off-by: Zhou Ting <ting.g.zhou@xxxxxxxxx>
---
 xen/arch/x86/numa.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+)

diff -r 87300352440b -r aea47e7e8c0d xen/arch/x86/numa.c
--- a/xen/arch/x86/numa.c       Tue Aug 05 09:25:10 2008 +0100
+++ b/xen/arch/x86/numa.c       Tue Aug 05 09:28:24 2008 +0100
@@ -14,6 +14,7 @@
 #include <xen/time.h>
 #include <xen/smp.h>
 #include <asm/acpi.h>
+#include <xen/sched.h>
 
 static int numa_setup(char *s);
 custom_param("numa", numa_setup);
@@ -281,6 +282,9 @@ static void dump_numa(unsigned char key)
 {
        s_time_t now = NOW();
        int i;
+       struct domain *d;
+       struct page_info *page;
+       unsigned int page_num_node[MAX_NUMNODES];
 
        printk("'%c' pressed -> dumping numa info (now-0x%X:%08X)\n", key,
                  (u32)(now>>32), (u32)now);
@@ -297,6 +301,28 @@ static void dump_numa(unsigned char key)
        }
        for_each_online_cpu(i)
                printk("CPU%d -> NODE%d\n", i, cpu_to_node[i]);
+
+       rcu_read_lock(&domlist_read_lock);
+
+       printk("Memory location of each domain:\n");
+       for_each_domain(d)
+       {
+               printk("Domain %u (total: %u):\n", d->domain_id, d->tot_pages);
+
+               for_each_online_node(i)
+                       page_num_node[i] = 0;
+
+               list_for_each_entry(page, &d->page_list, list)
+               {
+                       i = phys_to_nid(page_to_mfn(page) << PAGE_SHIFT);
+                       page_num_node[i]++;
+               }
+
+               for_each_online_node(i)
+                       printk("    Node %u: %u\n", i, page_num_node[i]);
+       }
+
+       rcu_read_unlock(&domlist_read_lock);
 }
 
 static __init int register_numa_trigger(void)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: debug key prints memory node info of each domain, Xen patchbot-unstable <=