[libvirt] [PATCH 7/7] domain_conf: Add iothreadpin to cputune

Ján Tomko jtomko at redhat.com
Mon Sep 15 14:56:37 UTC 2014


On 09/03/2014 06:15 PM, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1101574
> 
> Add an option 'iothreadpin' to the <cpuset> to allow for setting the
> CPU affinity for each IOThread.
> 
> The iothreadspin will mimic the vcpupin with respect to being able to
> assign each iothread to a specific CPU, although iothreads ids start
> at 1 while vcpu ids start at 0. This matches the iothread naming scheme.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  docs/formatdomain.html.in                          |  18 +++
>  docs/schemas/domaincommon.rng                      |  10 ++
>  src/conf/domain_conf.c                             | 124 +++++++++++++++++++--
>  src/conf/domain_conf.h                             |   2 +
>  .../qemuxml2argv-cputune-iothreads.xml             |  38 +++++++
>  tests/qemuxml2xmltest.c                            |   1 +
>  6 files changed, 182 insertions(+), 11 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml
> 

> @@ -11434,10 +11442,41 @@ virDomainVcpuPinDefParseXML(xmlNodePtr node,
>          def->vcpuid = vcpuid;
>      }
>  
> +    if (iothreads) {
> +        tmp = virXPathString("string(./@iothread)", ctxt);
> +        if (tmp && virStrToLong_uip(tmp, NULL, 10, &iothreadid) < 0) {
> +            virReportError(VIR_ERR_XML_ERROR,
> +                           _("invalid setting for iothread '%s'"), tmp);
> +            goto error;
> +        }

VIR_FREE(tmp);

> +
> +        if (iothreadid == 0) {
> +            virReportError(VIR_ERR_XML_ERROR, "%s",
> +                           _("zero is an invalid iothread id value"));

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140915/7c17614c/attachment-0001.sig>


More information about the libvir-list mailing list