From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSFoO-00047d-6I for qemu-devel@nongnu.org; Thu, 11 Sep 2014 21:38:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSFoG-0000vV-Oa for qemu-devel@nongnu.org; Thu, 11 Sep 2014 21:38:08 -0400 Received: from [59.151.112.132] (port=43628 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSFoG-0000vK-DH for qemu-devel@nongnu.org; Thu, 11 Sep 2014 21:38:00 -0400 Message-ID: <54124B47.2050504@cn.fujitsu.com> Date: Fri, 12 Sep 2014 09:24:23 +0800 From: Gu Zheng MIME-Version: 1.0 References: <1409197002-9498-1-git-send-email-guz.fnst@cn.fujitsu.com> <1409197002-9498-11-git-send-email-guz.fnst@cn.fujitsu.com> <54117105.8000007@cn.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: "qemu-devel@nongnu.org" , tangchen@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, anshul.makkar@profitbricks.com, chen.fan.fnst@cn.fujitsu.com, imammedo@redhat.com, "afaerber@suse.de" Hi Bharata, On 09/11/2014 08:37 PM, Bharata B Rao wrote: > On Thu, Sep 11, 2014 at 3:23 PM, Gu Zheng wrote= : >> On 09/11/2014 05:35 PM, Bharata B Rao wrote: >> >>> On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng wro= te: >>>> After ACPI get a signal to eject a vCPU, the vCPU must be >>>> removed from CPU list=EF=BC=8Cbefore the vCPU really removed, then >>>> release the all related vCPU objects. >>>> But we do not close KVM vcpu fd, just record it into a list, in >>>> order to reuse it. >>> >>> After I add and delete a CPU, "info cpus" from monitor still lists the >>> removed CPU. Is this expected ? >> >> No, you can not see the removed cpu from QEMU (e.g. monitor) or guest si= de, >> but from the kernel side it is still there, just no one uses it any more= . >=20 > I am trying your patches, but still see the removed CPU after deletion. >=20 > (qemu) info cpus > * CPU #0: pc=3D0xffffffff8100b82c (halted) thread_id=3D7812 > CPU #1: pc=3D0xffffffff8100b82c (halted) thread_id=3D7813 > CPU #2: pc=3D0xffffffff8100b82c (halted) thread_id=3D7814 > CPU #3: pc=3D0xffffffff8100b82c (halted) thread_id=3D7815 > CPU #4: pc=3D0xffffffff8100b82c (halted) thread_id=3D7816 > CPU #5: pc=3D0xffffffff8100b82c (halted) thread_id=3D7817 > CPU #6: pc=3D0xffffffff8100b82c (halted) thread_id=3D7818 > CPU #7: pc=3D0xffffffff8100b82c (halted) thread_id=3D7819 > (qemu) device_add qemu64-x86_64-cpu,id=3Dcpu8 > (qemu) info cpus > * CPU #0: pc=3D0xffffffff8100b82c (halted) thread_id=3D7812 > CPU #1: pc=3D0xffffffff8100b82c (halted) thread_id=3D7813 > CPU #2: pc=3D0xffffffff8100b82c (halted) thread_id=3D7814 > CPU #3: pc=3D0xffffffff8100b82c (halted) thread_id=3D7815 > CPU #4: pc=3D0xffffffff8100b82c (halted) thread_id=3D7816 > CPU #5: pc=3D0xffffffff8100b82c (halted) thread_id=3D7817 > CPU #6: pc=3D0xffffffff8100b82c (halted) thread_id=3D7818 > CPU #7: pc=3D0xffffffff8100b82c (halted) thread_id=3D7819 > CPU #8: pc=3D0xffffffff8100b82c (halted) thread_id=3D8041 > (qemu) device_del cpu8 > (qemu) info cpus > * CPU #0: pc=3D0xffffffff8100b82c (halted) thread_id=3D7812 > CPU #1: pc=3D0xffffffff8100b82c (halted) thread_id=3D7813 > CPU #2: pc=3D0xffffffff8100b82c (halted) thread_id=3D7814 > CPU #3: pc=3D0xffffffff8100b82c (halted) thread_id=3D7815 > CPU #4: pc=3D0xffffffff8100b82c (halted) thread_id=3D7816 > CPU #5: pc=3D0xffffffff8100b82c (halted) thread_id=3D7817 > CPU #6: pc=3D0xffffffff8100b82c (halted) thread_id=3D7818 > CPU #7: pc=3D0xffffffff8100b82c (halted) thread_id=3D7819 > CPU #8: pc=3D0xffffffff81031722 (halted) thread_id=3D8041 >=20 > I applied your patchset on commit 69f87f713069f1f70, may be I should > try with latest QEMU ? Is guest os enabled acpi cpu hotplug? What's the guest's cpu info? Please try latest QEMU, and any feedback is welcome. Thanks, Gu >=20 > Regards, > Bharata. > . >=20