Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91082
b: refs/heads/master
c: 4bdbaad
h: refs/heads/master
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Apr 19, 2008
1 parent 967b624 commit f69392a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d1fe3236a1d64ab687e16b4cbbaa1383352a2c1
refs/heads/master: 4bdbaad33d0f4d0e9818a38a825f5b75c0296a28
15 changes: 6 additions & 9 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6501,27 +6501,24 @@ static int find_next_best_node(int node, nodemask_t *used_nodes)
* 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

Expand Down Expand Up @@ -6883,7 +6880,7 @@ static int build_sched_domains(const cpumask_t *cpu_map)

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;
Expand Down Expand Up @@ -6998,7 +6995,7 @@ static int build_sched_domains(const cpumask_t *cpu_map)
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);
Expand Down

0 comments on commit f69392a

Please sign in to comment.