[libvirt] [PATCH] qemu: Limit refresh of CPU halted state to s390

Peter Krempa pkrempa at redhat.com
Tue Feb 6 10:55:07 UTC 2018


On Tue, Feb 06, 2018 at 11:18:56 +0100, Viktor Mihajlovski wrote:
> Refreshing the halted state can cause VM performance issues. Since
> s390 is currently the only architecture with a known interest in
> the halted state, we're avoiding to call QEMU on other platforms.
> 
> Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
> ---
>  src/qemu/qemu_domain.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index df433c2..d2c833f 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -8634,6 +8634,10 @@ qemuDomainRefreshVcpuHalted(virQEMUDriverPtr driver,
>      if (vm->def->virtType == VIR_DOMAIN_VIRT_QEMU)
>          return 0;
>  
> +    /* Only supported on s390(x) */
> +    if (!ARCH_IS_S390(vm->def->os.arch))
> +        return 0;

I think we also should remove the 'halted' field from the stats output
if the information was not gathered at all, since it would falsely reply
that the cpu is not halted all the time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180206/4fa02c18/attachment-0001.sig>


More information about the libvir-list mailing list