linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Guo Xuenan <guoxuenan@huawei.com>, linux-block@vger.kernel.org
Cc: fangwei1@huawei.com, wangli74@huawei.com
Subject: Re: [PATCH] blk-rq-qos: remove redundant finish_wait to rq_qos_wait.
Date: Wed, 24 Jun 2020 09:06:13 -0600	[thread overview]
Message-ID: <cb2b5fdd-2e12-c301-032e-3458191a7053@kernel.dk> (raw)
In-Reply-To: <20200624130400.2902189-1-guoxuenan@huawei.com>

On 6/24/20 7:04 AM, Guo Xuenan wrote:
> It is no need do finish_wait twice after acquiring inflight.

Seems cleaner to kill the redundant one, rather than adding
a new one and removing another one. We end up with less
code that way.

diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c
index 656460636ad3..18f3eab9f768 100644
--- a/block/blk-rq-qos.c
+++ b/block/blk-rq-qos.c
@@ -273,8 +273,6 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data,
 		if (data.got_token)
 			break;
 		if (!has_sleeper && acquire_inflight_cb(rqw, private_data)) {
-			finish_wait(&rqw->wait, &data.wq);
-
 			/*
 			 * We raced with wbt_wake_function() getting a token,
 			 * which means we now have two. Put our local token

-- 
Jens Axboe


      reply	other threads:[~2020-06-24 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 13:04 [PATCH] blk-rq-qos: remove redundant finish_wait to rq_qos_wait Guo Xuenan
2020-06-24 15:06 ` Jens Axboe [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=cb2b5fdd-2e12-c301-032e-3458191a7053@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fangwei1@huawei.com \
    --cc=guoxuenan@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=wangli74@huawei.com \
    /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).