All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Igor Mammedov <imammedo@redhat.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH RFC] spapr: disintricate core-id from DT semantics
Date: Wed, 27 Jul 2016 12:06:17 +0200	[thread overview]
Message-ID: <20160727120617.7c3eb34d@kaod.org> (raw)
In-Reply-To: <20160725060131.GJ24621@voom.fritz.box>

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

Le Mon, 25 Jul 2016 16:01:31 +1000,
David Gibson <david@gibson.dropbear.id.au> a écrit :

> On Fri, Jul 22, 2016 at 01:10:36PM +0200, Greg Kurz wrote:
> > The goal of this patch is to have a stable core-id which does not depend
> > on any DT related semantics, which involve non-obvious computations on
> > modern PowerPC server cpus.
> > 
> > With this patch, the DT core id is computed on-demand as:
> > 
> >        (core-id / smp_threads) * smt
> > 
> > where smt is the number of threads per core in the host.
> > 
> > This formula should be consolidated in a helper since it is needed in
> > several places.  
> 
> It's a little odd you node this but don't do so.
> 

I was too busy packing for holidays already :) and I think the consolidation
work can be addressed in followup patches.

Cheers from Brittany, under the rain.

--
Greg

> > Other uses for core-id includes: compute a stable cpu_index (which
> > allows random order hotplug/unplug without breaking migration) and
> > NUMA.
> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---
> > 
> > It was first suggested here:
> > 
> > https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01727.html
> > 
> > and as option 1) in the following discussion on IRC:
> > 
> > <dwg> imammedo, basically the options are: 1) change core-ids to be
> >  0, 1, .. n and compute cpu_index as core_id * threads + thread#, or
> >  2) leave core-ids as they are and calculate cpu_index as
> >  core-id / smt * threads + thread#
> > 
> > It is based on David's ppc-for-2.7 branch (commit bb6268f35f457).
> > 
> > It is lightly tested but I could at least do in-order
> > hotplug/unplug.  
> 
> I think this is basically the right approach, and I've applied to
> ppc-for-2.7.  Here's my plan for what to do about all this id stuff:
> 
>   1. Merge this to ppc-for-2.7 (done)
>   2. Assuming there are now show-stoppers in testing, send a pull
>      request tomorrow
>   3. Once this is merged, try to get Igor's series (or a respin of it)
>      in ASAP.
> 
> I'm hoping that will give us good-enough hotplug for 2.7.
> 
> In the 2.8 timeframe, I want to:
>   4. Disconnect KVM vcpu ID from dt_id, instead calculate it from (now
>      stable) cpu_index
>   5. Remove dt_id as a cpu field - instead just compute DT ids from
>      the (now stable) cpu_index when we build the DT
>   6. (for new machine type versions) Change DT ID assignment, so it
>       no longer depends on kvmppc_smt_threads().  The current scheme
>       means that migration between hosts with different native SMT
>       values won't work, which is unfortunate.  I suspect there may be
>       other problems with any real situation where that's the case,
>       but nontheless it's a silly restriction.
> 
> Nice to have but bigger scope things for 2.8:
>   7. Update archs to they *all* call cpu_exec_init() / cpu_exec_exit()
>      at realize / unrealize time instead of init / finalize time.
>   8. Update all archs and machines to use stable cpu_index
> 


[-- Attachment #2: Signature digitale OpenPGP --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-07-27 10:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 11:10 [Qemu-devel] [PATCH RFC] spapr: disintricate core-id from DT semantics Greg Kurz
2016-07-25  6:01 ` David Gibson
2016-07-27 10:06   ` Greg Kurz [this message]
2016-07-27 23:33     ` 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=20160727120617.7c3eb34d@kaod.org \
    --to=groug@kaod.org \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=imammedo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.