From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwoDc-0007Mm-QE for qemu-devel@nongnu.org; Thu, 12 Nov 2015 04:31:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwoDZ-000894-EW for qemu-devel@nongnu.org; Thu, 12 Nov 2015 04:31:00 -0500 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:51226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwoDY-00088n-Rc for qemu-devel@nongnu.org; Thu, 12 Nov 2015 04:30:57 -0500 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Nov 2015 15:00:53 +0530 Date: Thu, 12 Nov 2015 15:00:38 +0530 From: Bharata B Rao Message-ID: <20151112093038.GA17747@in.ibm.com> References: <1438838837-28504-1-git-send-email-bharata@linux.vnet.ibm.com> <1438838837-28504-2-git-send-email-bharata@linux.vnet.ibm.com> <20150904053124.GV6537@voom.redhat.com> <20150909055246.GD17433@in.ibm.com> <55EFE2AA.7060500@cn.fujitsu.com> <20150909075600.GI17433@in.ibm.com> <564457A6.9020800@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <564457A6.9020800@cn.fujitsu.com> Subject: Re: [Qemu-devel] [RFC PATCH v4 01/11] exec: Remove cpu from cpus list during cpu_exec_exit() Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhu Guihua Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, guijianfeng@cn.fujitsu.com, izumi.taku@jp.fujitsu.com, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, imammedo@redhat.com, nfont@linux.vnet.ibm.com, afaerber@suse.de, kamezawa.hiroyu@jp.fujitsu.com, David Gibson On Thu, Nov 12, 2015 at 05:11:02PM +0800, Zhu Guihua wrote: > Hi Bharata, > > On 09/09/2015 03:56 PM, Bharata B Rao wrote: > >On Wed, Sep 09, 2015 at 03:41:30PM +0800, Zhu Guihua wrote: > >>On 09/09/2015 01:52 PM, Bharata B Rao wrote: > >>>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 > >>>>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. > >>Sorry, my git tree is git://github.com/zhuguihua/qemu > >> > >>Now there was no progress about topology, so we don't know what will happen > >>in x86. I am not sure whether we will take this method finally. > >Andreas had a presentation on this topic in KVM forum recently. > > > >Andreas - do you have any updates on the topology and other aspects > >of CPU hotplug so that we can align the CPU hotplug work in different > >archs accordingly and hope to get it merged in 2.5 time frame ? > > Do you update the patchset? > > My work in x86 has stopped for a while, Maybe I can get some ideas from > another > arch's worker. My last version is here: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00650.html I initally started with core level CPU hotplug, moved to socket level hotplug based on Andreas' patchset and then moved back again to core level hotplug. I was a bit confused about how the generic semantics would evovle and hence the work got delayed. I wil be posting the next version of my patchset based on core level semantics soon. I am hoping that I should be able to get CPU hotplug/unplug included in QEMU-2.6 timeframe. Regards, Bharata.