]> git.baikalelectronics.ru Git - kernel.git/commit
workqueues: shift kthread_bind() from CPU_UP_PREPARE to CPU_ONLINE
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 9 May 2007 09:34:15 +0000 (02:34 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:30:52 +0000 (12:30 -0700)
commitd483edafa78f52ea99fd57f379376000031db2bc
tree500f4d8a3be212ececa80ead44d9658c8b7a4ce1
parent8fec73943e2f57d6704313192e7027494b5d9fd0
workqueues: shift kthread_bind() from CPU_UP_PREPARE to CPU_ONLINE

CPU_UP_PREPARE binds cwq->thread to the new CPU.  So CPU_UP_CANCELED tries to
wake up the task which is bound to the failed CPU.

With this patch we don't bind cwq->thread until CPU becomes online.  The first
wake_up() after kthread_create() is a bit special, make a simple helper for
that.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/workqueue.c