[libvirt] [PATCH] fix numa-related (and kernel-dependent) test failures

Daniel P. Berrange berrange at redhat.com
Wed Dec 17 21:01:25 UTC 2008


On Wed, Dec 17, 2008 at 08:39:04AM +0100, Jim Meyering wrote:
> Daniel Veillard <veillard at redhat.com> wrote:
> ...
> >> All tests pass for me with that patch.  Looks good.
> >
> >   Same for me, +1 !
> 
> Thanks.
> Pushed with this comment:
> 
>         fix numa-related (and kernel-dependent) test failures
>         This change is required on some kernels due to the way a change in
>         the kernel's CONFIG_NR_CPUS propagates through the numa library.
>         * src/qemu_conf.c (qemudCapsInitNUMA): Pass numa_all_cpus_ptr->size/8
>         as the buffer-length-in-bytes in the call to numa_node_to_cpus, since
>         that's what is required on second and subseqent calls.
>         * src/uml_conf.c (umlCapsInitNUMA): Likewise.

This change has broken the compile on Fedora 9 and earlier where the
numa_all_cpus_ptr symbol does not exist. So it needs to have a test
in configure.ac added, and if not present, go with our original code
of a fixed mask size. Fortunately on Fedora 9's libnuma, they don't
have the annoying mask size checks - that's a new Fedora 10 thing

I also just noticed that its only touching the size param passed into
the numa_node_to_cpus, but not the actual size that's allocated for the
array. This is fairly harmless....until someone does a kernel build
with NR_CPUS > 4096 

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list