block/bfq_wf2q: correct weight to ioprio
Subsystems (2)
PATCH 1/1 block/bfq_wf2q: correct weight to ioprio
From: Yahu Gao <[email protected]>
The return value is ioprio * BFQ_WEIGHT_CONVERSION_COEFF or 0. What we want is ioprio or 0.
Correct this by changing the calculation.
block/bfq-wf2q.c +1 -1
@@ -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)
Signature · 1 line
2.15.0
Quoted 4 lines
Il giorno 7 gen 2022, alle ore 07:58, [email protected] ha scritto:
Quoted 8 lines
From: Yahu Gao <[email protected]>
The return value is ioprio *
BFQ_WEIGHT_CONVERSION_COEFFor 0. What we want is ioprio or 0.
Correct this by changing the calculation.Signed-off-by Yahu Gao <[email protected]>
Thanks for spotting this error!
Quoted 16 lines
block/bfq-wf2q.c +1
-1@@ -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)Signature · 1 line
2.15.0
Quoted 9 lines · Paolo Valente
Quoted 9 lines
Il giorno 7 gen 2022, alle ore 07:58, [email protected] ha scritto:
From: Yahu Gao <[email protected]>
The return value is ioprio *
BFQ_WEIGHT_CONVERSION_COEFFor 0. What we want is ioprio or 0.
Correct this by changing the calculation.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Yahu Gao <[email protected]>Thanks for spotting this error!
Acked-by Paolo Valente <[email protected]>
friendly ping...
Quoted 16 lines
Quoted 16 lines
block/bfq-wf2q.c +1
-1@@ -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)Signature · 1 line
2.15.0
Quoted 8 lines · On Fri, 7 Jan 2022 14:58:59 +0800, [email protected] wrote:
From: Yahu Gao <[email protected]>
The return value is ioprio *
BFQ_WEIGHT_CONVERSION_COEFFor 0. What we want is ioprio or 0.
Correct this by changing the calculation.[...]
Applied, thanks!
[1/1] block/bfq_wf2q: correct weight to ioprio
commit: c766ace687d7ba1cbb485759f19ef33b35fb1b4a
Best regards,
Signature · 1 line
Jens Axboe