mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-15 11:44:11 +00:00
block/bfq_wf2q: correct weight to ioprio
[ Upstream commit bcd2be7632
]
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>
This commit is contained in:
parent
e7e08dc2e1
commit
0459017aa6
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue