From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCjue-000885-0Q for qemu-devel@nongnu.org; Tue, 16 Dec 2008 19:05:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCjud-00087c-9P for qemu-devel@nongnu.org; Tue, 16 Dec 2008 19:05:15 -0500 Received: from [199.232.76.173] (port=46490 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCjud-00087Y-6P for qemu-devel@nongnu.org; Tue, 16 Dec 2008 19:05:15 -0500 Received: from yw-out-1718.google.com ([74.125.46.158]:23012) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCjuc-0003um-Nt for qemu-devel@nongnu.org; Tue, 16 Dec 2008 19:05:14 -0500 Received: by yw-out-1718.google.com with SMTP id 6so1578744ywa.82 for ; Tue, 16 Dec 2008 16:05:14 -0800 (PST) Message-ID: <49484235.7080700@codemonkey.ws> Date: Tue, 16 Dec 2008 18:05:09 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <4947B784.8020300@amd.com> <49481A15.6080402@codemonkey.ws> <49483A64.3040607@amd.com> In-Reply-To: <49483A64.3040607@amd.com> 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: Andre Przywara Cc: qemu-devel@nongnu.org, Avi Kivity Andre Przywara wrote: > 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. It just surprised me. If there's a reason you picked this, that would be a good reason to stick in a comment :-) Regards, Anthony Liguori > > Regards, > Andre. >