diff options
author | Luca Mariotti <mariottiluca1@hotmail.it> | 2021-06-19 16:09:43 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-21 15:03:41 -0600 |
commit | e03f2ab78a4a673e4af23c3b855591c48b9de4d7 (patch) | |
tree | c1fec038b5986fd5fbb4e06646a22e25805e0917 /block/bfq-iosched.c | |
parent | 511a2699237611b062df7798476bf3a1392910b9 (diff) |
block, bfq: fix delayed stable merge check
When attempting to schedule a merge of a given bfq_queue with the currently
in-service bfq_queue or with a cooperating bfq_queue among the scheduled
bfq_queues, delayed stable merge is checked for rotational or non-queueing
devs. For this stable merge to be performed, some conditions must be met.
If the current bfq_queue underwent some split from some merged bfq_queue,
one of these conditions is that two hundred milliseconds must elapse from
split, otherwise this condition is always met.
Unfortunately, by mistake, time_is_after_jiffies() was written instead of
time_is_before_jiffies() for this check, verifying that less than two
hundred milliseconds have elapsed instead of verifying that at least two
hundred milliseconds have elapsed.
Fix this issue by replacing time_is_after_jiffies() with
time_is_before_jiffies().
Signed-off-by: Luca Mariotti <mariottiluca1@hotmail.it>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Pietro Pedroni <pedroni.pietro.96@gmail.com>
Link: https://lore.kernel.org/r/20210619140948.98712-3-paolo.valente@linaro.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r-- | block/bfq-iosched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index da2363f12e53..c5c0e74977d4 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -2710,7 +2710,7 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, if (unlikely(!bfqd->nonrot_with_queueing)) { if (bic->stable_merge_bfqq && !bfq_bfqq_just_created(bfqq) && - time_is_after_jiffies(bfqq->split_time + + time_is_before_jiffies(bfqq->split_time + msecs_to_jiffies(200))) { struct bfq_queue *stable_merge_bfqq = bic->stable_merge_bfqq; |