RE: [PATCH 1/2] xhci: Avoid infinite loop when sg urb requires too many trbs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 9 Jan 2014, David Laight wrote:

> From: Alan Stern
> > On Thu, 9 Jan 2014, David Laight wrote:
> > 
> > > > From: Sarah Sharp
> > > > Currently prepare_ring() returns -ENOMEM if the urb won't fit into a
> > > > single ring segment.  usb_sg_wait() treats this error as a temporary
> > > > condition and will keep retrying until something else goes wrong.
> > >
> > > Even if it were a temporary condition then an immediate retry
> > > is rather pointless.
> > > Retry after a slight delay might make some sense.
> > 
> > There is a yield().  It could be changed to something longer.
> 
> Will yield allow low priority processes to run?

No (depending to some extent on the scheduler).

> > > Of course, if this is the pagedaemon trying to write out
> > > pages in order to generate some free kernel memory all is lost
> > > as soon as the usb subsystem need to allocate memory in order
> > > to perform a transfer.
> > 
> > That never happens, because all memory allocation requests on the
> > storage I/O pathway are done using GFP_NOIO.
> 
> Picking hairs - not the ones in the xhci driver if, for example,
> it has to extend the rings.

If that is true, it is a bug in xhci-hcd.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux