[libvirt PATCH 1/2] qemu: support kvm-poll-control performance hint
Michal Privoznik
mprivozn at redhat.com
Tue Nov 17 13:41:47 UTC 2020
On 11/13/20 9:49 AM, Tim Wiederhake wrote:
> QEMU version 4.2 introduced a performance feature under commit
> d645e13287 ("kvm: i386: halt poll control MSR support").
>
> This patch adds a new KVM feature 'poll-control' to set this performance
> hint for KVM guests. The feature is off by default.
>
> To enable this hint and have libvirt add "-cpu host,kvm-poll-control=on"
> to the QEMU command line, the following XML code needs to be added to the
> guest's domain description:
>
> <features>
> <kvm>
> <poll-control state='on'/>
> </kvm>
> </features>
>
> Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
> ---
> docs/formatdomain.rst | 14 ++++++++------
> docs/schemas/domaincommon.rng | 5 +++++
> src/conf/domain_conf.c | 4 ++++
> src/conf/domain_conf.h | 1 +
> src/qemu/qemu_command.c | 5 +++++
> 5 files changed, 23 insertions(+), 6 deletions(-)
>
> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index a6ab845f92..cd5d7aae56 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -1766,6 +1766,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
> <kvm>
> <hidden state='on'/>
> <hint-dedicated state='on'/>
> + <poll-control='on'/>
> </kvm>
> <xen>
> <e820_host state='on'/>
> @@ -1848,12 +1849,13 @@ are:
> ``kvm``
> Various features to change the behavior of the KVM hypervisor.
>
> - ============== ====================================================================== ======= ============================
> - Feature Description Value Since
> - ============== ====================================================================== ======= ============================
> - hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)`
> - hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)`
> - ============== ====================================================================== ======= ============================
> + ============== ============================================================================ ======= ============================
> + Feature Description Value Since
> + ============== ============================================================================ ======= ============================
> + hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)`
> + hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)`
> + poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.11.0 (QEMU 4.2)`
> + ============== ============================================================================ ======= ============================
Small nit, the next version is 6.10.0 ;-)
Michal
More information about the libvir-list
mailing list