Received: from eggs.gnu.org ([2001:4830:134:3::10]:36993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0oEI-0000KP-S7 for qemu-devel@nongnu.org; Thu, 12 May 2016 06:52:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0oEE-0001F0-Jq for qemu-devel@nongnu.org; Thu, 12 May 2016 06:52:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0oEE-0001Ew-B3 for qemu-devel@nongnu.org; Thu, 12 May 2016 06:52:26 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 842497F6B1 for ; Thu, 12 May 2016 10:52:25 +0000 (UTC) Date: Thu, 12 May 2016 07:52:23 -0300 From: Eduardo Habkost Message-ID: <20160512105223.GK4457@thinpad.lan.raisama.net> References: <1462192431-146342-1-git-send-email-imammedo@redhat.com> <1462192431-146342-13-git-send-email-imammedo@redhat.com> <20160510202414.GD4457@thinpad.lan.raisama.net> <20160511155039.320c3de6@nial.brq.redhat.com> <20160512005017-mutt-send-email-mst@redhat.com> <20160511232859.GI4457@thinpad.lan.raisama.net> <20160512100606-mutt-send-email-mst@redhat.com> <20160512122955.006159de@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160512122955.006159de@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [RFC 12/42] pc: initialize legacy hotplug only for 2.6 and older machine types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: "Michael S. Tsirkin" , qemu-devel@nongnu.org, marcel@redhat.com, eblake@redhat.com, armbru@redhat.com, drjones@redhat.com, libvir-list@redhat.com On Thu, May 12, 2016 at 12:29:55PM +0200, Igor Mammedov wrote: > On Thu, 12 May 2016 10:07:03 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, May 11, 2016 at 08:28:59PM -0300, Eduardo Habkost wrote: > > > On Thu, May 12, 2016 at 12:51:55AM +0300, Michael S. Tsirkin wrote: > > > > On Wed, May 11, 2016 at 03:50:39PM +0200, Igor Mammedov wrote: > > > > > On Tue, 10 May 2016 17:24:14 -0300 > > > > > Eduardo Habkost wrote: > > > > > > > > > > > On Mon, May 02, 2016 at 02:33:21PM +0200, Igor Mammedov wrote: > > > > > > > on old machine types CPU hotplug was uncondtionally > > > > > > > enabled since it was introduced, consuming IO ports > > > > > > > and providing AML regardles of whether it was actually > > > > > > > in use or not. Keep it so for 2.6 and older machines. > > > > > > > > > > > > > > New machine types will have an option to turn CPU > > > > > > > hotplug on if it's needed while by default it stays > > > > > > > disabled not consuming extra RAM/IO resources. > > > > > > > > > > > > > > Signed-off-by: Igor Mammedov > > > > > > > > > > > > What if people are using "-machine pc -smp N,max_cpus=M"? > > > > > > Shouldn't we at least warning about missing CPU hotplug support > > > > > > when using just "max_cpus" with no "cpu-hotplug=on" with pc-2.7 > > > > > > and newer? > > > > > Yep, I'll add it on next respin. > > > > > Would hard error better than warning? > > > > > > > > Most people don't need cpu hotplug, attempts > > > > to hotplug fail, should be enough. > > > > > > People who don't need CPU hotplug shouldn't be using the max_cpus > > > option. > > > > I agree. > > > > > I believe we should at least warn people (early, during > > > initialization) that their configuration don't make sense > > > anymore. > > > > I think we should try to keep old command line working > > if we can. > this patch won't break old command line for old machine types, > but for new machine type users would need to fix it > and be explicit if they want cpu-hotplug. I don't think we should do that, unless users already had time to update their scripts and libvirt had time to implement code supporting the new method. I believe libvirt (and people's scripts) use maxcpus only when they want CPU hotplug, so making max_cpus > smp_cpus enable CPU hotplug implicitly would probably solve the compatibility issue. If we want to deprecate the use of maxcpus to enable CPU hotplug, then we can make it print a warning for a few releases, so people have time to update their code. -- Eduardo