kernel - Add callback API for mpipe * Add a callback API for mpipe which uses a dedicated kthread, allowing clients to avoid deadlocks related to held locks during strategy calls. * Add mpipe_alloc_callback(). Use of this function also requires that MPF_CALLBACK be supplied to mpipe_init(). * Add mpipe_wait(). This function may be used for clients which which to roll their own mpipe retry loop (or already have their own thread(s) to deal with it in a safe manner).
Bring in a bunch of well tested MPIPE changes. Preallocate a minimum number of mpipe elements when it is initialized. Use an array to cache free MPIPE buffers nad remove the data structure overloading that was previously occuring on the buffer itself. Add a deconstructor. Separate the blocking and non-blocking allocation APIs into their own functions. The new code still needs Giant, but it's getting a lot closer to being lock free.
Add the MPIPE subsystem. This subsystem is used for 'pipelining' fixed-size allocations. Pipelining is used to avoid lack-of-resource deadlocks by still allowing resource allocations to 'block' by guarenteeing that an already in-progress operation will soon free memory that will be immediately used to satisfy the blocked resource. Adjust the ATAold code to use the new mechanism and remove the code that tried to back-off into PIO mode when resources were lacking.