]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6283ae1eadb7a402b84512302a9531152e2be67e
tree0dd46f10d70f7814d622f1862ba6bf1c1cf4e18d
parent848403d92beaf3b9afbba127b7dad22f0766e9e3
perf: Optimize event scheduling locking

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