Linux block layer
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
	jack@suse.com, paolo.valente@linaro.org, axboe@kernel.dk
Cc: hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 7/8] block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq
Date: Tue, 3 Jan 2023 11:33:48 +0900	[thread overview]
Message-ID: <d4613092-e29d-574e-9d1e-4f5a3eca8b56@opensource.wdc.com> (raw)
In-Reply-To: <20230103095303.2223546-8-shikemeng@huaweicloud.com>

On 1/3/23 18:53, Kemeng Shi wrote:
> We jump to tag only for returning current rq. Return directly to
> remove this tag.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> ---
>  block/bfq-iosched.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 9ff424c78e9b..a11be312ac77 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -4966,7 +4966,7 @@ static struct request *bfq_dispatch_rq_from_bfqq(struct bfq_data *bfqd,
>  	bfq_dispatch_remove(bfqd->queue, rq);
>  
>  	if (bfqq != bfqd->in_service_queue)
> -		goto return_rq;
> +		return rq;
>  
>  	/*
>  	 * If weight raising has to terminate for bfqq, then next
> @@ -4986,12 +4986,9 @@ static struct request *bfq_dispatch_rq_from_bfqq(struct bfq_data *bfqd,
>  	 * belongs to CLASS_IDLE and other queues are waiting for
>  	 * service.
>  	 */
> -	if (!(bfq_tot_busy_queues(bfqd) > 1 && bfq_class_idle(bfqq)))
> -		goto return_rq;
> +	if (bfq_tot_busy_queues(bfqd) > 1 && bfq_class_idle(bfqq))
> +		bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_BUDGET_EXHAUSTED);
>  
> -	bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_BUDGET_EXHAUSTED);
> -
> -return_rq:
>  	return rq;
>  }
>  

Looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2023-01-03  2:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03  9:52 [PATCH v3 0/8] A few bugfix and cleancode patch for bfq Kemeng Shi
2023-01-03  9:52 ` [PATCH v3 1/8] block, bfq: correctly raise inject limit in bfq_choose_bfqq_for_injection Kemeng Shi
2023-01-03  9:52 ` [PATCH v3 2/8] block, bfq: remove unsed parameter reason in bfq_bfqq_is_slow Kemeng Shi
2023-01-03  9:52 ` [PATCH v3 3/8] block, bfq: initialize bfqq->decrease_time_jif correctly Kemeng Shi
2023-01-03  9:52 ` [PATCH v3 4/8] block, bfq: use helper macro RQ_BFQQ to get bfqq of request Kemeng Shi
2023-01-03  9:53 ` [PATCH v3 5/8] block, bfq: remove unnecessary dereference to get async_bfqq Kemeng Shi
2023-01-03  9:53 ` [PATCH v3 6/8] block, bfq: remove redundant check in bfq_put_cooperator Kemeng Shi
2023-01-03  9:53 ` [PATCH v3 7/8] block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq Kemeng Shi
2023-01-03  2:33   ` Damien Le Moal [this message]
2023-01-03  9:44   ` Jan Kara
2023-01-03  9:53 ` [PATCH v3 8/8] block, bfq: remove unused bfq_wr_max_time in struct bfq_data Kemeng Shi

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=d4613092-e29d-574e-9d1e-4f5a3eca8b56@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jack@suse.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=shikemeng@huaweicloud.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