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

Ján Tomko jtomko at redhat.com
Fri Mar 6 13:37:14 UTC 2015


On Fri, Mar 06, 2015 at 08:07:56AM -0500, John Ferlan wrote:
> > 
> > The maplen is not needed. Just pass 'hostcpus' to
> > 'virProcessGetAffinity' and it will generate a virBitmap of the right
> > size, then virBitmapToData computes the correct maplen.
> > 
> >> +    maxcpu = maplen * 8;
> >> +    if (maxcpu > hostcpus)
> > 
> > These two lines are redundant.
> > If maplen * 8 < hostcpus, then VIR_CPU_MAPLEN is flawed, because the map
> > does not hold at least hostcpus bits.
> > If maplen * 8 >= hostcpus, the value of hostcpus is used.
> > 
> 
> Hmm... I'll have to go back and look again as this was pretty much
> following the VcpuPin or EmulatorPin examples with a touch of GetCPUMap
> since this code returns the cpumap rather than expecting one on input.
> 

Those are terrible examples long overdue for a cleanup.

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/20150306/42a4eef2/attachment-0001.sig>


More information about the libvir-list mailing list