Re: [Stable-review] [93/93] dm mpath: fix stall when requeueing io

From: Linus Torvalds
Date: Tue Feb 23 2010 - 12:02:15 EST




On Tue, 23 Feb 2010, Greg KH wrote:
> On Sun, Feb 21, 2010 at 05:07:25PM +0100, Stefan Bader wrote:
> > >
> > > Signed-off-by: Kiyoshi Ueda <k-ueda@xxxxxxxxxxxxx>
> > > Signed-off-by: Jun'ichi Nomura <j-nomura@xxxxxxxxxxxxx>
> > > Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx>
> > >
> > > blk_start_request(rq);
> > > spin_unlock(q->queue_lock);
> > > - map_request(ti, rq, md);
> > > + if (map_request(ti, rq, md))
> > > + goto requeued;
> > > spin_lock_irq(q->queue_lock);
> > > }
> >
> > While looking over the code I also noticed that the spinlock is dropped with
> > spin_unlock and then reacquired with spin_lock_irq. Isn't the irq version too
> > much in that case? Or was the intention to have interrupts enabled when unlocking?
>
> Ick, thanks for the review. I'll drop this patch for now and fix it up
> in the next release if needed.

This part of the commentary seems to be relevant for mainline too.

According to git logs, this spin_unlock/spin_lock_irq imbalance goes back
to commit cec47e3d4a (last June). Maybe there's some reason for it, but it
does look odd.

Ueda-san, Nomura-san, Alasdair? Comments?

Linus
--
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/