From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzbWy-0006Ia-ND for qemu-devel@nongnu.org; Thu, 19 Nov 2015 21:34:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzbWv-0003gI-G2 for qemu-devel@nongnu.org; Thu, 19 Nov 2015 21:34:32 -0500 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:51425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzbWu-0003fw-S0 for qemu-devel@nongnu.org; Thu, 19 Nov 2015 21:34:29 -0500 Received: from localhost by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Nov 2015 12:34:21 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 6C41E3578047 for ; Fri, 20 Nov 2015 13:34:19 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAK2Y4v722806624 for ; Fri, 20 Nov 2015 13:34:12 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAK2Xkwd027298 for ; Fri, 20 Nov 2015 13:33:46 +1100 Date: Fri, 20 Nov 2015 08:03:24 +0530 From: Bharata B Rao Message-ID: <20151120023324.GA32166@in.ibm.com> References: <1447945814-15765-1-git-send-email-mjrosato@linux.vnet.ibm.com> <1447945814-15765-2-git-send-email-mjrosato@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447945814-15765-2-git-send-email-mjrosato@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matthew Rosato Cc: Zhu Guihua , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, Gu Zheng , Chen Fan , cornelia.huck@de.ibm.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net On Thu, Nov 19, 2015 at 10:10:06AM -0500, Matthew Rosato wrote: > From: Gu Zheng > > In order to deal well with the kvm vcpus (which can not be removed without any > protection), we do not close KVM vcpu fd, just record and mark it as stopped > into a list, so that we can reuse it for the appending cpu hot-add request if > possible. It is also the approach that kvm guys suggested: > https://www.mail-archive.com/kvm@vger.kernel.org/msg102839.html > > Signed-off-by: Chen Fan > Signed-off-by: Gu Zheng > Signed-off-by: Zhu Guihua > Signed-off-by: Bharata B Rao > [Explicit CPU_REMOVE() from qemu_kvm/tcg_destroy_vcpu() > isn't needed as it is done from cpu_exec_exit()] I didn't look very closely but the patch that removes cpu from the list from cpu_exec_exit() isn't part of this series. The above change requires https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00656.html I have just cleaned that patch a bit and will be posting early next week with another patch that does CPU vmstate unregistration too from cpu_exec_exit(). I think since we do vmstate registration from cpu_exec_init() it makes sense to do unregistration from cpu_exec_exit() instead of archs doing it themselves. I had a version of this at https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00649.html With the above patch, you woudn't need 7/9 in this series. Regards, Bharata.