From: Arnd Bergmann <arnd@arndb.de>
To: Jens Axboe <jaxboe@fusionio.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Jan Beulich <JBeulich@novell.com>,
Daniel Stodden <daniel.stodden@citrix.com>
Subject: Re: you patch "block: push down BKL into .open and .release" and its changes to xen-blkfront.c
Date: Wed, 25 Aug 2010 13:28:26 +0200 [thread overview]
Message-ID: <201008251328.26622.arnd@arndb.de> (raw)
In-Reply-To: <4C74F831.3040400@fusionio.com>
On Wednesday 25 August 2010, Jens Axboe wrote:
>
> On 2010-08-25 12:59, Jan Beulich wrote:
> > Arnd,
> >
> > what was the point of adding {,un}lock_kernel() to blkif_open() and
> > blkif_release()? Afaict, the associated bdev is protected by a mutex
> > anyway, so even without Daniel's addition of a mutex to these
> > paths I don't see the need for the BKL here.
>
> I'll let Arnd answer for himself, but at least in general it's
> much easier to let this sort of auditing and final cleanup
> be done my the maintainer(s) of the driver in question, as they
> are best positioned to verify that the BKL in fact isn't
> really necessary in that path anymore.
Traditionally, we were holding the BKL in common code while calling
block device open/release functions. In order to remove the BKL from
the block layer itself, I blindly pushed it into all the block
device drivers to make sure I don't break any driver that has a
hidden dependency on being called under a global lock.
The next step is to go through all drivers one by one and remove
the BKL from them, either by replacing it with a mutex or dropping
it entirely.
The only reason why you might need it is that you might be accessing
global state of the driver that is not protected by the per-device
mutex. If you know that this is not the case for a driver, then please
submit a patch to remove the BKL there.
Arnd
prev parent reply other threads:[~2010-08-25 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-25 10:59 you patch "block: push down BKL into .open and .release" and its changes to xen-blkfront.c Jan Beulich
2010-08-25 11:02 ` Jens Axboe
2010-08-25 11:28 ` Arnd Bergmann [this message]
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=201008251328.26622.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=JBeulich@novell.com \
--cc=daniel.stodden@citrix.com \
--cc=jaxboe@fusionio.com \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.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 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.