From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>, Sagi Grimberg <sagi@grimberg.me>,
Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
Chao Leng <lengchao@huawei.com>, Keith Busch <kbusch@kernel.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V3 1/4] blk-mq: serialize queue quiesce and unquiesce by mutex
Date: Wed, 9 Sep 2020 09:16:41 +0800 [thread overview]
Message-ID: <20200909011641.GA1465199@T590> (raw)
In-Reply-To: <8e040e37-d1df-ea5f-8a63-f4067d092b72@acm.org>
On Tue, Sep 08, 2020 at 10:54:14AM -0700, Bart Van Assche wrote:
> On 2020-09-08 01:15, Ming Lei wrote:
> > void blk_mq_unquiesce_queue(struct request_queue *q)
> > {
> > + mutex_lock(&q->mq_quiesce_lock);
> > +
> > blk_queue_flag_clear(QUEUE_FLAG_QUIESCED, q);
> >
> > /* dispatch requests which are inserted during quiescing */
> > blk_mq_run_hw_queues(q, true);
> > +
> > + mutex_unlock(&q->mq_quiesce_lock);
> > }
> Has the sunvdc driver been retested? It calls blk_mq_unquiesce_queue()
> with a spinlock held. As you know calling mutex_lock() while holding a
> spinlock is not allowed.
I am wondering if sunvdc is still being actively used, the similar lock issue
has been existed since 7996a8b5511a ("blk-mq: fix hang caused by
freeze/unfreeze sequence") which is committed in May 2019.
+ spin_lock_irq(&port->vio.lock);
+ port->drain = 0;
+ blk_mq_unquiesce_queue(q);
+ blk_mq_unfreeze_queue(q);
mutex_lock is added to blk_mq_unfreeze_queue(q) since commit 7996a8b5511a.
Not see such report actually.
> There may be other drivers than the sunvdc driver that do this.
Most calls of blk_mq_unquiesce_queue are easily to be audited because
blk_mq_quiesce_queue is used in same callsite.
I will take a close look at this thing before posting next version.
Thanks,
Ming
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-09-09 1:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 8:15 [PATCH V3 0/4] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING Ming Lei
2020-09-08 8:15 ` [PATCH V3 1/4] blk-mq: serialize queue quiesce and unquiesce by mutex Ming Lei
2020-09-08 8:38 ` Hannes Reinecke
2020-09-08 11:31 ` Johannes Thumshirn
2020-09-08 17:54 ` Bart Van Assche
2020-09-09 1:16 ` Ming Lei [this message]
2020-09-08 8:15 ` [PATCH V3 2/4] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING Ming Lei
2020-09-08 8:44 ` Hannes Reinecke
2020-09-08 9:13 ` Chao Leng
2020-09-08 9:27 ` Ming Lei
2020-09-08 15:31 ` Keith Busch
2020-09-09 1:19 ` Ming Lei
2020-09-08 8:15 ` [PATCH V3 3/4] blk-mq: add tagset quiesce interface Ming Lei
2020-09-08 8:45 ` Hannes Reinecke
2020-09-08 8:15 ` [PATCH V3 4/4] nvme: use blk_mq_[un]quiesce_tagset Ming Lei
2020-09-08 8:46 ` Hannes Reinecke
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=20200909011641.GA1465199@T590 \
--to=ming.lei@redhat.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=lengchao@huawei.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).