sched/fair: Reorder cgroup creation code
authorPeter Zijlstra <peterz@infradead.org>
Wed, 22 Jun 2016 12:58:02 +0000 (14:58 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 27 Jun 2016 10:17:55 +0000 (12:17 +0200)
commit8663e24d56dc1f093232783c23ea17f2a6f61c03
treee9f4d49bcf7324a34c78cdd7ed38b32f9c385843
parent3d30544f02120b884bba2a9466c87dba980e3be5
sched/fair: Reorder cgroup creation code

A future patch needs rq->lock held _after_ we link the task_group into
the hierarchy. In order to avoid taking every rq->lock twice, reorder
things a little and create online_fair_sched_group() to be called
after we link the task_group.

All this code is still ran from css_alloc() so css_online() isn't in
fact used for this.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
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: bsegall@google.com
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h