Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158356
b: refs/heads/master
c: 0e8e85c
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Herrmann authored and Ingo Molnar committed Aug 18, 2009
1 parent 687d19d commit 0b97a58
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 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: d81735355533cd4b2bce9508d86fcad24a38cf47
refs/heads/master: 0e8e85c941d8f1b43bcc2e3b8b7026cdae476c53
31 changes: 20 additions & 11 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -8563,6 +8563,25 @@ static struct sched_domain *__build_smt_sched_domain(struct s_data *d,
return sd;
}

static void build_sched_groups(struct s_data *d, enum sched_domain_level l,
const struct cpumask *cpu_map, int cpu)
{
switch (l) {
#ifdef CONFIG_SCHED_SMT
case SD_LV_SIBLING: /* set up CPU (sibling) groups */
cpumask_and(d->this_sibling_map, cpu_map,
topology_thread_cpumask(cpu));
if (cpu == cpumask_first(d->this_sibling_map))
init_sched_build_groups(d->this_sibling_map, cpu_map,
&cpu_to_cpu_group,
d->send_covered, d->tmpmask);
break;
#endif
default:
break;
}
}

/*
* Build sched domains for a given set of cpus and attach the sched domains
* to the individual cpus
Expand Down Expand Up @@ -8597,19 +8616,9 @@ static int __build_sched_domains(const struct cpumask *cpu_map,
sd = __build_smt_sched_domain(&d, cpu_map, attr, sd, i);
}

#ifdef CONFIG_SCHED_SMT
/* Set up CPU (sibling) groups */
for_each_cpu(i, cpu_map) {
cpumask_and(d.this_sibling_map,
topology_thread_cpumask(i), cpu_map);
if (i != cpumask_first(d.this_sibling_map))
continue;

init_sched_build_groups(d.this_sibling_map, cpu_map,
&cpu_to_cpu_group,
d.send_covered, d.tmpmask);
build_sched_groups(&d, SD_LV_SIBLING, cpu_map, i);
}
#endif

#ifdef CONFIG_SCHED_MC
/* Set up multi-core groups */
Expand Down

0 comments on commit 0b97a58

Please sign in to comment.