On Tue, Mar 12 2002, Oliver Neukum wrote:
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.
Are there other scsi drivers who need to allocate memory to process a request ? How do they solve the problem ?
Not to my knowledge. The mid layer in 2.5 allocates scatter tables at init I/O time, they are protected by the mempool setup though. This is exactly the kind of precautions one needs to take to ensure deadlock free I/O. Just changing GFP_KERNEL to GFP_NOIO is not good enough. -- Jens Axboe