diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-01-07 21:59:57 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 21:59:57 -0800 |
commit | fb8f6499abc6a847109d9602b797aa6afd2d5a3d (patch) | |
tree | 9b23f9dde8826bb5df266ce9be81c1d51c6e804a /init | |
parent | 8a1a48b7cd80de98d4d07ee1e78311a88c738335 (diff) | |
download | history-fb8f6499abc6a847109d9602b797aa6afd2d5a3d.tar.gz |
[PATCH] remove the BKL by turning it into a semaphore
This is the current remove-BKL patch. I test-booted it on x86 and x64, trying
every conceivable combination of SMP, PREEMPT and PREEMPT_BKL. All other
architectures should compile as well. (most of the testing was done with the
zaphod patch undone but it applies cleanly on vanilla -mm3 as well and should
work fine.)
this is the debugging-enabled variant of the patch which has two main
debugging features:
- debug potentially illegal smp_processor_id() use. Has caught a number
of real bugs - e.g. look at the printk.c fix in the patch.
- make it possible to enable/disable the BKL via a .config. If this
goes upstream we dont want this of course, but for now it gives
people a chance to find out whether any particular problem was caused
by this patch.
This patch has one important fix over the previous BKL patch: on PREEMPT
kernels if we preempted BKL-using code then the code still auto-dropped the
BKL by mistake. This caused a number of breakages for testers, which
breakages went away once this bug was fixed.
Also the debugging mechanism has been improved alot relative to the previous
BKL patch.
Would be nice to test-drive this in -mm. There will likely be some more
smp_processor_id() false positives but they are 1) harmless 2) easy to fix up.
We could as well find more real smp_processor_id() related breakages as well.
The most noteworthy fact is that no BKL-using code was found yet that relied
on smp_processor_id(), which is promising from a compatibility POV.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index af4f0a75c8a5ea..6b273a7e274de9 100644 --- a/init/main.c +++ b/init/main.c @@ -444,6 +444,10 @@ asmlinkage void __init start_kernel(void) * time - but meanwhile we still have a functioning scheduler. */ sched_init(); + /* + * Disable preemption - early bootup scheduling is extremely + * fragile until we cpu_idle() for the first time. + */ preempt_disable(); build_all_zonelists(); page_alloc_init(); |