[PATCH v2 10/15] include: Introduce typed params for virDomainSetIOThreadParams wrt pool size

Michal Privoznik posted 15 patches 3 years, 8 months ago
There is a newer version of this series
[PATCH v2 10/15] include: Introduce typed params for virDomainSetIOThreadParams wrt pool size
Posted by Michal Privoznik 3 years, 8 months ago
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>
---
 include/libvirt/libvirt-domain.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 24846046aa..b0020d247e 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -2493,6 +2493,28 @@ 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. 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. 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,
-- 
2.35.1
Re: [PATCH v2 10/15] include: Introduce typed params for virDomainSetIOThreadParams wrt pool size
Posted by Peter Krempa 3 years, 8 months ago
On Tue, Jun 07, 2022 at 14:52:54 +0200, Michal Privoznik wrote:
> 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>
> ---
>  include/libvirt/libvirt-domain.h | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>