On Tue, Mar 12 2002, Oliver Neukum wrote: > On Tuesday 12 March 2002 01:15, Peter Osterlund wrote: > > Hi! > > > > I was doing some stress testing on the packet writing patch for the > > 2.4.19-pre2 kernel. I was unpacking a kernel tarball to a cdrw disk on > > a freecom usb cdrw device. After a while, some problem occurred which > > made usb-storage decide to perform a bus reset. Unfortunately it > > needed to allocate memory first and the memory allocator decided it > > needed to do IO, which led to a deadlock. > > > > I see that some changes went into 2.5.4-pre2 which I think would fix > > this problem. (Addition of a "mem_flags" parameter to various memory > > allocating functions in the usb subsystem.) > > > > Are there any plans to include this fix in the 2.4.x kernel tree? (I > > didn't see it in the latest batch from Greg KH.) > > I'd have placed a bet on somebody with a USB2.0 hard drive > being the first to see this. > > This problem and some others are indeed fixed by the mem_flag > parameter. > If you need a quick and very dirty workaround go through > usbcore and uhci to replace all occurences of GFP_KERNEL > by GFP_NOIO. > > There's an additional question here. The new code will not > deadlock, but a USB error could occur, if kmalloc fails. > Is this acceptable ?
Doesn't sound acceptable. USB needs a reserved pool to handle stuff like this, _NOIO allocations are not reliable in the same sense that GFP_KERNEL allocations are. pktcdvd goes to great lengths to assure deadlock free allocations during I/O. -- Jens Axboe _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel