qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/4] add info numa command to monitor


From: Andre Przywara
Subject: [Qemu-devel] [PATCH 2/4] add info numa command to monitor
Date: Tue, 31 Mar 2009 15:28:55 +0200

From: Andre Przywara <address@hidden>

Signed-off-by: Andre Przywara <address@hidden>
---
 monitor.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index c6fe968..eb7b6cb 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1397,6 +1397,22 @@ static void do_info_kvm(Monitor *mon)
 #endif
 }
 
+static void do_info_numa(Monitor *mon)
+{
+    int i, j;
+
+    monitor_printf(mon, "%d nodes\n", nb_numa_nodes);
+    for (i = 0; i < nb_numa_nodes; i++) {
+        monitor_printf(mon, "node %d cpus:", i);
+        for (j = 0; j < 64; j++) {
+            if (node_cpumask[i] & (1ULL << j)) monitor_printf(mon, " %d", j);
+        }
+        monitor_printf(mon, "\n");
+        monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i,
+            node_mem[i] >> 20);
+    }
+}
+
 #ifdef CONFIG_PROFILER
 
 int64_t kqemu_time;
@@ -1770,6 +1786,8 @@ static const mon_cmd_t info_cmds[] = {
       "", "show KQEMU information", },
     { "kvm", "", do_info_kvm,
       "", "show KVM information", },
+    { "numa", "", do_info_numa,
+      "", "show NUMA information", },
     { "usb", "", usb_info,
       "", "show guest USB devices", },
     { "usbhost", "", usb_host_info,
-- 
1.6.1.3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]