[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100519144542.GD24618@redhat.com>
Date: Wed, 19 May 2010 10:45:42 -0400
From: Mike Snitzer <snitzer@...hat.com>
To: Kiyoshi Ueda <k-ueda@...jp.nec.com>
Cc: Nikanth Karthikesan <knikanth@...e.de>,
linux-kernel@...r.kernel.org, dm-devel@...hat.com,
Vivek Goyal <vgoyal@...hat.com>,
Jens Axboe <jens.axboe@...cle.com>,
"Jun'ichi Nomura" <j-nomura@...jp.nec.com>,
Alasdair Kergon <agk@...hat.com>
Subject: Re: [RFC PATCH 2/2] dm: only initialize full request_queue for
request-based device
On Wed, May 19 2010 at 10:39am -0400,
Mike Snitzer <snitzer@...hat.com> wrote:
> > On Wed, May 19, 2010 at 1:57 AM, Kiyoshi Ueda <k-ueda@...jp.nec.com> wrote:
> > > Hi Mike,
> > >
> > > dm_table_setup_md_queue() may allocate memory with blocking mode.
> > > Blocking allocation inside exclusive _hash_lock can cause deadlock;
> > > e.g. when it has to wait for other dm devices to resume to free some
> > > memory.
<snip>
> We discussed this and I understand the scope of the problem now.
>
> Just reiterating what you covered when you first pointed this issue out:
>
> It could be that a table load gets blocked (waiting on a memory
> allocation). The table load can take as long as it needs. But we can't
> have it block holding the exclusive _hash_lock while blocking. Having
> _hash_lock prevents further DM ioctls. The table load's allocation may
> be blocking waiting for writeback to a DM device that will be resumed by
> another thread.
>
> Thanks again for pointing this out; I'll work to arrive at an
> alternative locking scheme. Likely introduce a lock local to the
> multiple_device (effectively the 'queue_lock' I had before). But
s/multiple_device/mapped_device/
Mike
--
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