blk-mq: fix blk_mq_start_stopped_hw_queues from irq context
PATCH 1/1 blk-mq: fix blk_mq_start_stopped_hw_queues from irq context
The only caller of blk_mq_start_stopped_hw_queues is in irq context, leading to lockdep splat when it actually gets called. Fix this by deferring the hw queue run to workqueue context.
block/blk-mq.c +2 -1
@@ -686,7 +686,8 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q)if (!test_bit (BLK_MQ_S_STOPPED , &hctx->state))continue ; -blk_mq_start_hw_queue (hctx); +clear_bit (BLK_MQ_S_STOPPED , &hctx->state); +blk_mq_run_hw_queue (hctx, true); } }EXPORT_SYMBOL (blk_mq_start_stopped_hw_queues);
Quoted 11 lines · Christoph Hellwig
The only caller of
blk_mq_start_stopped_hw_queuesis in irq context, leading to lockdep splat when it actually gets called. Fix this by deferring the hw queue run to workqueue context.Signed-off-by Christoph Hellwig <[email protected]>block/blk-mq.c +0
-0
block/blk-mq.c void blk_mq_start_stopped_hw_queues(struct request_queue *q) · line 693
Quoted 9 lines
block/blk-mq.c +2
-1@@ -686,7 +686,8 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q)if (!test_bit (BLK_MQ_S_STOPPED , &hctx->state))continue ; -blk_mq_start_hw_queue (hctx); +clear_bit (BLK_MQ_S_STOPPED , &hctx->state); +blk_mq_run_hw_queue (hctx, true); } }EXPORT_SYMBOL (blk_mq_start_stopped_hw_queues);
Thanks, applied. Might not be a bad idea to just mimic the run queue API, and provide a blk_mq_start_hw_queue(hctx, is_async) instead.
Signature · 1 line
Jens Axboe
Quoted 2 lines · Jens Axboe
Thanks, applied. Might not be a bad idea to just mimic the run queue API, and provide a
blk_mq_start_hw_queue(hctx, is_async)instead.
I have to see I really don't like this is_async, I'd much preper to untangle those into separate versions further up the stack similar to how the old blk_run_queue variants work.
But that'll have to wait a bit anyway, at least until you made a decision on the plugging patch.