On Mon, 2015-07-20 at 15:47 +0200, Peter Krempa wrote:
>
> > + /* Iterate over all CPUs in the node, in ascending order */
> > + for (cpu = 0; cpu < npresent_cpus; cpu++) {
> >
> > - if (!virBitmapIsBitSet(present_cpumap, cpu))
> > + /* Skip CPUs that are not part of the current node */
> > + if (!virBitmapIsBitSet(node_cpus_map, cpu))
>
> Perhaps you can use virBitmapNextSetBit to simplify the iteration.
>
> > continue;
> >
> > if (!virBitmapIsBitSet(online_cpus_map, cpu)) {
>
> ACK with or without the iteration modified.
I tried following your suggestion but I didn't like the
result very much, so I've left the loop as-is in v2.
Cheers.
--
Andrea Bolognani
Software Engineer - Virtualization Team
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list