* [PATCH] block-mq: fix comments in blk_mq_queue_tag_busy_iter
@ 2020-09-19 3:54 yangerkun
2020-09-29 1:18 ` yangerkun
2020-09-29 14:11 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: yangerkun @ 2020-09-19 3:54 UTC (permalink / raw)
To: axboe; +Cc: linux-block, ming.lei, hch, yangerkun
'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.
Signed-off-by: yangerkun <yangerkun@huawei.com>
---
block/blk-mq-tag.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 32d82e23b095..051227bd5a03 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -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;
--
2.25.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] block-mq: fix comments in blk_mq_queue_tag_busy_iter
2020-09-19 3:54 [PATCH] block-mq: fix comments in blk_mq_queue_tag_busy_iter yangerkun
@ 2020-09-29 1:18 ` yangerkun
2020-09-29 14:11 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: yangerkun @ 2020-09-29 1:18 UTC (permalink / raw)
To: axboe; +Cc: linux-block, ming.lei, hch
Ping...
在 2020/9/19 11:54, yangerkun 写道:
> '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.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
> block/blk-mq-tag.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
> index 32d82e23b095..051227bd5a03 100644
> --- a/block/blk-mq-tag.c
> +++ b/block/blk-mq-tag.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block-mq: fix comments in blk_mq_queue_tag_busy_iter
2020-09-19 3:54 [PATCH] block-mq: fix comments in blk_mq_queue_tag_busy_iter yangerkun
2020-09-29 1:18 ` yangerkun
@ 2020-09-29 14:11 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-09-29 14:11 UTC (permalink / raw)
To: yangerkun; +Cc: linux-block, ming.lei, hch
On 9/18/20 9:54 PM, yangerkun wrote:
> '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.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-29 14:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 3:54 [PATCH] block-mq: fix comments in blk_mq_queue_tag_busy_iter yangerkun
2020-09-29 1:18 ` yangerkun
2020-09-29 14:11 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.