From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBY31-0000ti-Kg for qemu-devel@nongnu.org; Sat, 13 Dec 2008 12:12:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBY2z-0000tI-Ml for qemu-devel@nongnu.org; Sat, 13 Dec 2008 12:12:59 -0500 Received: from [199.232.76.173] (port=51123 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBY2z-0000tF-Ho for qemu-devel@nongnu.org; Sat, 13 Dec 2008 12:12:57 -0500 Received: from outbound-wa4.frontbridge.com ([216.32.181.16]:1887 helo=WA4EHSOBE002.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1LBY2z-0007zZ-7o for qemu-devel@nongnu.org; Sat, 13 Dec 2008 12:12:57 -0500 Message-ID: <4943ED04.7000208@amd.com> Date: Sat, 13 Dec 2008 18:12:36 +0100 From: Andre Przywara MIME-Version: 1.0 References: <4940F990.9000304@amd.com> <49427BBB.4090806@codemonkey.ws> In-Reply-To: <49427BBB.4090806@codemonkey.ws> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/3] NUMA: add -numa command line option 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 Anthony Liguori wrote: > Andre Przywara wrote: >> This adds and parses a -numa command line option to QEMU. >>... >> + >> +#define MAX_NODES 64 >> +extern int numnumanodes; >> +extern uint64_t hostnodes[MAX_NODES]; >> > > This should not be in this patch. This patch should just contain the > bits needed to create a virtual guest NUMA topology. The hostnode stuff > should be a separate patch. Agreed. I now moved the firmware interface parts of patch 2 into this one, so that you have full functionality with this first patch already (except host pinning and the BIOS part). Shall I move the 'info numa' part of the monitor also into this one or do you prefer smaller patches? >> @@ -3968,6 +3972,10 @@ static void help(int exitcode) >> "-daemonize daemonize QEMU after initializing\n" >> #endif >> "-option-rom rom load a file, rom, into the option ROM space\n" >> + "-numa >> nrnodes[,mem:size1[;size2..]][,cpu:cpu1[;cpu2..]][,pin:node1[;node2]]\n" >> + " create a multi NUMA node guest and >> optionally pin it to\n" >> + " to the given host nodes. If mem and cpu >> are omitted,\n" >> + " resources are split equally\n" >> > > You're whitespace damaged. Actually the damage here is in the three lines before, which start with a leading tab. All other help lines are formatted like my ones. Do you want me to send whitespace fixes for this? Before or after the NUMA part? >> + if (numnumanodes > 0) { >> + int i; >> + >> + if (numnumanodes > smp_cpus) >> + numnumanodes = smp_cpus; >> > > Why have this limitation? We would like to see CPU-less nodes supported > either as memory-only nodes or as IO nodes. I introduced this after some tests, which made Linux crash. Honestly I don't remember the exact behavior or the error message anymore, but I will do some research again. > Which leads me to the question of how to plan on describing which nodes > have what hardware? Do you mean peripheral devices? Like multiple southbridges connected to different NUMA nodes? I don't think that this kind of emulation is needed for QEMU, beside that this is out of scope for the ACPI tables. If you meant this, I can elaborate on this. If not, please explain. Regards, Andre. -- 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