[libvirt] [PATCH v3 3/9] qemu: Implement the qemu driver fetch for IOThreads

Ján Tomko jtomko at redhat.com
Thu Mar 5 16:26:23 UTC 2015


On Thu, Mar 05, 2015 at 07:51:33AM -0500, John Ferlan wrote:
> >> +    for (i = 0; i < targetDef->iothreads; i++) {
> >> +        if (VIR_ALLOC(info_ret[i]) < 0)
> >> +            goto cleanup;
> >> +
> >> +        /* IOThreads being counting at 1 */
> >> +        info_ret[i]->iothread_id = i + 1;
> >> +
> >> +        if (VIR_ALLOC_N(info_ret[i]->cpumap, maplen) < 0)
> >> +            goto cleanup;
> >> +
> >> +        /* Initialize the cpumap */
> >> +        info_ret[i]->cpumaplen = maplen;
> >> +        memset(info_ret[i]->cpumap, 0xff, maplen);
> >> +        if (maxcpu % 8)
> >> +            info_ret[i]->cpumap[maplen - 1] &= (1 << maxcpu % 8) - 1;
> > 
> > virBitmapToData could make this more readable.
> > 
> 
> This is where I'm not sure varying from the existing API's model w/r/t
> cpumap & maplen, etc. should be done..
> 

Yes, virBitmapToData converts it from the virBitmap format used by
theiothreadspin info to the cpumap/maplen format matching the API you
proposed.

> >> +    }
> >> +
> >> +    /* If iothreadspin setting exists, there are unused physical cpus */
> >> +    iothreadspin_list = targetDef->cputune.iothreadspin;
> > 
> > A temporary variable pointing to iothreadspin[i] is more common.
> > 
> 
> straight copy of qemuDomainGetVcpuPinInfo
> 

Oh, that explains it.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150305/e95728d8/attachment-0001.sig>


More information about the libvir-list mailing list