[PATCH v3 3/8] qemu_conf: Introduce a knob to set SCHED_CORE
Daniel P. Berrangé
berrange at redhat.com
Tue Aug 23 16:06:45 UTC 2022
On Fri, Aug 12, 2022 at 12:04:18PM +0200, Michal Privoznik wrote:
> Ideally, we would just pick the best default and users wouldn't
> have to intervene at all. But in some cases it may be handy to
> not bother with SCHED_CORE at all or place helper processes into
> the same group as QEMU. Introduce a knob in qemu.conf to allow
> users control this behaviour.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/qemu/libvirtd_qemu.aug | 1 +
> src/qemu/qemu.conf.in | 16 +++++++++++++
> src/qemu/qemu_conf.c | 38 ++++++++++++++++++++++++++++++
> src/qemu/qemu_conf.h | 13 ++++++++++
> src/qemu/test_libvirtd_qemu.aug.in | 1 +
> 5 files changed, 69 insertions(+)
>
> diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
> index 0f18775121..ed097ea3d9 100644
> --- a/src/qemu/libvirtd_qemu.aug
> +++ b/src/qemu/libvirtd_qemu.aug
> @@ -110,6 +110,7 @@ module Libvirtd_qemu =
> | bool_entry "dump_guest_core"
> | str_entry "stdio_handler"
> | int_entry "max_threads_per_process"
> + | str_entry "sched_core"
>
> let device_entry = bool_entry "mac_filter"
> | bool_entry "relaxed_acs_check"
> diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in
> index 04b7740136..adcaccfdf1 100644
> --- a/src/qemu/qemu.conf.in
> +++ b/src/qemu/qemu.conf.in
> @@ -952,3 +952,19 @@
> # DO NOT use in production.
> #
> #deprecation_behavior = "none"
> +
> +# If this is set then QEMU and its threads will run in a separate scheduling
> +# group meaning no other process will share Hyper Threads of a single core with
> +# QEMU. Each QEMU has its own group.
> +#
> +# Possible options are:
> +# "none" - (default) nor QEMU nor any of its helper processes are placed into
> +# separate scheduling group
'neither QEMU or any'
> +# "vcpus" - only QEMU vCPU threads are placed into a separate scheduling group,
> +# emulator threads and helper processes remain outside of the group
> +# "emulator" - only QEMU and its threads (emulator + vCPUs) are placed into
> +# separate scheduling group, helper proccesses remain outside of
> +# the group
> +# "full" - both QEMU and its helper processes are placed into separate
> +# scheduling group
> +#sched_core = "none"
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list