Thread (23 messages) flat view 23 messages, 3 authors, 2016-10-19

Re: Oops on Power8 (was Re: [PATCH v2 1/7] workqueue: make workqueue available early during boot)

From: Tejun Heo <tj@kernel.org>
Date: 2016-10-10 12:53:25
Also in: lkml

On Mon, Oct 10, 2016 at 10:17:16PM +1100, Balbir Singh wrote:
rest_init()
{
	...
	kernel_thread(kernel_init, NULL, CLONE_FS);
	numa_default_policy();
	pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
	rcu_read_lock();
	kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);
	...

}

create_worker() needs kthreadd, it wakes up kthreadd in kthread_create_on_node,
workqueue_init() is called from kernel_init() , but kthreadd is created after
the call to kernel_init(), so its touch and go
But the first thing kernel_init_freeable() does is
wait_for_completion(&kthreadd_done).

Thanks.

-- 
tejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help