Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245561
b: refs/heads/master
c: d3081f5
h: refs/heads/master
i:
  245559: 7549588
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 11, 2011
1 parent 5363211 commit 9fa8811
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 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: 4cb988395da6e16627a8be69729e50cd72ebb23e
refs/heads/master: d3081f52f29da1ba6c27685519a9222b39eac763
22 changes: 17 additions & 5 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6807,8 +6807,22 @@ static void sched_domain_node_span(int node, struct cpumask *span)
cpumask_or(span, span, cpumask_of_node(next_node));
}
}

static const struct cpumask *cpu_node_mask(int cpu)
{
lockdep_assert_held(&sched_domains_mutex);

sched_domain_node_span(cpu_to_node(cpu), sched_domains_tmpmask);

return sched_domains_tmpmask;
}
#endif /* CONFIG_NUMA */

static const struct cpumask *cpu_cpu_mask(int cpu)
{
return cpumask_of_node(cpu_to_node(cpu));
}

int sched_smt_power_savings = 0, sched_mc_power_savings = 0;

struct sd_data {
Expand Down Expand Up @@ -7088,7 +7102,7 @@ static struct sched_domain *__build_allnodes_sched_domain(struct s_data *d,
#ifdef CONFIG_NUMA
sd = sd_init_ALLNODES(d, i);
set_domain_attribute(sd, attr);
cpumask_copy(sched_domain_span(sd), cpu_map);
cpumask_and(sched_domain_span(sd), cpu_map, cpu_possible_mask);
sd->parent = parent;
if (parent)
parent->child = sd;
Expand All @@ -7104,8 +7118,7 @@ static struct sched_domain *__build_node_sched_domain(struct s_data *d,
#ifdef CONFIG_NUMA
sd = sd_init_NODE(d, i);
set_domain_attribute(sd, attr);
sched_domain_node_span(cpu_to_node(i), sched_domain_span(sd));
cpumask_and(sched_domain_span(sd), sched_domain_span(sd), cpu_map);
cpumask_and(sched_domain_span(sd), cpu_map, cpu_node_mask(i));
sd->parent = parent;
if (parent)
parent->child = sd;
Expand All @@ -7120,8 +7133,7 @@ static struct sched_domain *__build_cpu_sched_domain(struct s_data *d,
struct sched_domain *sd;
sd = sd_init_CPU(d, i);
set_domain_attribute(sd, attr);
cpumask_and(sched_domain_span(sd),
cpumask_of_node(cpu_to_node(i)), cpu_map);
cpumask_and(sched_domain_span(sd), cpu_map, cpu_cpu_mask(i));
sd->parent = parent;
if (parent)
parent->child = sd;
Expand Down

0 comments on commit 9fa8811

Please sign in to comment.