[PATCH 1/3] conf: Store the iothread 'poll' settings in the XML

Martin Kletzander mkletzan at redhat.com
Fri Apr 14 13:44:10 UTC 2023


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 at 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.
-------------- 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/20230414/de700137/attachment.sig>


More information about the libvir-list mailing list