From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwOUL-0000Tf-2v for qemu-devel@nongnu.org; Tue, 21 Apr 2009 18:30:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwOUK-0000TJ-GG for qemu-devel@nongnu.org; Tue, 21 Apr 2009 18:30:48 -0400 Received: from [199.232.76.173] (port=38841 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwOUK-0000TC-BF for qemu-devel@nongnu.org; Tue, 21 Apr 2009 18:30:48 -0400 Received: from savannah.gnu.org ([199.232.41.3]:46071 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwOUK-0003Gb-2K for qemu-devel@nongnu.org; Tue, 21 Apr 2009 18:30:48 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LwOUJ-0005Wk-HK for qemu-devel@nongnu.org; Tue, 21 Apr 2009 22:30:47 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LwOUJ-0005Wg-AN for qemu-devel@nongnu.org; Tue, 21 Apr 2009 22:30:47 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Tue, 21 Apr 2009 22:30:47 +0000 Subject: [Qemu-devel] [7211] add info numa command to monitor (Andre Przywara) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7211 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7211 Author: aliguori Date: 2009-04-21 22:30:47 +0000 (Tue, 21 Apr 2009) Log Message: ----------- add info numa command to monitor (Andre Przywara) adds an "info numa" command to the monitor to output the current topology. Since NUMA is advertised via static ACPI tables, no changes are possible during runtime. Signed-off-by: Andre Przywara Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/monitor.c Modified: trunk/monitor.c =================================================================== --- trunk/monitor.c 2009-04-21 22:30:27 UTC (rev 7210) +++ trunk/monitor.c 2009-04-21 22:30:47 UTC (rev 7211) @@ -1409,6 +1409,25 @@ #endif } +static void do_info_numa(Monitor *mon) +{ + int i, j; + CPUState *env; + + 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 (env = first_cpu; env != NULL; env = env->next_cpu) { + if (env->numa_node == i) { + monitor_printf(mon, " %d", env->cpu_index); + } + } + 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; @@ -1792,6 +1811,8 @@ "", "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,