On Fri, Apr 14, 2023 at 15:44:10 +0200, Martin Kletzander wrote:
On Fri, Mar 31, 2023 at 02:00:32PM +0200, Peter Krempa wrote:
> Currently we allow configuring the 'poll-max-ns', 'poll-grow', and
> 'poll-shrink' parameters of qemu iothreads only during runtime and they
> are not persisted. Add XML machinery to persist them.
>
> Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
> ---
> docs/formatdomain.rst | 11 ++++-
> src/conf/domain_conf.c | 41 ++++++++++++++++++-
> src/conf/domain_conf.h | 7 ++++
> src/conf/schemas/domaincommon.rng | 19 +++++++++
> .../iothreads-ids-pool-sizes.xml | 12 ++++--
> 5 files changed, 85 insertions(+), 5 deletions(-)
>
[...]
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index 5a2c70f012..8ac76f25d3 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -2713,6 +2713,13 @@ struct _virDomainIOThreadIDDef {
>
> virDomainThreadSchedParam sched;
>
> + unsigned long long poll_max_ns;
> + bool set_poll_max_ns;
> + unsigned int poll_grow;
> + bool set_poll_grow;
> + unsigned int poll_shrink;
> + bool set_poll_shrink;
> +
All these are int64_t in QEMU, although I understand we don't need to
represent all the possible values, but it is weird when each one is
different here.
I think you can't go wrong here if you make all of them unsigned long
long.
I've actually copied these from struct _qemuMonitorIOThreadInfo withouth
thinking too much about it. We already have code which can set the
parameters during runtime but we never remebered them.
So if we really want to use 64 bit values for those the existing code
needs to be modified first.