From: Nilay Shroff <nilay@linux.ibm.com>
To: mt4022@columbia.edu, Jens Axboe <axboe@kernel.dk>
Cc: Mohamed Khalfella <mkhalfella@purestorage.com>,
Keith Busch <kbusch@kernel.org>, Ming Lei <tom.leiming@gmail.com>,
Bart Van Assche <bvanassche@acm.org>,
Christoph Hellwig <hch@lst.de>,
Josef Bacik <josef@toxicpanda.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
tz2294@columbia.edu, stable@vger.kernel.org
Subject: Re: [PATCH] blk-mq: take quiesce_lock when removing a queue from the tag set
Date: Wed, 4 Nov 2026 18:49:15 +0530 [thread overview]
Message-ID: <b7d03393-79a1-4457-8ddf-e0d141e4b3e9@linux.ibm.com> (raw)
In-Reply-To: <20261103-blk-mq-del-quiesce-lock-v1-1-04aa29a481f6@columbia.edu>
On 11/4/26 12:34 AM, Mani Tofigh via B4 Relay wrote:
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 5ae22d556540..54ccfc43c27c 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -4354,7 +4354,10 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
>
> lockdep_assert_held(&set->tag_list_lock);
>
> + /* blk_mq_unquiesce_tagset() runs the hctxs, which are not RCU freed */
> + spin_lock(&set->quiesce_lock);
> list_del_rcu(&q->tag_set_list);
> + spin_unlock(&set->quiesce_lock);
> if (list_is_singular(&set->tag_list)) {
> /* just transitioned to unshared */
> set->flags &= ~BLK_MQ_F_TAG_QUEUE_SHARED;
Now that set->quiesce_lock serializes both traversal of set->tag_list
in blk_mq_[un]quiesce_tagset() as well as modifications in
blk_mq_[add|del]_queue_tag_set(), do we still need RCU protection for
this list?
Assuming there are no other lockless readers of set->tag_list, could we
use regular list operations in blk_mq_[add|del]_queue_tag_set() and remove
the RCU read-side critical sections from blk_mq_[un]quiesce_tagset()?
Thanks,
--Nilay
prev parent reply other threads:[~2026-11-04 13:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 19:04 Mani Tofigh via B4 Relay
2026-11-03 19:51 ` Mohamed Khalfella
2026-11-04 7:19 ` Christoph Hellwig
2026-11-04 13:26 ` Nilay Shroff
2026-11-04 13:19 ` Nilay Shroff [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7d03393-79a1-4457-8ddf-e0d141e4b3e9@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkhalfella@purestorage.com \
--cc=mt4022@columbia.edu \
--cc=stable@vger.kernel.org \
--cc=tom.leiming@gmail.com \
--cc=tz2294@columbia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®