From: Paolo Valente <paolo.valente@linaro.org>
To: gaoyahu19@gmail.com
Cc: axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH] block/bfq_wf2q: correct weight to ioprio
Date: Wed, 19 Jan 2022 15:56:33 +0100 [thread overview]
Message-ID: <27914345-9CBD-4F3C-AB55-243208521B35@linaro.org> (raw)
In-Reply-To: <20220107065859.25689-1-gaoyahu19@gmail.com>
> Il giorno 7 gen 2022, alle ore 07:58, gaoyahu19@gmail.com ha scritto:
>
> From: Yahu Gao <gaoyahu19@gmail.com>
>
> The return value is ioprio * BFQ_WEIGHT_CONVERSION_COEFF or 0.
> What we want is ioprio or 0.
> Correct this by changing the calculation.
>
> Signed-off-by: Yahu Gao <gaoyahu19@gmail.com>
>
Thanks for spotting this error!
Acked-by: Paolo Valente <paolo.valente@linaro.org>
> diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
> index b74cc0da118e..709b901de3ca 100644
> --- a/block/bfq-wf2q.c
> +++ b/block/bfq-wf2q.c
> @@ -519,7 +519,7 @@ unsigned short bfq_ioprio_to_weight(int ioprio)
> static unsigned short bfq_weight_to_ioprio(int weight)
> {
> return max_t(int, 0,
> - IOPRIO_NR_LEVELS * BFQ_WEIGHT_CONVERSION_COEFF - weight);
> + IOPRIO_NR_LEVELS - weight / BFQ_WEIGHT_CONVERSION_COEFF);
> }
>
> static void bfq_get_entity(struct bfq_entity *entity)
> --
> 2.15.0
>
next prev parent reply other threads:[~2022-01-19 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 6:58 [PATCH] block/bfq_wf2q: correct weight to ioprio gaoyahu19
2022-01-19 14:56 ` Paolo Valente [this message]
2022-02-03 3:18 ` Yahu Gao
2022-02-17 2:51 ` Jens Axboe
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=27914345-9CBD-4F3C-AB55-243208521B35@linaro.org \
--to=paolo.valente@linaro.org \
--cc=axboe@kernel.dk \
--cc=gaoyahu19@gmail.com \
--cc=linux-block@vger.kernel.org \
/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.