Re: [PATCH] Don't retry SG_IO (REQ_BLOCK_PC) commands.

Jens Axboe
2003-11-21T10:17:46Z

On Thu, Nov 20 2003, Patrick Mansfield wrote:
> On Thu, Nov 20, 2003 at 08:16:51PM +0100, Jens Axboe wrote:
> > On Thu, Nov 20 2003, Mike Anderson wrote:
> > > Patrick Mansfield [patmans@us.ibm.com] wrote:
> > > > Don't retry SG_IO (REQ_BLOCK_PC) commands.
> > >
> > > Should we also have the REQ_BLOCK_PC requests set REQ_FAILFAST? The
> > > patch to sd will imply the same behavior.
> >
> > Definitely!
>
> Should the setting of REQ_FAILFAST be expanded to prevent requeueing after
> a device or host reports queue full?

Not without extra hints.

> There are probably many SG_IO users that would want them retried, others
> (multimedia?) might not want a retry. Multi-path would *not* want them
> retried (well at least the host queue full).
>
> For IO that cannot be sent to the device (if we have !scsi_dev_queue_ready()
> or !scsi_host_queue_ready()), it is unclear if REQ_FAILFAST should
> complete the IO without ever having sent it to the device.
>
> If we expand the checks for REQ_FAILFAST, the SG_IO user interface should
> allow the conditional setting of it.

Yes, we would need to be able to pass that hint in from user space. A
SG_FLAG_NO_RETRY would work.

--
Jens Axboe