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>
This commit is contained in:

committed by
Ingo Molnar

parent
0c0e776a9b
commit
af218122b1
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user