Re: linux-next: Tree for June 5

Ingo Molnar
2008-06-06T15:01:39Z

* Ingo Molnar <mingo@elte.hu> wrote:

> > Subject: [PATCH] sched: don't call node_to_cpumask() on nodes >
> > nr_node_ids
>
> AFAICS this is not yet required for v2.6.26, as the requirement to
> never iterate to MAX_NUMNODES and call nr_cpus_node() with the index
> only got introduced by Mike's patch.

the one below is needed as well i think.

Ingo
---
kernel/sched.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: tip/kernel/sched.c
===================================================================
--- tip.orig/kernel/sched.c
+++ tip/kernel/sched.c
@@ -6576,9 +6576,9 @@ static int find_next_best_node(int node,

min_val = INT_MAX;

- for (i = 0; i < MAX_NUMNODES; i++) {
+ for (i = 0; i < nr_node_ids; i++) {
/* Start at @node */
- n = (node + i) % MAX_NUMNODES;
+ n = (node + i) % nr_node_ids;

if (!nr_cpus_node(n))
continue;