Removing patches from repo that are no longer needed

This commit is contained in:
Neil Horman 2011-11-04 13:22:01 -04:00
parent d27b8107a2
commit 1d6140020a
3 changed files with 0 additions and 151 deletions

View File

@ -1,46 +0,0 @@
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

View File

@ -1,51 +0,0 @@
commit 1c4ad25a74b5b613b1d1972668bf41fc128420db
Author: Neil Horman <nhorman@tuxdriver.com>
Date: Mon Oct 24 10:15:49 2011 -0400
Ensure that packages get valid numa node:
On non-numa enabled systems, packages will get a NULL pointer to the
numa node, instead of the implied unspecified node structure. This
resutls in a segfaul. This should fix it.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
diff --git a/cputree.c b/cputree.c
index 31fefab..26a45db 100644
--- a/cputree.c
+++ b/cputree.c
@@ -228,7 +228,7 @@ static void do_one_cpu(char *path)
free(line);
}
- nodeid=0;
+ nodeid=-1;
dir = opendir(path);
do {
entry = readdir(dir);
diff --git a/numa.c b/numa.c
index 9cbbfc0..510fedc 100644
--- a/numa.c
+++ b/numa.c
@@ -127,19 +127,15 @@ static gint compare_node(gconstpointer a, gconstpointer b)
void add_package_to_node(struct topo_obj *p, int nodeid)
{
struct topo_obj find, *node;
- find.number = nodeid;
- GList *entry;
- find.number = nodeid;
- entry = g_list_find_custom(numa_nodes, &find, compare_node);
+ node = get_numa_node(nodeid);
- if (!entry) {
+ if (!node) {
if (debug_mode)
printf("Could not find numa node for node id %d\n", nodeid);
return;
}
- node = entry->data;
if (!p->parent) {
node->children = g_list_append(node->children, p);

View File

@ -1,54 +0,0 @@
commit effc540808e630d1fad423d653c43737e99cc1b6
Author: Neil Horman <nhorman@tuxdriver.com>
Date: Thu Oct 20 10:56:48 2011 -0400
Fix oops on non-numa enabled systems
Some systems aren't numa enabled, but still have devices that indicate they
belong to numa node 0 (rather than -1 as they should). Thats a kernel problem
but we still shouldn't crash as a result (which we will when device get a NULL
numa_node pointer as a result of trying to find non-existant node 0). This
patch fixes the crash by always returning the unspecified node pointer when numa
is disabled
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
diff --git a/classify.c b/classify.c
index 6a20480..bb34f04 100644
--- a/classify.c
+++ b/classify.c
@@ -281,7 +281,7 @@ struct irq_info *add_misc_irq(int irq)
new->irq = irq;
new->type = IRQ_TYPE_LEGACY;
new->class = IRQ_OTHER;
- new->numa_node = get_numa_node(0);
+ new->numa_node = get_numa_node(-1);
interrupts_db = g_list_append(interrupts_db, new);
return new;
}
diff --git a/irqbalance.h b/irqbalance.h
index a1b1e8a..73a0864 100644
--- a/irqbalance.h
+++ b/irqbalance.h
@@ -49,6 +49,7 @@ extern GList *numa_nodes;
extern GList *packages;
extern GList *cache_domains;
extern GList *cpus;
+extern int numa_avail;
enum hp_e {
HINT_POLICY_IGNORE,
diff --git a/numa.c b/numa.c
index 0d93091..9cbbfc0 100644
--- a/numa.c
+++ b/numa.c
@@ -162,6 +162,9 @@ struct topo_obj *get_numa_node(int nodeid)
struct topo_obj find;
GList *entry;
+ if (!numa_avail)
+ return &unspecified_node;
+
if (nodeid == -1)
return &unspecified_node;