[libvirt] [PATCH 3/4] domain_conf: Add support for iothreads in disk definition

Ján Tomko jtomko at redhat.com
Tue Aug 26 16:04:25 UTC 2014


On 08/26/2014 02:38 AM, John Ferlan wrote:
> Add a new disk "driver" attribute "iothread" to be parsed as the thread
> number for the disk to use. In order to more easily facilitate the usage
> and configuration of the iothread, a "zero" for the attribute indicates
> iothreads are not supported for the device and a positive value indicates
> the specific thread to try and use.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  docs/formatdomain.html.in     |  8 ++++++++
>  docs/schemas/domaincommon.rng | 13 +++++++++++++
>  src/conf/domain_conf.c        | 24 +++++++++++++++++++++++-
>  src/conf/domain_conf.h        |  2 ++
>  4 files changed, 46 insertions(+), 1 deletion(-)
> 

> @@ -11968,6 +11980,14 @@ virDomainDefParseXML(xmlDocPtr xml,
>              goto error;
>          }
>          def->iothreads = count;
> +
> +        /* Create a bitmap for inuse threads - noting that entries are
> +         * numbered 1..def->iothreads since 0 (zero) iothreads means
> +         * nothing and assigning a disk to an IOThread requires at least a
> +         * thread# > 0 since a zero would indicate no IOThread for the disk
> +         */
> +        if (!(def->iothreadmap = virBitmapNew(def->iothreads+1)))
> +            goto error;
>      }

Do you plan to do multiple disks on a single iothread in the followup patches?
Or is that a configuration that doesn't make sense?

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/20140826/183273ab/attachment-0001.sig>


More information about the libvir-list mailing list