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

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> On Fri, Dec 19, 2008 at 07:57:58PM +0100, Jim Meyering wrote:
>>
>> From 108a21089f2d5f427eb39ba7f622fd61deafebb3 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering@xxxxxxxxxx>
>> Date: Thu, 18 Dec 2008 13:53:47 +0100
>> Subject: [PATCH] make NUMA-initialization code more portable and more robust
>>
>> qemudCapsInitNUMA and umlCapsInitNUMA were identical, so this change
>> factors them into a new function, virCapsInitNUMA, and puts it in
>> nodeinfo.c.  Putting it there means several programs must now link
>> against -lnuma, hence all the Makefile.am adjustments.
>
> Most of those Makefile.am changes are unneccessary. Only targets
> which compile source files using numactl needed the NUMA_CFLAGS/LIBS
> adding. Specifically libvirt_driver.la and libvirt_lxc. The libnuma
> ABI doesn't leak out into other things linking to libvirt.so or the
> drivers, so no need to add link flags for libvirtd, virsh or the
> tests / examples.
>
>> In addition to factoring out the duplicates, this change also
>> adjusts that function definition (along with its macros) so
>> that it works with Fedora 9's numactl version 1, and makes it
>> so the code will work even if someone builds the kernel with
>> CONFIG_NR_CPUS > 4096.
>>
>> Finally, also perform this NUMA initialization for the lxc
>> and openvz drivers.
>
> All the source files wre missing #include "nodeinfo.h" to actually
> get the definition of virCapsInitNUMA, so not entirely sure how
> it managed to compile for you ?

I didn't see the warnings go by.
Need to configure with --enable-compile-warnings=error more religiously.

> Here's a cut down patch removing the unneccessary  makefile.am changes
> and adding the missing includes, which compiles & links for me.

Now that's really odd.
I *know* I was getting link errors without those other Makefile.am
changes, but can't reproduce them anymore.  But this is on rawhide,
and I've updated since -- and besides, maybe some build product was
stale.

Good catches.
I'll commit the result shortly, along with...
this one more change that's required to get past "make distcheck":

>From 6504bf107b1aa642b35cceccac74ccf2a2c2d8d8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Sun, 21 Dec 2008 19:00:19 +0100
Subject: * src/node_device_hal.c: Include <config.h> before everything else.

---
 src/node_device_hal.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/node_device_hal.c b/src/node_device_hal.c
index f2bbbef..3449ee0 100644
--- a/src/node_device_hal.c
+++ b/src/node_device_hal.c
@@ -21,10 +21,10 @@
  * Author: David F. Lively <dlively@xxxxxxxxxxxxxxx>
  */

+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <config.h>
 #include <libhal.h>

 #include "node_device_conf.h"
--
1.6.1.rc3.350.g541da

--
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]