[libvirt] [PATCH] fix numa-related (and kernel-dependent) test failures
Jim Meyering
jim at meyering.net
Thu Dec 18 06:23:38 UTC 2008
"Daniel P. Berrange" <berrange at redhat.com> wrote:
> 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
Thanks for the heads-up.
While normally I'd prefer an autoconf test,
it might make sense to use an #if in this case.
Maybe this will do it:
#if LIBNUMA_API_VERSION <= 1
use old code
#else
use numa_all_cpus_ptr
#endif
> 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
I'll deal with this, too.
More information about the libvir-list
mailing list