Skip to content

Commit

Permalink
[PATCH] enable PREEMPT_BKL on !PREEMPT+SMP too
Browse files Browse the repository at this point in the history
The only sane way to clean up the current 3 lock_kernel() variants seems to
be to remove the spinlock-based BKL implementations altogether, and to keep
the semaphore-based one only.  If we dont want to do that for whatever
reason then i'm afraid we have to live with the current complexity.  (but
i'm open for other cleanup suggestions as well.)

To explore this possibility we'll (at a minimum) have to know whether the
semaphore-based BKL works fine on plain SMP too.  The patch below enables
this.

The patch may make sense in isolation as well, as it might bring
performance benefits: code that would formerly spin on the BKL spinlock
will now schedule away and give up the CPU.  It might introduce performance
regressions as well, if any performance-critical code uses the BKL heavily
and gets overscheduled due to the semaphore.  I very much hope there is no
such performance-critical codepath left though.

Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jun 25, 2005
1 parent cc19ca8 commit f704f56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/Kconfig.preempt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ config PREEMPT

config PREEMPT_BKL
bool "Preempt The Big Kernel Lock"
depends on PREEMPT
depends on SMP || PREEMPT
default y
help
This option reduces the latency of the kernel by making the
Expand Down

0 comments on commit f704f56

Please sign in to comment.