qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v4 01/11] exec: Remove cpu from cpus list du


From: Bharata B Rao
Subject: Re: [Qemu-devel] [RFC PATCH v4 01/11] exec: Remove cpu from cpus list during cpu_exec_exit()
Date: Wed, 9 Sep 2015 11:22:46 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Sep 04, 2015 at 03:31:24PM +1000, David Gibson wrote:
> On Thu, Aug 06, 2015 at 10:57:07AM +0530, Bharata B Rao wrote:
> > CPUState *cpu gets added to the cpus list during cpu_exec_init(). It
> > should be removed from cpu_exec_exit().
> > 
> > cpu_exec_init() is called from generic CPU::instance_finalize and some
> > archs like PowerPC call it from CPU unrealizefn. So ensure that we
> > dequeue the cpu only once.
> > 
> > Instead of introducing a new field CPUState.queued, I could have used
> > CPUState.cpu_index to check if the cpu is already dequeued from the list.
> > Since that doesn't work for CONFIG_USER_ONLY, I had to add a new field.
> > 
> > Signed-off-by: Bharata B Rao <address@hidden>
> 
> This seems reasonable to me, but I'm wondering how x86 cpu hotplug /
> unplug is working without it.

x86 hotplug/unplug code currently resides in Zhu's git tree
(git://github.com/zhugh/qemu). They are removing the CPU from the list
explicitly in x86 CPU's instance_finalize routine.

Since we add CPU to the list in cpu_exec_init(), I thought it makes
sense to remove it in cpu_exec_exit().

May be it makes sense to separately purse this patch and the next one
so that other archs are also taken into account correctly.

Regards,
Bharata.




reply via email to

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