[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091011111543.1cbb9a0e@tpl.lwn.net>
Date: Sun, 11 Oct 2009 11:15:43 -0600
From: Jonathan Corbet <corbet@....net>
To: Jonathan Corbet <corbet@....net>
Cc: John Kacur <jkacur@...hat.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Frederic Weisbecker <fweisbec@...il.com>,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Vincent^M^J Sanders <vince@...tec.co.uk>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] sound_core.c: Remove BKL from soundcore_open
On Sun, 11 Oct 2009 09:20:15 -0600
Jonathan Corbet <corbet@....net> wrote:
> Changing the
> BKL to a mutex is a real semantic change which requires a real survey
> of the code affected.
One other aspect of this I forgot to mention...it's actually possible
(if unlikely) that one of those lower-level open routines depends on
the BKL's release-on-sleep semantics. Swapping in a mutex would change
that behavior, possibly resulting in deadlocks.
I think it was Alan who once pointed out that the BKL is badly
misnamed. It isn't really a lock, it's a modified execution
environment designed to let naive kernel code think it's still running
in a uniprocessor, no-preemption situation. Replacing the BKL with a
different lock changes that environment, so one has to be *really*
careful about looking for any assumptions which may remain in the code.
That's why BKL-hunting is harder than it looks - and why the BKL has
hung around for all these years.
jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists