Re: [PATCHv2 2/3] qemu: Re-detect virtual cpu threads after cpu hot (un)plug.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/11/2012 07:23 AM, Peter Krempa wrote:
> After a cpu hotplug the qemu driver did not refresh information about
> virtual processors used by qemu and their corresponding threads. This
> patch forces a re-detection as is done on start of QEMU.
> 
> This ensures that correct information is reported by the
> virDomainGetVcpus API and "virsh vcpuinfo".
> 
> A failure to obtain the thread<->vcpu mapping is treated non-fatal and
> the mapping is not updated in a case of failure as not all versions of
> QEMU report this in the info cpus command.
> ---
> Diff to v1:
> - don't fail the call if cpu thread detection fails
> - fix memory leak when overwriting the priv->vcpupids array
> ---
>  src/qemu/qemu_driver.c |   29 +++++++++++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
> 

> @@ -3373,11 +3375,38 @@ static int qemudDomainHotplugVcpus(struct qemud_driver *driver,
>          }
>      }
> 
> +    /* hotplug succeeded */
> +
>      ret = 0;
> 
> +    /* After hotplugging the CPUs we need to re-detect threads corresponding
> +     * to the virtual CPUs. Some older versions don't provide the thread ID
> +     * or don't have the "info cpus" (and they don't support mutliple CPUs

s/mutliple/multiple/

> +     * anyways) command, so errors in the re-detection will not be treated

s/"info cpus" (...) command/"info cpus" command (...)/

ACK with comment fix.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]