sched/core: Restructure destroy_sched_domain()
authorPeter Zijlstra <peterz@infradead.org>
Mon, 9 May 2016 08:37:57 +0000 (10:37 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 30 Sep 2016 08:54:06 +0000 (10:54 +0200)
commit16f3ef46805a5ffc75549deac2ff6af08bdf590b
tree08ae64c54ddf97ea5b960d69e2ee993b28c2764f
parentf39180efe5737af8467139bf8af7ca27057be87f
sched/core: Restructure destroy_sched_domain()

There is no point in doing a call_rcu() for each domain, only do a
callback for the root sched domain and clean up the entire set in one
go.

Also make the entire call chain be called destroy_sched_domain*() to
remove confusion with the free_sched_domains() call, which does an
entirely different thing.

Both cpu_attach_domain() callers of destroy_sched_domain() can live
without the call_rcu() because at those points the sched_domain hasn't
been published yet.

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/core.c