From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPzBz-0003E4-2B for qemu-devel@nongnu.org; Sun, 12 Jul 2009 09:34:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPzBu-0003DM-JN for qemu-devel@nongnu.org; Sun, 12 Jul 2009 09:34:10 -0400 Received: from [199.232.76.173] (port=40024 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPzBu-0003DJ-Dk for qemu-devel@nongnu.org; Sun, 12 Jul 2009 09:34:06 -0400 Received: from mx2.redhat.com ([66.187.237.31]:57577) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MPzBt-0007vE-Sl for qemu-devel@nongnu.org; Sun, 12 Jul 2009 09:34:06 -0400 Message-ID: <4A59E6F9.2090301@redhat.com> Date: Sun, 12 Jul 2009 16:36:57 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [patch 2/2] QEMU BOCHS bios patches to use maxcpus value. References: <20090624083512.766907560@sgi.com> <20090624083725.264462154@sgi.com> <4A5667D2.2020404@codemonkey.ws> <4A59AF3C.8030005@redhat.com> <4A59E3E1.30406@codemonkey.ws> In-Reply-To: <4A59E3E1.30406@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony Liguori , Jes Sorensen , qemu-devel@nongnu.org On 07/12/2009 04:23 PM, Anthony Liguori wrote: >>> If nothing else, maxcpus ==smp_cpus under QEMU because we don't do >>> CPU hotplug (and I don't think we should). >>> >> >> Why shouldn't we do cpu hotplug? > > > I don't think we should do cpu hotplug via ACPI. Well, that's a different story from "we shouldn't do cou hotplug". > I don't think ACPI actually models CPU hotplug and the fact that this > works with Linux in KVM is a happy accident. I think it's based on the Unisys machines and thus no accident. > VMware only supports CPU hotplug for Windows 7/2k8 guests so I'm > assuming their using Viridian PV extensions to do it. I don't recall seeing hotplug support in Viridian. Further, Windows 2008 appears to support cpu hotplug on bare metal. My guess is that it uses ACPI, perhaps with an additional vendor driver. > I think we should go the PV route for Linux too. Seems like needless churn, plus disabling that functionality for older kernels. > I'd rather see us create all vcpu threads at once and then let the > guest offline each vcpu via a PV notification. That doesn't work, for example, when the guest reboots into an older version of itself. It also gives control of resource usage to the guest instead of the host. The latter issue can be fixed using control groups, but I'd rather not break it in the first place. > I don't see a lot of value in spawning/terminating vcpu threads > dynamically and it adds an awful lot of complexity. There's very > little overhead to an idle thread. Can you elaborate on the complexity you think dynamic vcpu threads add? IIRC there's some synchronization to be done at startup, but nothing that merits the label "awful". -- error compiling committee.c: too many arguments to function