qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Peter Krempa <pkrempa@redhat.com>,
	bharata@linux.vnet.ibm.com, groug@kaod.org, qemu-ppc@nongnu.org,
	abologna@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list
Date: Tue, 26 Jul 2016 11:13:52 +1000	[thread overview]
Message-ID: <20160726011352.GG17429@voom.fritz.box> (raw)
In-Reply-To: <20160725101418.268e37ea@nial.brq.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3788 bytes --]

On Mon, Jul 25, 2016 at 10:14:18AM +0200, Igor Mammedov wrote:
> On Mon, 25 Jul 2016 16:09:04 +1000
> David Gibson <david@gibson.dropbear.id.au> 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.  
> > 
> > So, based on Peter's comments (and others) I've concluded that the
> > cpu-add implementation in terms of the new interface isn't really
> > useful.
> > 
> > However, I think this re-ordering is still a good idea, because:
> >   * It makes info hotpluggable-cpus easier to read in the HMP
> > 
> >   * Although we certainly need a better approach to handling hotplug +
> >     NUMA, correcting the order should allow the existing NUMA
> >     interface to work with only as much guesswork in libvirt as we
> >     already have.
> > 
> >   * We haven't released a qemu with query-hotpluggable-cpus yet, so we
> >     shouldn't need version conditions in order to use the order.
> I've talked with Peter and meanwhile (till we have sane NUMA interface)
> libvirt will be guessing ids based on query-hotpluggable-cpus output
> sorted by socket/core/thread-id, so forward/reverse order won't really
> matter to it.
> 
> Forward sorting is fine wrt 'info hotpluggable-cpus', however it might
> be better to do sorting in HMP callback so that each target won't have
> to do it nor regress command output in future or introduce another
> ordering.
> 
> Considering that ordering affects only HMP won't require any compat
> glue even if it's not fixed in 2.7 release.

Hm, ok, I'll drop this patch.

> 
> > 
> > For that reason I've tentatively merged this patch into ppc-for-2.7.
> > It would be good to get an R-b or A-b from someone before I send a
> > pull request (which I'm hoping to do tomorrow).
> > 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-07-26  1:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18  9:19 [Qemu-devel] [RFC 0/2] cpu-add compatibility for query-hotpluggable-cpus implementations David Gibson
2016-07-18  9:19 ` [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list David Gibson
2016-07-19 11:52   ` Peter Krempa
2016-07-20  1:00     ` David Gibson
2016-07-20  7:01       ` Peter Krempa
2016-07-21 13:07         ` David Gibson
2016-07-21 14:30           ` Igor Mammedov
2016-07-21 14:42             ` Greg Kurz
2016-07-25  6:09         ` David Gibson
2016-07-25  8:14           ` Igor Mammedov
2016-07-26  1:13             ` David Gibson [this message]
2016-07-18  9:19 ` [Qemu-devel] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotpluggable-cpus when available David Gibson
2016-07-18 14:01   ` Peter Krempa
2016-07-19  1:01     ` David Gibson
2016-07-19  4:02     ` Bharata B Rao
2016-07-19  7:51       ` Igor Mammedov
2016-07-19 11:50         ` Peter Krempa
2016-07-18 15:06 ` [Qemu-devel] [RFC 0/2] cpu-add compatibility for query-hotpluggable-cpus implementations Peter Krempa
2016-07-18 16:20   ` Igor Mammedov
2016-07-19  4:28     ` Bharata B Rao
2016-07-19  8:02       ` Igor Mammedov
2016-07-22  3:30       ` David Gibson
2016-07-19 11:19     ` Peter Krempa
2016-07-19  1:09   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160726011352.GG17429@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=abologna@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=groug@kaod.org \
    --cc=imammedo@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).