From: David Gibson <david@gibson.dropbear.id.au>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Alexander Graf <agraf@suse.de>, Riku Voipio <riku.voipio@iki.fi>,
qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 6/8] spapr: init CPUState->cpu_index with index relative to core-id
Date: Fri, 22 Jul 2016 17:14:33 +1000 [thread overview]
Message-ID: <20160722071433.GX15941@voom.fritz.box> (raw)
In-Reply-To: <20160722061003.GD7036@in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]
On Fri, Jul 22, 2016 at 11:40:03AM +0530, Bharata B Rao wrote:
> On Fri, Jul 22, 2016 at 01:23:01PM +1000, David Gibson wrote:
> > On Thu, Jul 21, 2016 at 05:54:37PM +0200, Igor Mammedov wrote:
> > > It will enshure that cpu_index for a given cpu stays the same
> > > regardless of the order cpus has been created/deleted and so
> > > it would be possible to migrate QEMU instance with out of order
> > > created CPU.
> > >
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> >
> > So, this isn't quite right (it wasn't right in my version either).
> >
> > The problem occurs when smp_threads < kvmppc_smt_threads(). That is,
> > when the requested threads-per-core is less than the hardware's
> > maximum number of threads-per-core.
> >
> > The core-id values are assigned essentially as i *
> > kvmppc_smt_threads(), meaning the patch below will leave gaps in the
> > cpu_index values and the last ones will exceed max_cpus, causing other
> > problems.
>
> This would lead to hotplug failures as cpu_dt_id is still being
> derived from non-contiguous cpu_index resulting in wrong enumeration
> of CPU nodes in DT.
Which "This" are you referring to?
>
> For -smp 8,threads=4 we see the following CPU nodes in DT
>
> PowerPC,POWER8@0 PowerPC,POWER8@10
>
> which otherwise should have been
>
> PowerPC,POWER8@0 PowerPC,POWER8@8
>
> The problem manifests as drmgr failure.
>
> Greg's patchset that moved cpu_dt_id setting to machine code and that
> derived cpu_dt_id from core-id for sPAPR would be needed to fix this
> I guess.
No, it shouldn't be necessary to fix it. But we certainly do want to
clean this stuff up. I'm not terribly convinced by the current
approach in Greg's series though. I'd actually prefer to remove
cpu_dt_id from the cpustate entirely and instead work it out from the
(now stable) cpu index when we go to construct the device tree.
--
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 --]
next prev parent reply other threads:[~2016-07-22 7:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 15:54 [Qemu-devel] [PATCH 0/8] Fix migration issues with arbitrary cpu-hot(un)plug Igor Mammedov
2016-07-21 15:54 ` [Qemu-devel] [PATCH 1/8] exec: reduce CONFIG_USER_ONLY ifdeffenery Igor Mammedov
2016-07-22 1:30 ` David Gibson
2016-07-21 15:54 ` [Qemu-devel] [PATCH 2/8] exec: don't use cpu_index to detect if cpu_exec_init()'s been called for cpu Igor Mammedov
2016-07-22 1:32 ` David Gibson
2016-07-22 20:46 ` Eduardo Habkost
2016-07-25 8:30 ` Igor Mammedov
2016-07-21 15:54 ` [Qemu-devel] [PATCH 3/8] exec: set cpu_index only if it's been explictly set Igor Mammedov
2016-07-22 1:35 ` David Gibson
2016-07-21 15:54 ` [Qemu-devel] [PATCH 4/8] qdev: fix object reference leak in case device.realize() fails Igor Mammedov
2016-07-22 1:39 ` David Gibson
2016-07-21 15:54 ` [Qemu-devel] [PATCH 5/8] pc: init CPUState->cpu_index with index in possible_cpus[] Igor Mammedov
2016-07-22 1:41 ` David Gibson
2016-07-21 15:54 ` [Qemu-devel] [PATCH 6/8] spapr: init CPUState->cpu_index with index relative to core-id Igor Mammedov
2016-07-22 3:23 ` David Gibson
2016-07-22 6:10 ` Bharata B Rao
2016-07-22 7:14 ` David Gibson [this message]
2016-07-22 7:20 ` Bharata B Rao
2016-07-22 8:42 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-07-26 3:27 ` [Qemu-devel] " David Gibson
2016-07-21 15:54 ` [Qemu-devel] [PATCH 7/8] Revert "pc: Enforce adding CPUs contiguously and removing them in opposite order" Igor Mammedov
2016-07-21 15:54 ` [Qemu-devel] [PATCH 8/8] Revert "spapr: Ensure CPU cores are added contiguously and removed in LIFO order" Igor Mammedov
2016-07-21 21:56 ` [Qemu-devel] [PATCH 0/8] Fix migration issues with arbitrary cpu-hot(un)plug Michael S. Tsirkin
2016-07-22 4:35 ` David Gibson
2016-07-22 10:01 ` Igor Mammedov
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=20160722071433.GX15941@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=bharata@linux.vnet.ibm.com \
--cc=crosthwaite.peter@gmail.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
/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).