perf: Optimize event scheduling locking
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Sat, 9 Apr 2011 19:17:42 +0000 (21:17 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 28 May 2011 16:01:12 +0000 (18:01 +0200)
Currently we only hold one ctx->lock at a time, which results in us
flipping back and forth between cpuctx->ctx.lock and task_ctx->lock.

Avoid this and gain large atomic regions by holding both locks. We
nest the task lock inside the cpu lock, since with task scheduling we
might have to change task ctx while holding the cpu ctx lock.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110409192141.769881865@chello.nl
Signed-off-by: Ingo Molnar <mingo@elte.hu>

No differences found