From: Oleg Nesterov Date: Wed, 17 Jun 2009 23:27:43 +0000 (-0700) Subject: kthreads: simplify the startup synchronization X-Git-Tag: v2.6.31-rc1~204 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd140bdd6c7bc6395f08877a73c39941501af93;p=pandora-kernel.git 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 Cc: Christoph Hellwig Cc: "Eric W. Biederman" Cc: Ingo Molnar Cc: Pavel Emelyanov Cc: Rusty Russell Cc: Vitaliy Gusev Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed