Re: Do usb_submit_urb() memory allocation errors really exist in the wild?

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

 



On Di, 2019-02-26 at 19:42 +0100, Petr Tesarik wrote:
> On Tue, 26 Feb 2019 13:46:19 +0100
> Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx> wrote:
> 
> > [...]
> > > USB and "critical" should never be in the same sentance, without the
> > > word "not" being in there as well. :)  
> > 
> > Fair enough. It might still annoy someone, which computers were never meant to.
> > :)
> 
> I prefer to say "unrecoverable". While a block device may simply retry
> a write, and nobody notices (unless it's to frequent), it's easily
> audible (and may be annoying) if a USB sound card skips a frame.

No, I am sorry but this is something I need to correct. You cannot
easily recover from ENOMEM in a block driver.
The reason is virtual memory. The common reason why you would get
ENOMEM is memory pressure. Under memory pressure the system is writing
out dirty pages, either to swap or a file.
The SCSI layer can deal with blocked devices, but at some point,
you need to make progress.

In other words, the critical case is with GFP_NOIO. I think
GFP_KERNEL will not realistically fail. GFP_NOIO, now that is
a different question.

	Regards
		Oliver




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

  Powered by Linux