diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-06-28 10:40:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-28 17:56:51 -0400 |
commit | f340c0d1a3f40fdcba69cd291530a4debc58748f (patch) | |
tree | 22fca5983aff6ce2aa7d4ede0b031666dfe1f28d /init | |
parent | 082cf69eb82681f4eacb3a5653834c7970714bef (diff) |
[PATCH] Tweak idle thread setup semantics
This patch tweaks idle thread setup semantics a bit: instead of setting
NEED_RESCHED in init_idle(), we do an explicit schedule() before calling
into cpu_idle().
This patch, while having no negative side-effects, enables wider use of
cond_resched()s. (which might happen in the stock kernel too, but it's
particulary important for voluntary-preempt)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index d324801729ba..b5e421e39ede 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -383,6 +383,13 @@ static void noinline rest_init(void) | |||
383 | numa_default_policy(); | 383 | numa_default_policy(); |
384 | unlock_kernel(); | 384 | unlock_kernel(); |
385 | preempt_enable_no_resched(); | 385 | preempt_enable_no_resched(); |
386 | |||
387 | /* | ||
388 | * The boot idle thread must execute schedule() | ||
389 | * at least one to get things moving: | ||
390 | */ | ||
391 | schedule(); | ||
392 | |||
386 | cpu_idle(); | 393 | cpu_idle(); |
387 | } | 394 | } |
388 | 395 | ||