qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 00/23] CPU and Memory hotplug


From: Igor Mammedov
Subject: Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 00/23] CPU and Memory hotplug for PowerPC sPAPR guests
Date: Tue, 7 Apr 2015 10:57:04 +0200

On Mon, 6 Apr 2015 15:49:24 +0530
Bharata B Rao <address@hidden> wrote:

> On Mon, Mar 23, 2015 at 07:05:41PM +0530, Bharata B Rao wrote:
> > Hi,
> > 
> > This is the version 2 of the patchset that provides CPU and memory hotplug
> > support for PowerPC sPAPR guests.
> 
> [snip]
> 
> > TODOs
> > -----
> > - Share code between pc_dimm_plug() and spapr_memory_plug().
> > - Make the algorithm that looks up the NUMA node given the physical address
> >   more efficient.
> > - Test/enable migration after hotplug.
> 
> While I am using a bitmap based CPU enumeration (patch 14/23 in this 
> patchset),
> to correctly support CPU hot removal, it appears that supporting hot removal
> with migration is non trivial if we allow removal in arbitrary order and
> not necessarily remove-last-added-cpu-first order.
> 
> If there are holes in CPU index map (like 0-15,20-23) at the source VM
> due to hot removal, the CPU index map at the target VM will be 0-19 by
> default.
> 
> I see there was a patch to solve somewhat similar problem on x86 last year
> (https://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg01607.html), but
> don't see it being pursued further.
show stopper for that patch that we do not want to expose target specific way
to address CPU (and APIC is exactly this), to avoid users needs to calculate
that ID manually (which is not trivial in APIC ID case).
 
> What would be the ideal or recommended way to solve this problem ? Easiest
> would be to enforce hot removal in LIFO order, but I guess that would be
> restrictive.
That's I think where sockets concept (at least on user visible side could help).

something like you start qemu with:

QEMU -smp 2,sockets=4,cores=2,maxcpus=8

hotadd:

device_add MYCPUTYPE,socket=2,core=1,id=foo1
device_add MYCPUTYPE,socket=2,core=2,id=foo2

hotremove:

device_del id=foo1

then on destination host you start qemu:

QEMU -smp 2,sockets=4,cores=2,maxcpus=8 -device 
MYCPUTYPE,socket=2,core=2,id=foo2

i.e. CPUs behave the same way as any other devices wrt migration.
initial CPUs /-smp 2/ are not hotpluggable since they doesn't have id assigned, 
same as other devices.

> 
> Regards,
> Bharata.
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]