* you patch "block: push down BKL into .open and .release" and its changes to xen-blkfront.c
@ 2010-08-25 10:59 Jan Beulich
2010-08-25 11:02 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-08-25 10:59 UTC (permalink / raw)
To: arnd
Cc: jaxboe, Jeremy Fitzhardinge, xen-devel@lists.xensource.com,
Daniel Stodden
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.
Thanks, Jan
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: you patch "block: push down BKL into .open and .release" and its changes to xen-blkfront.c
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
0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2010-08-25 11:02 UTC (permalink / raw)
To: Jan Beulich
Cc: Jeremy Fitzhardinge, xen-devel@lists.xensource.com, arnd@arndb.de,
Daniel Stodden
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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: you patch "block: push down BKL into .open and .release" and its changes to xen-blkfront.c
2010-08-25 11:02 ` Jens Axboe
@ 2010-08-25 11:28 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2010-08-25 11:28 UTC (permalink / raw)
To: Jens Axboe
Cc: Jeremy Fitzhardinge, xen-devel@lists.xensource.com, Jan Beulich,
Daniel Stodden
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-25 11:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.