diff options
| author | Lauro Ramos Venancio <[email protected]> | 2017-04-20 16:51:40 -0300 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2017-05-15 10:15:26 +0200 |
| commit | f32d782e31bf079f600dcec126ed117b0577e85c (patch) | |
| tree | 8b49791b14fc6d308f2994426096934f354c511e /kernel | |
| parent | a420b0630362c2c451060e6187e36d72df827134 (diff) | |
sched/topology: Optimize build_group_mask()
The group mask is always used in intersection with the group CPUs. So,
when building the group mask, we don't have to care about CPUs that are
not part of the group.
Signed-off-by: Lauro Ramos Venancio <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/topology.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 81c82031ed95..5a4d9aeda258 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -506,12 +506,12 @@ enum s_alloc { */ static void build_group_mask(struct sched_domain *sd, struct sched_group *sg) { - const struct cpumask *span = sched_domain_span(sd); + const struct cpumask *sg_span = sched_group_cpus(sg); struct sd_data *sdd = sd->private; struct sched_domain *sibling; int i; - for_each_cpu(i, span) { + for_each_cpu(i, sg_span) { sibling = *per_cpu_ptr(sdd->sd, i); if (!cpumask_test_cpu(i, sched_domain_span(sibling))) continue; |