projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e34806c
)
block/bfq_wf2q: correct weight to ioprio
author
Yahu Gao
<gaoyahu19@gmail.com>
Fri, 7 Jan 2022 06:58:59 +0000
(14:58 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:55 +0000
(14:23 +0200)
[ Upstream commit
bcd2be763252f3a4d5fc4d6008d4d96c601ee74b
]
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>
Acked-by: Paolo Valente <paolo.valente@linaro.org>
Link:
https://lore.kernel.org/r/20220107065859.25689-1-gaoyahu19@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/bfq-wf2q.c
patch
|
blob
|
history
diff --git
a/block/bfq-wf2q.c
b/block/bfq-wf2q.c
index b74cc0da118ec277744f98f8e7395b66b19ce2f2..709b901de3ca9d321155f596eb69ae8a627d331c 100644
(file)
--- 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)