diff --git a/irqbalance-bz746159-no-numa-nodes.patch b/irqbalance-bz746159-no-numa-nodes.patch new file mode 100644 index 0000000..42ec5e0 --- /dev/null +++ b/irqbalance-bz746159-no-numa-nodes.patch @@ -0,0 +1,46 @@ +diff --git a/numa.c b/numa.c +index 6e00243..0d93091 100644 +--- a/numa.c ++++ b/numa.c +@@ -84,6 +84,14 @@ void build_numa_node_list(void) + DIR *dir = opendir(SYSFS_NODE_PATH); + struct dirent *entry; + ++ /* ++ * Add the unspecified node ++ */ ++ numa_nodes = g_list_append(numa_nodes, &unspecified_node); ++ ++ if (!dir) ++ return; ++ + do { + entry = readdir(dir); + if (!entry) +@@ -96,6 +104,9 @@ void build_numa_node_list(void) + + static void free_numa_node(gpointer data) + { ++ if (data == (void *)(&unspecified_node)) ++ return; ++ + free(data); + } + +diff --git a/placement.c b/placement.c +index a5b976b..113891b 100644 +--- a/placement.c ++++ b/placement.c +@@ -46,6 +46,12 @@ static void find_best_object(struct topo_obj *d, void *data) + cpumask_t subset; + + /* ++ * Don't consider the unspecified numa node here ++ */ ++ if ((d->obj_type == OBJ_TYPE_NODE) && (d->number == -1)) ++ return; ++ ++ /* + * If the hint policy is subset, then we only want + * to consider objects that are within the irqs hint, but + * only if that irq in fact has published a hint diff --git a/irqbalance.spec b/irqbalance.spec index 37c0cde..99d7bfb 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -1,6 +1,6 @@ Name: irqbalance Version: 1.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 Summary: IRQ balancing daemon @@ -9,6 +9,7 @@ License: GPLv2 Url: http://irqbalance.org/ Source0: http://irqbalance.googlecode.com/files/irqbalance-%{version}.tbz2 Source1: irqbalance.sysconfig +Patch0: irqbalance-bz746159-no-numa-nodes.patch BuildRequires: autoconf automake libtool libcap-ng BuildRequires: glib2-devel pkgconfig imake libcap-ng-devel numactl-devel @@ -26,6 +27,7 @@ multiple CPUs for enhanced performance. %prep %setup -q -n irqbalance +%patch0 -p1 %build sh ./autogen.sh @@ -75,6 +77,9 @@ fi /sbin/chkconfig --del irqbalance >/dev/null 2>&1 || : %changelog +* Mon Oct 17 2011 Neil Horman - 2:1.0-2 +- Fix crash for systems with no numa node support + * Wed Oct 12 2011 Neil Horman - 2:1.0-1 - Update irqbalance to latest upstream version