sched: Serialize p->cpus_allowed and ttwu() using p->pi_lock
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 5 Apr 2011 15:23:45 +0000 (17:23 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 14 Apr 2011 06:52:35 +0000 (08:52 +0200)
commit013fdb8086acaae5f8eb96f9ad48fcd98882ac46
treedfc5cf5dcdfaa593f836b08642609cc32b0d5936
parentfd2f4419b4cbe8fe90796df9617c355762afd6a4
sched: Serialize p->cpus_allowed and ttwu() using p->pi_lock

Currently p->pi_lock already serializes p->sched_class, also put
p->cpus_allowed and try_to_wake_up() under it, this prepares the way
to do the first part of ttwu() without holding rq->lock.

By having p->sched_class and p->cpus_allowed serialized by p->pi_lock,
we prepare the way to call select_task_rq() without holding rq->lock.

Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20110405152728.990364093@chello.nl
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c