Oleg Nesterov cdd140bdd6 kthreads: simplify the startup synchronization
We use two completions two create the kernel thread, this is a bit ugly.
kthread() wakes up create_kthread() via ->started, then create_kthread()
wakes up the caller kthread_create() via ->done.  But kthread() does not
need to wait for kthread(), it can just return.  Instead kthread() itself
can wake up the caller of kthread_create().

Kill kthread_create_info->started, ->done is enough.  This improves the
scalability a bit and sijmplifies the code.

The only problem if kernel_thread() fails, in that case create_kthread()
must do complete(&create->done).

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Vitaliy Gusev <vgusev@openvz.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18 13:03:53 -07:00
..
2008-10-16 11:21:30 -07:00
2009-05-20 10:34:32 +02:00
2009-06-16 19:47:48 -07:00
2008-07-28 14:37:38 +02:00
2009-05-15 07:56:24 -05:00
2009-06-16 19:47:48 -07:00
2009-01-14 18:09:02 +01:00
2008-09-02 19:21:40 -07:00
2009-03-30 22:05:16 +10:30
2008-02-06 10:41:02 -08:00
2009-06-16 19:47:48 -07:00
2009-06-16 19:50:13 -07:00
2009-06-15 21:30:23 -07:00
2009-04-14 17:17:16 +02:00