[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] [RFC PATCH 2/2] dm: only initialize full request_queue for request-based device
- From: Mike Snitzer <snitzer redhat com>
- To: Kiyoshi Ueda <k-ueda ct jp nec com>
- Cc: Nikanth Karthikesan <knikanth suse de>, linux-kernel vger kernel org, dm-devel redhat com, Alasdair Kergon <agk redhat com>, Jens Axboe <jens axboe oracle com>, Jun'ichi Nomura <j-nomura ce jp nec com>, Vivek Goyal <vgoyal redhat com>
- Subject: Re: [dm-devel] [RFC PATCH 2/2] dm: only initialize full request_queue for request-based device
- Date: Wed, 19 May 2010 10:45:42 -0400
On Wed, May 19 2010 at 10:39am -0400,
Mike Snitzer <snitzer redhat com> wrote:
> > On Wed, May 19, 2010 at 1:57 AM, Kiyoshi Ueda <k-ueda 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]