block-mq: fix comments in blk_mq_queue_tag_busy_iter
PATCH 1/1 block-mq: fix comments in blk_mq_queue_tag_busy_iter
'f5bbbbe4d635 ("blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter")' introduce a bug what we may sleep between rcu lock. Then '530ca2c9bd69 ("blk-mq: Allow blocking queue tag iter callbacks")' fix it by get request_queue's ref. And 'a9a808084d6a ("block:
Remove the synchronize_rcu() call from __blk_mq_update_nr_hw_queues()")' remove the synchronize_rcu in __blk_mq_update_nr_hw_queues. We need update the confused comments in blk_mq_queue_tag_busy_iter.
--- block/blk-mq-tag.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
block/blk-mq-tag.c +1 -3
@@ -398,9 +398,7 @@ void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn,/* * __blk_mq_update_nr_hw_queues() updates nr_hw_queues and queue_hw_ctx * while the queue is frozen. So we can use q_usage_counter to avoid -* racing with it. __blk_mq_update_nr_hw_queues() uses -* synchronize_rcu() to ensure this function left the critical section -* below. +* racing with it. */ if (!percpu_ref_tryget (&q->q_usage_counter))return ;
Signature · 1 line
2.25.4
Ping...
Quoted 29 lines · yangerkun
'
f5bbbbe4d635("blk-mq: sync the updatenr_hw_queueswithblk_mq_queue_tag_busy_iter")' introduce a bug what we may sleep between rcu lock. Then '530ca2c9bd69("blk-mq: Allow blocking queue tag iter callbacks")' fix it by get request_queue's ref. And 'a9a808084d6a("block:
Remove thesynchronize_rcu()call from__blk_mq_update_nr_hw_queues()")' remove thesynchronize_rcuin__blk_mq_update_nr_hw_queues. We need update the confused comments inblk_mq_queue_tag_busy_iter.Signed-off-by yangerkun <[email protected]>--- block/blk-mq-tag.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)block/blk-mq-tag.c +1
-3@@ -398,9 +398,7 @@ void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn,/* * __blk_mq_update_nr_hw_queues() updates nr_hw_queues and queue_hw_ctx * while the queue is frozen. So we can use q_usage_counter to avoid -* racing with it. __blk_mq_update_nr_hw_queues() uses -* synchronize_rcu() to ensure this function left the critical section -* below. +* racing with it. */ if (!percpu_ref_tryget (&q->q_usage_counter))return ;
Quoted 7 lines · yangerkun
'
f5bbbbe4d635("blk-mq: sync the updatenr_hw_queueswithblk_mq_queue_tag_busy_iter")' introduce a bug what we may sleep between rcu lock. Then '530ca2c9bd69("blk-mq: Allow blocking queue tag iter callbacks")' fix it by get request_queue's ref. And 'a9a808084d6a("block:
Remove thesynchronize_rcu()call from__blk_mq_update_nr_hw_queues()")' remove thesynchronize_rcuin__blk_mq_update_nr_hw_queues. We need update the confused comments inblk_mq_queue_tag_busy_iter.
Applied, thanks.
Signature · 1 line
Jens Axboe