From: Andrea Arcangeli <andrea@novell.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>,
William Lee Irwin III <wli@holomorphy.com>,
Arjan van de Ven <arjanv@redhat.com>,
Lee Revell <rlrevell@joe-job.com>
Subject: Re: [patch] remove the BKL (Big Kernel Lock), this time for real
Date: Sun, 19 Sep 2004 01:36:19 +0200 [thread overview]
Message-ID: <20040918233619.GF15426@dualathlon.random> (raw)
In-Reply-To: <20040918080214.GC31899@elte.hu>
On Sat, Sep 18, 2004 at 10:02:14AM +0200, Ingo Molnar wrote:
> what do you mean? If something does lock_kernel() within spin_lock()
> then the might_sleep() check in down() catches it and will print a
> warning. [..]
I didn't see any patch that removed the CONFIG_DEBUG_SPINLOCK_SLEEP
config option and avoided might_sleep to be defined to noop. If we apply
your patch that's something we need IMHO, and that's what I meant with
"it still doesn't track the lock_kernel usage inside a spinlock", I
didn't specify "_always_ track the lock_kernel usage inside a spinlock",
but I thought the "always" was implicitly, clearly it was not, sorry for
not clarifying this.
> [..] In any case it's very likely a _bug_ so we want to know!)
wanting to know is fine with me, what's not fine with me is deadlocking
a production box after that, when it could be a legitimate usage. It's
not about the printk, it's about the following crash. As said this thing
spreads all over the place, especially in possibly bogus drivers out of
the tree, and I don't think it provides any significant benefit (Ok I'm
biased since I tend to think about PREEMPT=n where a semaphore won't
provide any benefit, and if there's any latency issue with the BKL that
can be fixed without risks with cond_resched_bkl as pointed out
earlier and it definitely doesn't need this patch). And as Linus
mentioned the risk of overscheduling is also possible with the semaphore
but that's the minor issue in this IMHO.
So in short if you change your patch to only add checks that leads into
printk that's very much fine with me (basically you would have to change
lock_kernel() to add an unconditional might_sleep in there, and the
other stuff for the smp_processor_id). I'm not against wanting to know.
Overall I still don't see any benefit. The thing to fix is the
lock_kernel global lock concept that doesn't scale and doesn't
self-document what is being locked against what. IMHO changing the
lock_kernel internal details in a way that changes the semantics in a
subtle manner cannot bring any long term benefit and it can only hurt
the short term due the potentail breakage it introduces.
next prev parent reply other threads:[~2004-09-18 23:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 15:18 [patch] remove the BKL (Big Kernel Lock), this time for real Ingo Molnar
2004-09-15 15:40 ` Linus Torvalds
2004-09-15 15:55 ` Ingo Molnar
2004-09-15 17:04 ` Ricky Beam
2004-09-15 19:39 ` Ingo Molnar
2004-09-15 18:28 ` Chris Wedgwood
2004-09-15 21:25 ` William Lee Irwin III
2004-09-17 10:39 ` Ingo Molnar
2004-09-17 12:53 ` Ingo Molnar
2004-09-17 20:56 ` Andrea Arcangeli
2004-09-18 8:02 ` Ingo Molnar
2004-09-18 23:36 ` Andrea Arcangeli [this message]
2004-09-17 13:26 ` Andrea Arcangeli
2004-09-17 13:47 ` William Lee Irwin III
2004-09-17 13:56 ` Andrea Arcangeli
2004-09-17 14:18 ` William Lee Irwin III
2004-09-17 15:16 ` Linus Torvalds
[not found] <2EJTp-7bx-1@gated-at.bofh.it>
2004-09-15 15:46 ` Andi Kleen
2004-09-15 15:58 ` Ingo Molnar
2004-09-15 20:11 ` Ingo Molnar
2004-09-16 1:17 ` Nick Piggin
2004-09-16 14:28 ` Bill Davidsen
2004-09-16 22:29 ` Bill Huey
2004-09-16 22:40 ` David S. Miller
2004-09-16 22:51 ` Bill Huey
2004-09-16 22:54 ` David S. Miller
2004-09-16 23:01 ` Bill Huey
2004-09-16 23:33 ` William Lee Irwin III
2004-09-17 6:43 ` Ingo Molnar
2004-09-17 7:21 ` Tony Lee
-- strict thread matches above, loose matches on Subject: below --
2004-09-18 5:44 Manfred Spraul
2004-09-18 13:09 ` Ingo Molnar
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=20040918233619.GF15426@dualathlon.random \
--to=andrea@novell.com \
--cc=akpm@osdl.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rlrevell@joe-job.com \
--cc=torvalds@osdl.org \
--cc=wli@holomorphy.com \
/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