::
iothreadset domain iothread_id [[--poll-max-ns ns] [--poll-grow factor]
- [--poll-shrink divisor]]
+ [--poll-shrink divisor] [--thread-pool-min value]
+ [--thread-pool-max value]]
[[--config] [--live] | [--current]]
Modifies an existing iothread of the domain using the specified
result in the polling values returning to hypervisor defaults at the
next start, restore, etc.
+The *--thread-pool-min* and *--thread-pool-max* options then set lower and
+upper bound, respectively of number of threads in worker pool of given
+iothread. For changes to an inactive configuration -1 can be specified to
+remove corresponding boundary from the domain configuration. For changes to a
+running guest it's recommended to set the upper boundary first
+(*--thread-pool-max*) and only after that set the lower boundary
+(*--thread-pool-min*). It is allowed for the lower boundary to be the same as
+the upper boundary, however it's not allowed for the upper boundary to be value
+of zero.
+
If *--live* is specified, affect a running guest. If the guest is not
running an error is returned.
If *--current* is specified or *--live* is not specified, then handle
},
{.name = "poll-shrink",
.type = VSH_OT_INT,
- .help = N_("set the value for reduction of the IOThread polling time ")
+ .help = N_("set the value for reduction of the IOThread polling time")
+ },
+ {.name = "thread-pool-min",
+ .type = VSH_OT_INT,
+ .help = N_("lower boundary for worker thread pool")
+ },
+ {.name = "thread-pool-max",
+ .type = VSH_OT_INT,
+ .help = N_("upper boundary for worker thread pool")
},
VIRSH_COMMON_OPT_DOMAIN_LIVE,
VIRSH_COMMON_OPT_DOMAIN_CURRENT,
int maxparams = 0;
unsigned long long poll_max;
unsigned int poll_val;
+ int thread_val;
int rc;
if (live)
#undef VSH_IOTHREAD_SET_UINT_PARAMS
+#define VSH_IOTHREAD_SET_INT_PARAMS(opt, param) \
+ thread_val = -1; \
+ if ((rc = vshCommandOptInt(ctl, cmd, opt, &thread_val)) < 0) \
+ goto cleanup; \
+ if (rc > 0 && \
+ virTypedParamsAddInt(¶ms, &nparams, &maxparams, \
+ param, thread_val) < 0) \
+ goto save_error;
+
+ VSH_IOTHREAD_SET_INT_PARAMS("thread-pool-min", VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN)
+ VSH_IOTHREAD_SET_INT_PARAMS("thread-pool-max", VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX)
+#undef VSH_IOTHREAD_SET_INT_PARAMS
+
if (nparams == 0) {
vshError(ctl, _("Not enough arguments passed, nothing to set"));
goto cleanup;