[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.