[PATCH 1/2] sched: remove another cpumask_t variable from stack
From: Mike Travis
Date: Tue Apr 15 2008 - 16:07:52 EST
* Remove another cpumask_t variable from stack that was missed in the
last kernel_sched_c updates.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ x86/latest .../x86/linux-2.6-x86.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git
Signed-off-by: Mike Travis <travis@xxxxxxx>
---
kernel/sched.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
--- linux-2.6.x86.sched.orig/kernel/sched.c
+++ linux-2.6.x86.sched/kernel/sched.c
@@ -6539,27 +6539,24 @@ static int find_next_best_node(int node,
* should be one that prevents unnecessary balancing, but also spreads tasks
* out optimally.
*/
-static cpumask_t sched_domain_node_span(int node)
+static void sched_domain_node_span(int node, cpumask_t *span)
{
nodemask_t used_nodes;
- cpumask_t span;
node_to_cpumask_ptr(nodemask, node);
int i;
- cpus_clear(span);
+ cpus_clear(*span);
nodes_clear(used_nodes);
- cpus_or(span, span, *nodemask);
+ cpus_or(*span, *span, *nodemask);
node_set(node, used_nodes);
for (i = 1; i < SD_NODES_PER_DOMAIN; i++) {
int next_node = find_next_best_node(node, &used_nodes);
node_to_cpumask_ptr_next(nodemask, next_node);
- cpus_or(span, span, *nodemask);
+ cpus_or(*span, *span, *nodemask);
}
-
- return span;
}
#endif
@@ -6921,7 +6918,7 @@ static int build_sched_domains(const cpu
sd = &per_cpu(node_domains, i);
SD_INIT(sd, NODE);
- sd->span = sched_domain_node_span(cpu_to_node(i));
+ sched_domain_node_span(cpu_to_node(i), &sd->span);
sd->parent = p;
if (p)
p->child = sd;
@@ -7036,7 +7033,7 @@ static int build_sched_domains(const cpu
continue;
}
- *domainspan = sched_domain_node_span(i);
+ sched_domain_node_span(i, domainspan);
cpus_and(*domainspan, *domainspan, *cpu_map);
sg = kmalloc_node(sizeof(struct sched_group), GFP_KERNEL, i);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/