sched/topology: Rewrite get_group()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 3 May 2017 12:18:06 +0000 (14:18 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 15 May 2017 08:15:32 +0000 (10:15 +0200)
commit0c0e776a9b0f21ac41d4c6982c57493928524dba
tree45726990dc35bbf10fe53ea248bd43e339e254cc
parent35a566e6e8a18c3bc16229abeac146a707b8f216
sched/topology: Rewrite get_group()

We want to attain:

  sg_cpus() & sg_mask() == sg_mask()

for this to be so we must initialize sg_mask() to sg_cpus() for the
!overlap case (its currently cpumask_setall()).

Since the code makes my head hurt bad, rewrite it into a simpler form,
inspired by the now fixed overlap code.

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>
kernel/sched/topology.c