[PATCH V3 2/4] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING

Ming Lei ming.lei at redhat.com
Tue Sep 8 21:19:16 EDT 2020


On Tue, Sep 08, 2020 at 08:31:08AM -0700, Keith Busch wrote:
> On Tue, Sep 08, 2020 at 04:15:36PM +0800, Ming Lei wrote:
> >  void blk_mq_quiesce_queue(struct request_queue *q)
> >  {
> > -	struct blk_mq_hw_ctx *hctx;
> > -	unsigned int i;
> > -	bool rcu = false;
> > +	bool blocking = !!(q->tag_set->flags & BLK_MQ_F_BLOCKING);
> >  
> >  	mutex_lock(&q->mq_quiesce_lock);
> >  
> > -	if (blk_queue_quiesced(q))
> > -		goto exit;
> 
> Why remove the 'goto exit' on this condition? There shouldn't be a need
> to synchronize dispatch again if a previous quiesce already did so.

Hammm, this change is supposed to be done in next patch of 'blk-mq: add tagset
quiesce interface'. The tagset quiesce interface starts to apply async quiesce,
so synchronize dispatch has to be done in blk_mq_quiesce_queue().

thanks,
Ming




More information about the Linux-nvme mailing list