[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 0/5] sPAPR: Fix migration when CPUs are r
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 0/5] sPAPR: Fix migration when CPUs are removed in random order |
Date: |
Fri, 8 Jul 2016 15:34:20 +1000 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Thu, Jul 07, 2016 at 06:04:10PM +0200, Greg Kurz wrote:
> On Thu, 7 Jul 2016 20:20:20 +0530
> Bharata B Rao <address@hidden> wrote:
>
> > device_add/del based CPU hotplug and unplug support is upstream for
> > sPAPR PowerPC and is under development for x86. Both of these will
> > support CPU device removal in random order (and not necessarily in LIFO
> > order). Random order removal will result in holes in cpu_index range
> > which causes migration to fail. This needs fixes in both generic code
> > as well as arch specific code.
> >
> > - CPUState::stable_cpu_id is newly introduced and used as instance_id when
> > registering CPU devices using vmstate_register. stable_cpu_id is set by
> > the
> > target machine code. To support forward migration, as per Igor's
> > suggestion, this needs to be done conditionally based on machine type
> > version.
> > - From pseries-2.7 onwards, we start using stable_cpu_id for migration as
> > well as in XICS code.
> >
> > vmstate registration calls are moved to cpu_common_realizefn and newly
> > introduced cpu_common_unrealizefn.
> >
> > This patchset depends on Greg Kurz's patchset where among other things,
> > he is deriving cpu_dt_it (which is stable_cpu_id for pseries-2.7 onwards)
> > based on core-id and hence is based on ppc-vcpu-dt-id-rework branch of his
> > tree.
> >
>
> I'm not very comfortable with this. Shouldn't it be the other way round
> actually: cpu_dt_id depending on stable_cpu_id ?
>
> I think we're missing something like a stable_core_id.
The core-id is already stable.
Deriving the stable vcpu id from the core id is correct.
cpu_dt_id should actually go away, and we should just use
stable_cpu_id when creating 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
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [RFC PATCH v2 2/5] cpu: Introduce CPUState::stable_cpu_id, (continued)