Skip to content

Commit 988067e

Browse files
Lauro Ramos Venanciogregkh
authored andcommitted
sched/topology: Optimize build_group_mask()
commit f32d782e31bf079f600dcec126ed117b0577e85c upstream. 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 <lvenanci@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: lwang@redhat.com Cc: riel@redhat.com Link: http://lkml.kernel.org/r/1492717903-5195-2-git-send-email-lvenanci@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5c34f49 commit 988067e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/sched/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6137,12 +6137,12 @@ enum s_alloc {
61376137
*/
61386138
static void build_group_mask(struct sched_domain *sd, struct sched_group *sg)
61396139
{
6140-
const struct cpumask *span = sched_domain_span(sd);
6140+
const struct cpumask *sg_span = sched_group_cpus(sg);
61416141
struct sd_data *sdd = sd->private;
61426142
struct sched_domain *sibling;
61436143
int i;
61446144

6145-
for_each_cpu(i, span) {
6145+
for_each_cpu(i, sg_span) {
61466146
sibling = *per_cpu_ptr(sdd->sd, i);
61476147

61486148
/*

0 commit comments

Comments
 (0)