]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: Don't complete on a remote CPU in force threaded mode
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 4 Dec 2020 19:13:54 +0000 (20:13 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Dec 2020 20:41:30 +0000 (13:41 -0700)
commitd19fa8d94cdba03a751d52070bb2e1eeb488f1aa
treef6bdd8e4284ddceac8deb41eba2896bb32093870
parentd1611cc4f01d72884f57f9643eb307f2dc13af9c
blk-mq: Don't complete on a remote CPU in force threaded mode

With force threaded interrupts enabled, raising softirq from an SMP
function call will always result in waking the ksoftirqd thread. This is
not optimal given that the thread runs at SCHED_OTHER priority.

Completing the request in hard IRQ-context on PREEMPT_RT (which enforces
the force threaded mode) is bad because the completion handler may
acquire sleeping locks which violate the locking context.

Disable request completing on a remote CPU in force threaded mode.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c