]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: Don't disable preemption around __blk_mq_run_hw_queue().
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 22 Jun 2022 08:25:54 +0000 (10:25 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Jun 2022 12:29:12 +0000 (06:29 -0600)
commit865dece7e50a2ddcc2d029c5854d4bf6e58e60fa
tree0490614677bcd623cf875505e330b3089eb9582c
parenta2587418124f4bc1ad174ea7d3eb5a844ae6b790
blk-mq: Don't disable preemption around __blk_mq_run_hw_queue().

__blk_mq_delay_run_hw_queue() disables preemption to get a stable
current CPU number and then invokes __blk_mq_run_hw_queue() if the CPU
number is part the mask.

__blk_mq_run_hw_queue() acquires a spin_lock_t which is a sleeping lock
on PREEMPT_RT and can't be acquired with disabled preemption.

It is not required for correctness to invoke __blk_mq_run_hw_queue() on
a CPU matching hctx->cpumask. Both (async and direct requests) can run
on a CPU not matching hctx->cpumask.

The CPU mask without disabling preemption and invoking
__blk_mq_run_hw_queue().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/YrLSEiNvagKJaDs5@linutronix.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c