From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMrbk-00023O-EE for qemu-devel@nongnu.org; Fri, 03 Jul 2009 18:51:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMrbf-00020a-4M for qemu-devel@nongnu.org; Fri, 03 Jul 2009 18:51:51 -0400 Received: from [199.232.76.173] (port=57118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMrbe-00020F-W7 for qemu-devel@nongnu.org; Fri, 03 Jul 2009 18:51:47 -0400 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13]:19309 helo=TX2EHSOBE005.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1MMrbe-0006ea-Iz for qemu-devel@nongnu.org; Fri, 03 Jul 2009 18:51:46 -0400 Message-ID: <4A4E8BAE.7090602@amd.com> Date: Sat, 4 Jul 2009 00:52:30 +0200 From: Andre Przywara MIME-Version: 1.0 References: <1246632116-31366-1-git-send-email-andre.przywara@amd.com> <4A4E20BA.2040100@theiggy.com> In-Reply-To: <4A4E20BA.2040100@theiggy.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC] allow multi-core guests: introduce cores= option to -cpu List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brian Jackson Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Brian Jackson wrote: > Andre Przywara wrote: >> currently SMP guests happen to see vCPUs as different sockets. >> Some guests (Windows comes to mind) have license restrictions and refuse >> to run on multi-socket machines. >> So lets introduce a "cores=" parameter to the -cpu option to let the user >> specify the number of _cores_ the guest should see. >> ... >> > Personally, I'd like to see it as an extra arg to the -smp option. We've > seen too many people use -cpu incorrectly in #kvm, so we've gotten into > the habit of telling people not to touch that option unless they know > exactly what they are doing. Plus it seems odd to have to use -cpu foo > when you just want more cpus, not a specific cpu. Ok, I see your point. I simply used -cpu because of technical reasons (the core topology is reflected in CPUID, which -cpu cares about). But you are right, it does not belong here, -smp looks like a good candidate (IMO better than -numa). Or we use an abstract "-topology" for this, but this seems like overkill. So what about: "-smp 4,cores=2,threads=2[,sockets=1]" to inject 4 vCPUs in one package (automatically determined if omitted) with two cores and two threads/core? All parameters except the number of vCPUs would be optional, which would make this new format backwards compatible. Only we have to agree on the default topology: multi-socket like the current implementation or multi-core, which would mimic the most common SMP architecture today. It seems that the latter one causes less problems for guests. Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12 ----to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster; Thomas M. McCoy; Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632