Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245564
b: refs/heads/master
c: d069b91
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 11, 2011
1 parent 8695ee0 commit bddc9a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 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: 2c402dc3bb502e9dd74fce72c14d293fcef4719d
refs/heads/master: d069b916f7b50021d41d6ce498f86da32a7afaec
34 changes: 20 additions & 14 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -7114,20 +7114,23 @@ static const struct cpumask *cpu_smt_mask(int cpu)
}
#endif

/*
* Topology list, bottom-up.
*/
static struct sched_domain_topology_level default_topology[] = {
#ifdef CONFIG_NUMA
{ sd_init_ALLNODES, cpu_allnodes_mask, },
{ sd_init_NODE, cpu_node_mask, },
#endif
{ sd_init_CPU, cpu_cpu_mask, },
#ifdef CONFIG_SCHED_BOOK
{ sd_init_BOOK, cpu_book_mask, },
#ifdef CONFIG_SCHED_SMT
{ sd_init_SIBLING, cpu_smt_mask, },
#endif
#ifdef CONFIG_SCHED_MC
{ sd_init_MC, cpu_coregroup_mask, },
#endif
#ifdef CONFIG_SCHED_SMT
{ sd_init_SIBLING, cpu_smt_mask, },
#ifdef CONFIG_SCHED_BOOK
{ sd_init_BOOK, cpu_book_mask, },
#endif
{ sd_init_CPU, cpu_cpu_mask, },
#ifdef CONFIG_NUMA
{ sd_init_NODE, cpu_node_mask, },
{ sd_init_ALLNODES, cpu_allnodes_mask, },
#endif
{ NULL, },
};
Expand All @@ -7136,18 +7139,18 @@ static struct sched_domain_topology_level *sched_domain_topology = default_topol

struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
struct s_data *d, const struct cpumask *cpu_map,
struct sched_domain_attr *attr, struct sched_domain *parent,
struct sched_domain_attr *attr, struct sched_domain *child,
int cpu)
{
struct sched_domain *sd = tl->init(d, cpu);
if (!sd)
return parent;
return child;

set_domain_attribute(sd, attr);
cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
sd->parent = parent;
if (parent)
parent->child = sd;
if (child)
child->parent = sd;
sd->child = child;

return sd;
}
Expand Down Expand Up @@ -7176,6 +7179,9 @@ static int build_sched_domains(const struct cpumask *cpu_map,
for (tl = sched_domain_topology; tl->init; tl++)
sd = build_sched_domain(tl, &d, cpu_map, attr, sd, i);

while (sd->child)
sd = sd->child;

*per_cpu_ptr(d.sd, i) = sd;
}

Expand Down

0 comments on commit bddc9a4

Please sign in to comment.