Re: [PATCH v2 1/7] virnuma: Introduce virNumaNodeIsAvailable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 16, 2014 at 05:08:24PM +0200, Michal Privoznik wrote:
> Not on all hosts the set of NUMA nodes IDs is continuous. This is
> critical, because our code currently assumes the set doesn't contain
> holes. For instance in nodeGetFreeMemory() we can see the following
> pattern:
> 
>     if ((max_node = virNumaGetMaxNode()) < 0)
>         return 0;
> 
>     for (n = 0; n <= max_node; n++) {
>         ...
>     }
> 
> while it should be something like this:
> 
>     if ((max_node = virNumaGetMaxNode()) < 0)
>         return 0;
> 
>     for (n = 0; n <= max_node; n++) {
>         if (!virNumaNodeIsAvailable(n))
>             continue;
>         ...
>     }
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/libvirt_private.syms |  1 +
>  src/util/virnuma.c       | 36 ++++++++++++++++++++++++++++++++++--
>  src/util/virnuma.h       |  1 +
>  3 files changed, 36 insertions(+), 2 deletions(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]