[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251204184243.GZ337106-mkhalfella@purestorage.com>
Date: Thu, 4 Dec 2025 10:42:43 -0800
From: Mohamed Khalfella <mkhalfella@...estorage.com>
To: Bart Van Assche <bvanassche@....org>
Cc: Chaitanya Kulkarni <kch@...dia.com>, Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>, Keith Busch <kbusch@...nel.org>,
Sagi Grimberg <sagi@...mberg.me>,
Casey Chen <cachen@...estorage.com>,
Yuanyuan Zhong <yzhong@...estorage.com>,
Hannes Reinecke <hare@...e.de>, Ming Lei <ming.lei@...hat.com>,
Waiman Long <llong@...hat.com>, Hillf Danton <hdanton@...a.com>,
linux-nvme@...ts.infradead.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] block: Use RCU in blk_mq_[un]quiesce_tagset()
instead of set->tag_list_lock
On Thu 2025-12-04 08:22:23 -1000, Bart Van Assche wrote:
> On 12/4/25 8:11 AM, Mohamed Khalfella wrote:
> > @@ -4302,6 +4302,8 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
> > blk_mq_update_tag_set_shared(set, false);
> > }
> > mutex_unlock(&set->tag_list_lock);
> > +
> > + synchronize_rcu();
> > INIT_LIST_HEAD(&q->tag_set_list);
> > }
> Yikes. This change slows down all blk_mq_del_queue_tag_set() callers.
synchronize_rcu() is necessary before re-initializing q->tag_set_list
because of list_for_each_entry_rcu() in blk_mq_[un]quiesce_tagset().
Is blk_mq_del_queue_tag_set() performance sensitive such that it can not
take synchronize_rcu()? It is not in IO codepath, right?
> Please fix the reported deadlock by modifying the NVMe code instead of
> slowing down the block layer.
I can not think of an easy way to do that. Suggestions are welcomed.
>
> Thanks,
>
> Bart.
Powered by blists - more mailing lists