On Di, 2019-02-26 at 13:09 +0100, Nicolas Saenz Julienne wrote: > Hi, > as I'm sure most of you are aware of, every URB submission triggers a small > memory allocation in the host controller. On top of that it might be run in > atomic context. This has always seemed to me as a possible source of very hard > to reproduce and potentially nasty issues. For example I'm thinking of embedded > systems driving some critical operation through USB. > > I wonder if anyone has been able to log any failure on that area. I was unable > to find anything on the relevant bugzillas, nor by talking with some > knowledgeable people. Note that some drivers actively protect themselves from > URB submission failures, taking care to resubmit them (see usbhid/hid-core.c). Network drivers do see failures with GFP_ATOMIC. I doubt we have drivers likely to exhaust the atomic pool on their own, but that is not the question, as cooperation may do it. We did see deadlocks in 2.4, when memory reclamation ran while usb-storage was in use. That indicates that reclamation, if it runs, will save us, but that means that submissions may block for considerable time (seconds potentially). Regards Oliver