]> git.karo-electronics.de Git - linux-beck.git/commit
task_work: Make task_work_add() lockless
authorOleg Nesterov <oleg@redhat.com>
Sun, 26 Aug 2012 19:12:09 +0000 (21:12 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 13 Sep 2012 14:47:33 +0000 (16:47 +0200)
commitac3d0da8f3290b3d394cdb7f50604424a7cd6092
treec1a126ac8ab3d87f22baaa51fd786f3c56c22327
parent15674868d6c5985466835c56dd89d39235f16302
task_work: Make task_work_add() lockless

Change task_work's to use llist-like code to avoid pi_lock
in task_work_add(), this makes it useable under rq->lock.

task_work_cancel() and task_work_run() still use pi_lock
to synchronize with each other.

(This is in preparation for a deadlock fix.)

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120826191209.GA4221@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/task_work.c