From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCahi-00040O-VQ for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:15:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCahh-0003z2-AS for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:15:18 -0500 Received: from [199.232.76.173] (port=48297 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCahh-0003yv-07 for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:15:17 -0500 Received: from outbound-va3.frontbridge.com ([216.32.180.16]:26117 helo=VA3EHSOBE003.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1LCahg-0005qe-Jc for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:15:16 -0500 Message-ID: <4947B819.9090307@amd.com> Date: Tue, 16 Dec 2008 15:15:53 +0100 From: Andre Przywara MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070107030604030908010806" Subject: [Qemu-devel] [PATCH 3/8] v2: add info numa monitor command Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Avi Kivity --------------070107030604030908010806 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Signed-off-by: Andre Przywara -- 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 --------------070107030604030908010806 Content-Type: text/x-patch; name="qemunuma_v2_monitor_info.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemunuma_v2_monitor_info.patch" # HG changeset patch # User Andre Przywara # Date 1229430525 -3600 # Node ID 0f3054b66373c2a8b65a5be6d83af63f807dd88f # Parent a0a2e3026d4acffdce91b776d8c2d733767693c5 add info numa command to the monitor diff -r a0a2e3026d4a -r 0f3054b66373 monitor.c --- a/monitor.c Tue Dec 16 13:28:24 2008 +0100 +++ b/monitor.c Tue Dec 16 13:28:45 2008 +0100 @@ -1281,6 +1281,20 @@ static void do_info_kvm(void) #endif } +static void do_info_numa(void) +{ + int i, j; + + term_printf("%d nodes\n", numnumanodes); + for (i = 0; i < numnumanodes; i++) { + term_printf("node %d cpus:", i); + for (j = 0; j < 64; j++) + if (node_to_cpus[i] & (1ULL << j)) term_printf(" %d", j); + term_printf("\n"); + term_printf("node %d size: %" PRId64 " MB\n", i, node_mem[i] >> 20); + } +} + #ifdef CONFIG_PROFILER int64_t kqemu_time; @@ -1538,6 +1552,8 @@ static const term_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, --------------070107030604030908010806--