Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   block: Avoid deadlocks with bio allocation by stacking drivers (http://www.linux-archive.org/device-mapper-development/698923-block-avoid-deadlocks-bio-allocation-stacking-drivers.html)

Alasdair G Kergon 08-29-2012 04:57 PM

block: Avoid deadlocks with bio allocation by stacking drivers
 
On Wed, Aug 29, 2012 at 09:50:06AM -0700, Kent Overstreet wrote:
> The other thing we could do is make the rescuer thread per block device
> (which arguably makes more sense than per bio_set anyways), then
> associate bio_sets with specific block devices/rescuers.

For dm, it's equivalent - already one bioset required per live device:
dm_alloc_md_mempools().

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Alasdair G Kergon 08-29-2012 05:23 PM

block: Avoid deadlocks with bio allocation by stacking drivers
 
On Wed, Aug 29, 2012 at 10:13:45AM -0700, Kent Overstreet wrote:
> Only on allocation failure.

Which as you already said assumes wrapping together the other mempools in the
submission path first...

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Alasdair G Kergon 09-10-2012 10:50 PM

block: Avoid deadlocks with bio allocation by stacking drivers
 
On Mon, Sep 10, 2012 at 03:09:10PM -0700, Tejun Heo wrote:
> On Mon, Sep 10, 2012 at 02:56:33PM -0700, Kent Overstreet wrote:
> > commit df7e63cbffa3065fcc4ba2b9a93418d7c7312243
> > Author: Kent Overstreet <koverstreet@google.com>
> > Date: Mon Sep 10 14:33:46 2012 -0700
> >
> > block: Avoid deadlocks with bio allocation by stacking drivers

> > Note that this doesn't do anything for allocation from other mempools.

Note that dm has several cases of this, so this patch should not be used with
dm yet. Mikulas is studying those cases to see whether anything like this
might be feasible/sensible or not.

> I'm still a bit scared but think this is correct.
> Acked-by: Tejun Heo <tj@kernel.org>

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Alasdair G Kergon 09-10-2012 11:09 PM

block: Avoid deadlocks with bio allocation by stacking drivers
 
On Mon, Sep 10, 2012 at 04:01:01PM -0700, Tejun Heo wrote:
> IIUC, Kent posted a patch which converts all of them to use front-pad

The only patch I saw posted here only handles one of the easier cases so far.

The others are a bit trickier and probably involve a decision about which way to
change an in-kernel dm interface.

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Alasdair G Kergon 09-10-2012 11:45 PM

block: Avoid deadlocks with bio allocation by stacking drivers
 
On Mon, Sep 10, 2012 at 04:35:02PM -0700, Tejun Heo wrote:
> debug. Would it be difficult to convert dm drivers to collect size
> requirements and use front-pad for all per-bio data?

I can't give a quick answer because a single bio may require a variable
number (depending on the bio content) of (sequential) mempool_allocs from the
same mempool to complete its processing, so we do have to audit all this very
carefully to see what can/can't be pulled out.

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 03:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.