Re: [PATCH] backing dev unplugging

From: Jens Axboe
Date: Thu Mar 11 2004 - 01:45:49 EST


On Wed, Mar 10 2004, Andrew Morton wrote:
>
> (Please use reply-to-all)
>
> "Miquel van Smoorenburg" <miquels@xxxxxxxxxx> wrote:
> >
> > In article <20040310210207.GL15087@xxxxxxx>,
> > Jens Axboe <axboe@xxxxxxx> wrote:
> > >On Wed, Mar 10 2004, Andrew Morton wrote:
> > >> Jens Axboe <axboe@xxxxxxx> wrote:
> > >> >
> > >> > Here's a first cut at killing global plugging of block devices to reduce
> > >> > the nasty contention blk_plug_lock caused.
> > >>
> > >> Shouldn't we take read_lock(&md->map_lock) in dm_table_unplug_all()?
> > >
> > >Ugh yes, we certainly should.
> >
> > With the latest patches from Joe it would be more like
> >
> > map = dm_get_table(md);
> > if (map) {
> > dm_table_unplug_all(map);
> > dm_table_put(map);
> > }
> >
> > No lock ranking issues, you just get a refcounted map (table, really).
>
> Ah, OK. Jens, you'll be needing this (on rc2-mm1):
>
> dm.c: protect md->map with a rw spin lock rather than the md->lock
> semaphore. Also ensure that everyone accesses md->map through
> dm_get_table(), rather than directly.

Neato, much better. I'll build on top of that.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/