Re: [PATCH 2/4] kthreads: simplify the startup synchronization

From: Rusty Russell
Date: Sat Jan 31 2009 - 06:40:02 EST


On Friday 30 January 2009 23:03:54 Oleg Nesterov wrote:
> 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@xxxxxxxxxx>

Nice! I'll apply this one after the minor respin of 1/4.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/