diff options
| author | Oleg Nesterov <[email protected]> | 2009-06-17 16:27:43 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-06-18 13:03:53 -0700 |
| commit | cdd140bdd6c7bc6395f08877a73c39941501af93 (patch) | |
| tree | 48664b2790fb2b5152bd67bf70fb3405e1ef6e8b /include/linux/debugobjects.h | |
| parent | e1eb1ebcca871673c76caf63335c4237680040f1 (diff) | |
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 <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Vitaliy Gusev <[email protected]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions