Received: from eggs.gnu.org ([2001:4830:134:3::10]:42419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQFBv-000483-0X for qemu-devel@nongnu.org; Thu, 21 Jul 2016 10:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQFBq-00070H-3t for qemu-devel@nongnu.org; Thu, 21 Jul 2016 10:43:11 -0400 Received: from 9.mo178.mail-out.ovh.net ([46.105.75.45]:38058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQFBp-0006zy-Pf for qemu-devel@nongnu.org; Thu, 21 Jul 2016 10:43:06 -0400 Received: from player169.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id BCAE01004A24 for ; Thu, 21 Jul 2016 16:43:04 +0200 (CEST) Date: Thu, 21 Jul 2016 16:42:42 +0200 From: Greg Kurz Message-ID: <20160721164242.66b152cc@bahia.lan> In-Reply-To: <20160721163006.01619356@nial.brq.redhat.com> References: <1468833560-17397-1-git-send-email-david@gibson.dropbear.id.au> <1468833560-17397-2-git-send-email-david@gibson.dropbear.id.au> <20160719115240.o5aivhfq2yktlvf2@andariel.pipo.sk> <20160720010005.GB27358@voom.fritz.box> <20160720070111.hf6xdszfzswpeocc@andariel.pipo.sk> <20160721130706.GC12120@voom.fritz.box> <20160721163006.01619356@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: David Gibson , Peter Krempa , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, abologna@redhat.com, bharata@linux.vnet.ibm.com On Thu, 21 Jul 2016 16:30:06 +0200 Igor Mammedov wrote: > On Thu, 21 Jul 2016 23:07:06 +1000 > David Gibson wrote: > > > On Wed, Jul 20, 2016 at 09:01:11AM +0200, Peter Krempa wrote: > > > On Wed, Jul 20, 2016 at 11:00:05 +1000, David Gibson wrote: > > > > On Tue, Jul 19, 2016 at 01:52:40PM +0200, Peter Krempa wrote: > > > > > On Mon, Jul 18, 2016 at 19:19:19 +1000, David Gibson wrote: > > > > > > The spapr implementation of query-hotpluggable-cpus builds the list of > > > > > > hotpluggable cores from the end (most removed from the list head) > > > > > > because that's the easiest way with a singly linked list. Because it > > > > > > also traverses the possible CPU cores starting from low indexes the > > > > > > resulting list has the cpu cores listed in reverse order by core-id. > > > > > > > > > > > > That's not generally harmful, but it means the output from "info > > > > > > hotpluggable-cpus" is a little harder to read than it could be. > > > > > > > > > > > > Therefore, traverse the cpus in reverse order so that the final list > > > > > > ends up in increasing-core-id order. > > > > > > > > > > To make this interface usable with in-order hotplug the ordering of the > > > > > entries should be codified in the schema documentation. (see my response > > > > > on the cover letter for justification). > > > > > > > > I'm not really sure what you mean by this. > > > > > > Currently the order of entries in reply of query-hotpluggable-cpus is > > > arbitrary as this patch hints. > > > > > > If qemu won't support arbitrary order hotplug but libvirt should be able > > > to use the new interface, then the order of replies of > > > query-hotpluggable-cpus need to corelate (in a documented fashion) with > > > the order we need to plug the cpus in. By not documenting any order > > > libvirt can just guess it (by reimplementing the algorithm in qemu). > > > > > I've pointed this out in a sub-thread of the cover-letter. > > > > Right, that's kind of the point of this patch - it makes the order > > returned by query-hotpluggable-cpus match the required order for "in > > order" hotplug. That may not be necessary so - it looks like between > > Igor and myself we might have an eleventh hour way of enabling > > any-order hotplug. > > > > That said, I'm still inclined to push this patch at some point for the > > sake of easier to read debugging output. > it's qmp command output intended for machine parsing, so don't really need it > It is also hmp output as indicated in the changelog with "info hotpluggable-cpus" Cheers. -- Greg