[dm-devel] [RFC PATCH 2/2] dm: only initialize full request_queue for request-based device
Mike Snitzer
snitzer at redhat.com
Wed May 19 14:45:42 UTC 2010
On Wed, May 19 2010 at 10:39am -0400,
Mike Snitzer <snitzer at redhat.com> wrote:
> > On Wed, May 19, 2010 at 1:57 AM, Kiyoshi Ueda <k-ueda at ct.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
More information about the dm-devel
mailing list