sched/fair: Rework throttle_count sync
authorPeter Zijlstra <peterz@infradead.org>
Wed, 22 Jun 2016 13:14:26 +0000 (15:14 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 27 Jun 2016 10:53:19 +0000 (12:53 +0200)
commit55e16d30bd99510900caec913c90f53bc2b35cba
tree42984b0b0daaae83ea3c7b9e35d65ce9d7bf1c39
parent599b4840b0ea453c7d11e1798dcc8f494dcfd58a
sched/fair: Rework throttle_count sync

Since we already take rq->lock when creating a cgroup, use it to also
sync the throttle_count and avoid the extra state and enqueue path
branch.

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
[ Fixed build warning. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c
kernel/sched/sched.h