It's called from tq_disk only, which is in process context. So at least
on that ground lets say that it is at least not technically illegal to
block.
> 2) blocking is really bad news depending on how we got to the
> request function, which is not a really predictable thing, since
> i) it can change with every kernel version
> ii) it depends on what somebody else does
I don't agree with that. You get there from an unplug, which happens
from process context as already established. If you get there from other
places, it means that you are calling your request_fn from elsewhere in
your driver (typically recalling request_fn from isr or bottom half to
queue more I/O), and in that case it's your own responsibility.
> 3) if we block against memory for buffers, in particular, the
> the system is now very likely to be dead, since VM just went
> synchronous.
Of course that is a tricky area. You shouldn't be doing memory
allocations inside the request_fn, that's just bad design, period.
The one reason why blocking inside the request_fn is bad, is that it
prevents the following queues on the tq_disk list from being run. And
subsequent tq_disk runs will not unplug them, since run_task_queue()
clears the list prior to starting.
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/