[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects
From: |
Matthew Rosato |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects |
Date: |
Fri, 20 Nov 2015 08:37:40 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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 <address@hidden>
>>
>> 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/address@hidden/msg102839.html
>>
>> Signed-off-by: Chen Fan <address@hidden>
>> Signed-off-by: Gu Zheng <address@hidden>
>> Signed-off-by: Zhu Guihua <address@hidden>
>> Signed-off-by: Bharata B Rao <address@hidden>
>> [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
- [Qemu-devel] [PATCH v2 0/9] s390: Allow hotplug of s390 CPUs, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 6/9] s390x/cpu: Add functions to (un)register CPU state, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 4/9] s390x/cpu: Set initial CPU state in common routine, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 5/9] s390x/cpu: Move some CPU initialization into realize, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 3/9] s390x/cpu: Cleanup init in preparation for hotplug, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 2/9] cpus: Add a sync version of cpu_remove(), Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 7/9] s390x/cpu: Extra cleanup during CPU finalize, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 9/9] s390x/cpu: Allow hot plug/unplug of CPUs, Matthew Rosato, 2015/11/19
- [Qemu-devel] [PATCH v2 8/9] s390/virtio-ccw: Add hotplug handler and prepare for unplug, Matthew Rosato, 2015/11/19