All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@redhat.com>, Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	Bart Van Assche <bvanassche@acm.org>,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Chao Leng <lengchao@huawei.com>
Subject: Re: [PATCH] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING
Date: Fri, 21 Aug 2020 08:46:37 -0600	[thread overview]
Message-ID: <85b14d60-d5f8-2ae9-8717-2e655fbd16c0@kernel.dk> (raw)
In-Reply-To: <20200821101617.GA3125762@T590>

On 8/21/20 4:16 AM, Ming Lei wrote:
> On Fri, Aug 21, 2020 at 08:34:48AM +0200, Christoph Hellwig wrote:
>>> -static void hctx_unlock(struct blk_mq_hw_ctx *hctx, int srcu_idx)
>>> -	__releases(hctx->srcu)
>>> +static void hctx_unlock(struct blk_mq_hw_ctx *hctx)
>>>  {
>>>  	if (!(hctx->flags & BLK_MQ_F_BLOCKING))
>>>  		rcu_read_unlock();
>>>  	else
>>> -		srcu_read_unlock(hctx->srcu, srcu_idx);
>>> +		percpu_ref_put(&hctx->queue->dispatch_counter);
>>
>> While you're at it:  can we avoid the pointless inversion in the if
>> statement and just do:
>>
>>  	if (hctx->flags & BLK_MQ_F_BLOCKING)
>> 		percpu_ref_put(&hctx->queue->dispatch_counter);
>> 	else
>> 		rcu_read_unlock();
> 
> OK, will do that, but strictly speaking they don't belong to this patch.

Yeah let's please not mix up the two.

-- 
Jens Axboe


  reply	other threads:[~2020-08-21 14:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  3:02 [PATCH] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING Ming Lei
2020-08-21  6:34 ` Christoph Hellwig
2020-08-21 10:16   ` Ming Lei
2020-08-21 14:46     ` Jens Axboe [this message]
2020-08-21 15:05 ` Jens Axboe
2020-08-21 20:14 ` Sagi Grimberg
2020-08-22 13:39   ` Ming Lei
2020-08-24  8:19     ` Sagi Grimberg
2020-08-24 10:40       ` Ming Lei
2020-08-24 21:34         ` Sagi Grimberg
2020-08-25  2:32           ` Ming Lei
2020-08-25  5:24             ` Sagi Grimberg
2020-08-25  9:41               ` Chao Leng
2020-08-25 17:38                 ` Sagi Grimberg
2020-08-26  7:25                   ` Chao Leng

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=85b14d60-d5f8-2ae9-8717-2e655fbd16c0@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=lengchao@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=paulmck@kernel.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 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.