From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzlsu-0003eg-UL for qemu-devel@nongnu.org; Fri, 20 Nov 2015 08:37:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zzlsq-0003Zk-Pi for qemu-devel@nongnu.org; Fri, 20 Nov 2015 08:37:52 -0500 Received: from e18.ny.us.ibm.com ([129.33.205.208]:49400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzlsq-0003Za-Ll for qemu-devel@nongnu.org; Fri, 20 Nov 2015 08:37:48 -0500 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Nov 2015 08:37:48 -0500 Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 39943C90046 for ; Fri, 20 Nov 2015 08:25:55 -0500 (EST) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAKDbjKX19988590 for ; Fri, 20 Nov 2015 13:37:45 GMT Received: from d01av03.pok.ibm.com (localhost [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAKDbhQ3016798 for ; Fri, 20 Nov 2015 08:37:44 -0500 References: <1447945814-15765-1-git-send-email-mjrosato@linux.vnet.ibm.com> <1447945814-15765-2-git-send-email-mjrosato@linux.vnet.ibm.com> <20151120023324.GA32166@in.ibm.com> From: Matthew Rosato Message-ID: <564F2224.6060103@linux.vnet.ibm.com> Date: Fri, 20 Nov 2015 08:37:40 -0500 MIME-Version: 1.0 In-Reply-To: <20151120023324.GA32166@in.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bharata@linux.vnet.ibm.com Cc: Zhu Guihua , cornelia.huck@de.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, Chen Fan , Gu Zheng , pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net On 11/19/2015 09:33 PM, Bharata B Rao wrote: > 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. > Hi Bharata -- Looking at the mailing list discussion from your patch set, I got the impression that handling this in cpu_exec_exit() might not be acceptable for all architectures. So, my patch just tries to handle the s390 case in patch 7/9, doing list removal and vmstate unregistration. FWIW, the 2 patches you referenced would be fine for s390, so if you can get those approved I'd have no problem dropping 7/9 in favor of your patches. Matt