On Tue, Jun 04, 2019 at 11:17:35AM -0700, Bart Van Assche wrote: > No code that occurs between blk_mq_get_ctx() and blk_mq_put_ctx() depends > on preemption being disabled for its correctness. Since removing the CPU > preemption calls does not measurably affect performance, simplify the > blk-mq code by removing the blk_mq_put_ctx() function and also by not > disabling preemption in blk_mq_get_ctx(). I like the idea behinds this, but I think it makes some small issues we have in the current code even worse. As far as I can tell the idea behind this call was that we operate on the same blk_mq_ctx for the duration of the I/O submission. Now it should not matter which one, that is we don't care if we get preempted, but it should stay the same. To actually make this work properly we'll need to pass down the blk_mq_ctx into the I/O scheduler merge path, which dereference it. Note that I also have an outstanding series to pass down an additional parameter there (the bi_phys_segments removal) so we'll need to coordinate that.