public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kernel_thread() & thread starting
@ 2001-02-18 22:24 Kenn Humborg
  2001-02-18 22:53 ` Russell King
  2001-02-19 10:17 ` Philipp Rumpf
  0 siblings, 2 replies; 9+ messages in thread
From: Kenn Humborg @ 2001-02-18 22:24 UTC (permalink / raw)
  To: Linux-Kernel


In init/main.c, do_basic_setup() we have:

	start_context_thread();
	do_initcalls();

start_context_thread() calls kernel_thread() to start the keventd
thread.  Then do_initcalls() calls all the init functions and
finishes by calling flush_scheduled_tasks().  This function ends
up calling schedule_task() which checks if keventd is running.

With a very stripped down kernel, it seems possible that do_initcalls()
can complete without context_thread() having had a chance to run (and
set the flag that keventd is running).

Right now, in the Linux/VAX project, I'm working with a very stripped
down kernel and I'm seeing this behaviour.  Depending on what I enable
in the .config, I can get schedule_task() to fail with:

   schedule_task(): keventd has not started

When starting bdflush and kupdated, bdflush_init() uses a semaphore to
make sure that the threads have run before continuing.  Shouldn't
start_context_thread() do something similar?

Or am I missing something?

Thanks,
Kenn


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <Pine.LNX.3.96.1010219073717.16489K-100000@mandrakesoft.mandrakesoft.com>]

end of thread, other threads:[~2001-02-21  0:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-18 22:24 kernel_thread() & thread starting Kenn Humborg
2001-02-18 22:53 ` Russell King
2001-02-21  0:51   ` Kenn Humborg
2001-02-19 10:17 ` Philipp Rumpf
2001-02-19 10:32   ` David Woodhouse
2001-02-19 12:44     ` Andrew Morton
     [not found] <Pine.LNX.3.96.1010219073717.16489K-100000@mandrakesoft.mandrakesoft.com>
2001-02-19 21:17 ` Russell King
2001-02-19 21:40   ` Philipp Rumpf
2001-02-19 22:25     ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox