diff options
author | Mike Travis <travis@sgi.com> | 2008-04-04 21:11:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:44:59 -0400 |
commit | c5f59f0833df945eef7ff35f3dc6ba61c5f293dd (patch) | |
tree | 32c1a94847d0154051c79011212d401462723d55 /mm/page_alloc.c | |
parent | b53e921ba1cff8453dc9a87a84052fa12d5b30bd (diff) |
nodemask: use new node_to_cpumask_ptr function
* Use new node_to_cpumask_ptr. This creates a pointer to the
cpumask for a given node. This definition is in mm patch:
asm-generic-add-node_to_cpumask_ptr-macro.patch
* Use new set_cpus_allowed_ptr function.
Depends on:
[mm-patch]: asm-generic-add-node_to_cpumask_ptr-macro.patch
[sched-devel]: sched: add new set_cpus_allowed_ptr function
[x86/latest]: x86: add cpus_scnprintf function
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Greg Banks <gnb@melbourne.sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 402a504f1228..32e796af12a1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2029,6 +2029,7 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask) | |||
2029 | int n, val; | 2029 | int n, val; |
2030 | int min_val = INT_MAX; | 2030 | int min_val = INT_MAX; |
2031 | int best_node = -1; | 2031 | int best_node = -1; |
2032 | node_to_cpumask_ptr(tmp, 0); | ||
2032 | 2033 | ||
2033 | /* Use the local node if we haven't already */ | 2034 | /* Use the local node if we haven't already */ |
2034 | if (!node_isset(node, *used_node_mask)) { | 2035 | if (!node_isset(node, *used_node_mask)) { |
@@ -2037,7 +2038,6 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask) | |||
2037 | } | 2038 | } |
2038 | 2039 | ||
2039 | for_each_node_state(n, N_HIGH_MEMORY) { | 2040 | for_each_node_state(n, N_HIGH_MEMORY) { |
2040 | cpumask_t tmp; | ||
2041 | 2041 | ||
2042 | /* Don't want a node to appear more than once */ | 2042 | /* Don't want a node to appear more than once */ |
2043 | if (node_isset(n, *used_node_mask)) | 2043 | if (node_isset(n, *used_node_mask)) |
@@ -2050,8 +2050,8 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask) | |||
2050 | val += (n < node); | 2050 | val += (n < node); |
2051 | 2051 | ||
2052 | /* Give preference to headless and unused nodes */ | 2052 | /* Give preference to headless and unused nodes */ |
2053 | tmp = node_to_cpumask(n); | 2053 | node_to_cpumask_ptr_next(tmp, n); |
2054 | if (!cpus_empty(tmp)) | 2054 | if (!cpus_empty(*tmp)) |
2055 | val += PENALTY_FOR_NODE_WITH_CPUS; | 2055 | val += PENALTY_FOR_NODE_WITH_CPUS; |
2056 | 2056 | ||
2057 | /* Slight preference for less loaded node */ | 2057 | /* Slight preference for less loaded node */ |