Skip to content

Commit

Permalink
sched/topology: Remove redundant cpumask_and() in init_overlap_sched_…
Browse files Browse the repository at this point in the history
…group()

mask is built in build_balance_mask() by for_each_cpu(i, sg_span), so
it must be a subset of sched_group_span(sg).

So the cpumask_and() call is redundant - remove it.

[ mingo: Adjusted the changelog a bit. ]

Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Barry Song authored and Ingo Molnar committed Mar 25, 2021
1 parent c4681f3 commit 0a2b65c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ static void init_overlap_sched_group(struct sched_domain *sd,
int cpu;

build_balance_mask(sd, sg, mask);
cpu = cpumask_first_and(sched_group_span(sg), mask);
cpu = cpumask_first(mask);

sg->sgc = *per_cpu_ptr(sdd->sgc, cpu);
if (atomic_inc_return(&sg->sgc->ref) == 1)
Expand Down

0 comments on commit 0a2b65c

Please sign in to comment.