The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: Arjan van de Ven <arjanv@infradead.org>, linux-kernel@vger.kernel.org
Subject: [patch] enable PREEMPT_BKL on !PREEMPT+SMP too
Date: Thu, 26 May 2005 13:17:42 +0200	[thread overview]
Message-ID: <20050526111742.GA18272@elte.hu> (raw)


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

             reply	other threads:[~2005-05-26 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26 11:17 Ingo Molnar [this message]
2005-05-26 16:27 ` [patch] enable PREEMPT_BKL on !PREEMPT+SMP too Lee Revell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050526111742.GA18272@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=arjanv@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox