All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yahu Gao <gaoyahu19@gmail.com>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH] block/bfq_wf2q: correct weight to ioprio
Date: Thu, 3 Feb 2022 11:18:50 +0800	[thread overview]
Message-ID: <48ceed79-47fb-ffc1-3f3e-ac40bfc16cfa@gmail.com> (raw)
In-Reply-To: <27914345-9CBD-4F3C-AB55-243208521B35@linaro.org>


On 2022/1/19 10:56 下午, Paolo Valente wrote:
>
>> 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>
friendly ping...
>> 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
>>

  reply	other threads:[~2022-02-03  3:18 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
2022-02-03  3:18   ` Yahu Gao [this message]
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=48ceed79-47fb-ffc1-3f3e-ac40bfc16cfa@gmail.com \
    --to=gaoyahu19@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=paolo.valente@linaro.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.