diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-05-01 08:51:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-05-15 10:15:33 +0200 |
commit | af218122b103900fa33d408aea0c2468791e698c (patch) | |
tree | 14382323899a0c140c07e71b27c431a10ac70b36 /kernel/sched/topology.c | |
parent | 0c0e776a9b0f21ac41d4c6982c57493928524dba (diff) | |
download | blackbird-op-linux-af218122b103900fa33d408aea0c2468791e698c.tar.gz blackbird-op-linux-af218122b103900fa33d408aea0c2468791e698c.zip |
sched/topology: Simplify sched_group_mask() usage
While writing the comments, it occurred to me that:
sg_cpus & sg_mask == sg_mask
at least conceptually; the !overlap case sets the all 1s mask. If we
correct that we can simplify things and directly use sg_mask.
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: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/topology.c')
-rw-r--r-- | kernel/sched/topology.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index dea1950b42a5..bf53a99eb511 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -85,7 +85,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, group->sgc->id, cpumask_pr_args(sched_group_cpus(group))); - if ((sd->flags & SD_OVERLAP) && !cpumask_full(sched_group_mask(group))) { + if ((sd->flags & SD_OVERLAP) && + !cpumask_equal(sched_group_mask(group), sched_group_cpus(group))) { printk(KERN_CONT " mask=%*pbl", cpumask_pr_args(sched_group_mask(group))); } @@ -505,7 +506,7 @@ enum s_alloc { */ int group_balance_cpu(struct sched_group *sg) { - return cpumask_first_and(sched_group_cpus(sg), sched_group_mask(sg)); + return cpumask_first(sched_group_mask(sg)); } |