From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCjOb-0004Vi-IN for qemu-devel@nongnu.org; Tue, 16 Dec 2008 18:32:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCjOY-0004VF-SO for qemu-devel@nongnu.org; Tue, 16 Dec 2008 18:32:09 -0500 Received: from [199.232.76.173] (port=56936 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCjOY-0004VC-O0 for qemu-devel@nongnu.org; Tue, 16 Dec 2008 18:32:06 -0500 Received: from outbound-sin.frontbridge.com ([207.46.51.80]:41402 helo=SG2EHSOBE001.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1LCjOY-0000Sz-AI for qemu-devel@nongnu.org; Tue, 16 Dec 2008 18:32:06 -0500 Message-ID: <49483A64.3040607@amd.com> Date: Wed, 17 Dec 2008 00:31:48 +0100 From: Andre Przywara MIME-Version: 1.0 References: <4947B784.8020300@amd.com> <49481A15.6080402@codemonkey.ws> In-Reply-To: <49481A15.6080402@codemonkey.ws> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/8] v2: introduce -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: >> + if (i == numnumanodes) { >> + for (i = 0; i < smp_cpus; i++) >> + node_to_cpus[i % numnumanodes] |= 1<> > > The way CPUs are allocate here seems strange? Each CPU is assigned > round robin? Should you have node 0 contain 1..X, node 1 contain X..Y, > node 2 contain Y..smp_cpus? This is because an algorithm to do it this way is more complicated than this round-robin scheme (imagine distributing 8 CPUs over 3 nodes). Actually I know machines which do this natively (probably for the same reason, code simplicity in the BIOS). OSes can cope with my variant too, there is no guarantee that sequentially numbered CPUs belong to one node. But if you insist, I fix it. Regards, Andre. -- Andre Przywara AMD-OSRC (Dresden) Tel: x84917