]> xenbits.xensource.com Git - libvirt.git/commitdiff
include: Introduce typed params for virDomainSetIOThreadParams wrt pool size
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 11 May 2022 11:31:47 +0000 (13:31 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Jun 2022 12:00:35 +0000 (14:00 +0200)
Our public API offers virDomainSetIOThreadParams() function which
allows users to set various aspects of IOThreads. Introduce two
new typed parameters: VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN and
VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX which will allow users to
modify the thread-pool-min and thread-pool-max attributes of an
iothread.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
include/libvirt/libvirt-domain.h

index 2aec69bc54e0150bf443f654934a968295a79e2a..1ea3284e63ed6e7a5ec756b459006224b61b2b4b 100644 (file)
@@ -2499,6 +2499,34 @@ int                  virDomainDelIOThread(virDomainPtr domain,
  */
 # define VIR_DOMAIN_IOTHREAD_POLL_SHRINK "poll_shrink"
 
+/**
+ * VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN:
+ *
+ * Sets the lower bound for thread pool size. A value of -1 disables this bound
+ * leaving hypervisor use its default value, though this value is not accepted
+ * for running domains. Due to internal implementation it's recommended to set
+ * VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN and VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX
+ * separately. Accepted type is VIR_TYPED_PARAM_INT.
+ *
+ * Since: 8.5.0
+ */
+# define VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN "thread_pool_min"
+
+/**
+ * VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX:
+ *
+ * Sets the upper bound for thread pool size. A value of -1 disables this bound
+ * leaving hypervisor use its default value, though this value is not accepted
+ * for running domains. Since the upper band has to be equal to or greater than
+ * lower bound value of 0 is not accepted. Due to internal implementation it's
+ * recommended to set VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN and
+ * VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX separately. Accepted type is
+ * VIR_TYPED_PARAM_INT.
+ *
+ * Since: 8.5.0
+ */
+# define VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX "thread_pool_max"
+
 int                  virDomainSetIOThreadParams(virDomainPtr domain,
                                                 unsigned int iothread_id,
                                                 virTypedParameterPtr params,