Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Bharata B Rao
On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before 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

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Peter Maydell
On 8 December 2014 at 09:16, Bharata B Rao bharata@gmail.com wrote: 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

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Gu Zheng
Hi Bharata, On 12/08/2014 05:16 PM, Bharata B Rao wrote: On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. But we

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Gu Zheng
Hi Peter, On 12/08/2014 05:26 PM, Peter Maydell wrote: On 8 December 2014 at 09:16, Bharata B Rao bharata@gmail.com wrote: 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

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Peter Maydell
On 8 December 2014 at 10:28, Gu Zheng guz.f...@cn.fujitsu.com wrote: Yes, it's a limitation now, but it is not the final implementation. As to the QEMU side, the vcpu object in kernel is stateless, and a reset operation will be done when we hot add a vcpu, so I think we can kill the

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Igor Mammedov
On Mon, 8 Dec 2014 10:50:21 + Peter Maydell peter.mayd...@linaro.org wrote: On 8 December 2014 at 10:28, Gu Zheng guz.f...@cn.fujitsu.com wrote: Yes, it's a limitation now, but it is not the final implementation. As to the QEMU side, the vcpu object in kernel is stateless, and a reset

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Peter Maydell
On 8 December 2014 at 15:38, Igor Mammedov imamm...@redhat.com wrote: On Mon, 8 Dec 2014 10:50:21 + Peter Maydell peter.mayd...@linaro.org wrote: Why can't the kernel handle our just destroying the vcpu and later recreating it if necessary? That seems the more logical approach than trying

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-12-08 Thread Gu Zheng
+cc Gleb, KVM guys, On 12/09/2014 12:38 AM, Peter Maydell wrote: On 8 December 2014 at 15:38, Igor Mammedov imamm...@redhat.com wrote: On Mon, 8 Dec 2014 10:50:21 + Peter Maydell peter.mayd...@linaro.org wrote: Why can't the kernel handle our just destroying the vcpu and later

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Gu Zheng
Hi Bharata, On 09/12/2014 09:52 PM, Bharata B Rao wrote: On Fri, Sep 12, 2014 at 4:23 PM, Anshul Makkar anshul.mak...@profitbricks.com wrote: During plugging we can see this event: echo 1 cpu8/online. But during unplugging , we can't see the event echo 0 cpu8/online. That's because I

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Bharata B Rao
On Mon, Sep 15, 2014 at 12:09 PM, Gu Zheng guz.f...@cn.fujitsu.com wrote: Hi Bharata, On 09/12/2014 09:52 PM, Bharata B Rao wrote: On Fri, Sep 12, 2014 at 4:23 PM, Anshul Makkar anshul.mak...@profitbricks.com wrote: During plugging we can see this event: echo 1 cpu8/online. But during

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Anshul Makkar
That explains the cause. Please verify you have the iasl compiler installed and are not using the hold .hex (compile .dsl ) files. (Faced this issue in our build setup using sbuil.). I hope you have verified that your .dsl file has the changes as mentioned in the patch. I have also verified

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Bharata B Rao
On Mon, Sep 15, 2014 at 4:03 PM, Anshul Makkar anshul.mak...@profitbricks.com wrote: That explains the cause. Please verify you have the iasl compiler installed and are not using the hold .hex (compile .dsl ) files. (Faced this issue in our build setup using sbuil.). I hope you have

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Anshul Makkar
Great !! Anshul Makkar On Mon, Sep 15, 2014 at 3:53 PM, Bharata B Rao bharata@gmail.com wrote: On Mon, Sep 15, 2014 at 4:03 PM, Anshul Makkar anshul.mak...@profitbricks.com wrote: That explains the cause. Please verify you have the iasl compiler installed and are not using the

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-14 Thread Gu Zheng
Hi Igor, On 09/12/2014 10:15 PM, Igor Mammedov wrote: On Thu, 28 Aug 2014 11:36:42 +0800 Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. But

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Bharata B Rao
On Fri, Sep 12, 2014 at 6:54 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: Is guest os enabled acpi cpu hotplug? What's the guest's cpu info? Please try latest QEMU, and any feedback is welcome. Tried with latest QEMU git + your patchset and Fedora 20 guest, but QEMU monitor still shows the

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Anshul Makkar
During plugging we can see this event: echo 1 cpu8/online. But during unplugging , we can't see the event echo 0 cpu8/online. Just for additional check, in my code I have added following udev rule echo 0 cpu[0-9]*/online. May be this is of any help. Thanks Anshul Makkar On Fri, Sep 12,

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Bharata B Rao
On Fri, Sep 12, 2014 at 4:23 PM, Anshul Makkar anshul.mak...@profitbricks.com wrote: During plugging we can see this event: echo 1 cpu8/online. But during unplugging , we can't see the event echo 0 cpu8/online. That's because I didn't do that explicitly, was always trying to remove an online

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Igor Mammedov
On Thu, 28 Aug 2014 11:36:42 +0800 Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before 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,

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Anshul Makkar
I have tested with 3.11 kernel, Kernel should be fine.. But it wouldn't harm testing with latest kernel, may be it can provide some extra hints.. Anshul Makkar On Fri, Sep 12, 2014 at 3:52 PM, Bharata B Rao bharata@gmail.com wrote: On Fri, Sep 12, 2014 at 4:23 PM, Anshul Makkar

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Bharata B Rao
On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before 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

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Gu Zheng
On 09/11/2014 05:35 PM, Bharata B Rao wrote: On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. But we do not

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Anshul Makkar
Bharata, this not expected. info cpus should indicate report proper number of cpus after deletion. Anshul Makkar On Thu, Sep 11, 2014 at 11:35 AM, Bharata B Rao bharata@gmail.com wrote: from

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Gu Zheng
On 09/11/2014 05:35 PM, Bharata B Rao wrote: On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. But we do not

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Bharata B Rao
On Thu, Sep 11, 2014 at 3:23 PM, Gu Zheng guz.f...@cn.fujitsu.com wrote: On 09/11/2014 05:35 PM, Bharata B Rao wrote: On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Gu Zheng
Hi Bharata, On 09/11/2014 08:37 PM, Bharata B Rao wrote: On Thu, Sep 11, 2014 at 3:23 PM, Gu Zheng guz.f...@cn.fujitsu.com wrote: On 09/11/2014 05:35 PM, Bharata B Rao wrote: On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU,

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-09 Thread Igor Mammedov
On Thu, 28 Aug 2014 11:36:42 +0800 Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before 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,

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-09 Thread Gu Zheng
Hi Igor, On 09/09/2014 10:40 PM, Igor Mammedov wrote: On Thu, 28 Aug 2014 11:36:42 +0800 Gu Zheng guz.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. But

[Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-08-27 Thread Gu Zheng
After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before 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. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com