From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxvY3-00027i-3z for qemu-devel@nongnu.org; Mon, 08 Dec 2014 05:28:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxvXy-0006dY-GE for qemu-devel@nongnu.org; Mon, 08 Dec 2014 05:28:11 -0500 Received: from [59.151.112.132] (port=26025 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxvXy-0006bq-2o for qemu-devel@nongnu.org; Mon, 08 Dec 2014 05:28:06 -0500 Message-ID: <5485797B.80906@cn.fujitsu.com> Date: Mon, 8 Dec 2014 18:12:11 +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> 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 , ChenFan , Igor Mammedov , "afaerber@suse.de" Hi Bharata, On 12/08/2014 05:16 PM, Bharata B Rao wrote: > On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng wrote= : >> 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. >=20 > Hi Gu Zheng, >=20 > So this approach of parking the vcpu fd in QEMU and reusing it next > time during CPU hotplug will only work if all architectures supported > by KVM driver are ok with reuse of vcpu object in the kernel. I am > using relevant bits of this patch of yours with PowerPC architecture > to support cpu unplug and I realize that there is at least one case > where reuse of vcpu object in the kernel causes problems. Before I > attempt to fix that in ppc KVM, I wanted to check if there is > consensus on this approach (parking and reusing kvm vcpu fd) in QEMU. Not yet, also no objection. But it's the best way that I can find to handle the vcpu object without touching the CPU array in kernel. >=20 > Also is there a latest version of this patchset that I can try ? A new version is on the respinning, and will be sent out once the 2.2 relea= sed. Thanks, Gu >=20 > Regards, > Bharata. > . >=20