All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] enable PREEMPT_BKL on !PREEMPT+SMP too
@ 2005-05-26 11:17 Ingo Molnar
  2005-05-26 16:27 ` Lee Revell
  0 siblings, 1 reply; 2+ messages in thread
From: Ingo Molnar @ 2005-05-26 11:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Arjan van de Ven, linux-kernel


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.

patch depends on:

  consolidate-preempt-options-into-kernel-kconfigpreempt.patch

tested on x86-SMP. All other PREEMPT_BKL-using arches (x64, ppc64) 
should work fine too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

--- linux/kernel/Kconfig.preempt.orig
+++ linux/kernel/Kconfig.preempt
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] enable PREEMPT_BKL on !PREEMPT+SMP too
  2005-05-26 11:17 [patch] enable PREEMPT_BKL on !PREEMPT+SMP too Ingo Molnar
@ 2005-05-26 16:27 ` Lee Revell
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Revell @ 2005-05-26 16:27 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Andrew Morton, Arjan van de Ven, linux-kernel

On Thu, 2005-05-26 at 13:17 +0200, Ingo Molnar wrote:
> 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.

A write-intensive benchmark on a reiser3 FS is probably a good place to
start testing.

Lee


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-26 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-26 11:17 [patch] enable PREEMPT_BKL on !PREEMPT+SMP too Ingo Molnar
2005-05-26 16:27 ` Lee Revell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.