summaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-06-18 01:27:43 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 22:03:53 +0200
commitcdd140bdd6c7bc6395f08877a73c39941501af93 (patch)
tree48664b2790fb2b5152bd67bf70fb3405e1ef6e8b /kernel/sched_fair.c
parentmm: exit.c reorder wait_opts to remove padding on 64 bit builds (diff)
downloadlinux-cdd140bdd6c7bc6395f08877a73c39941501af93.tar.xz
linux-cdd140bdd6c7bc6395f08877a73c39941501af93.zip
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>
Diffstat (limited to 'kernel/sched_fair.c')
0 files changed, 0 insertions, 0 deletions