[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221101093417.10540-6-shikemeng@huawei.com>
Date: Tue, 1 Nov 2022 17:34:02 +0800
From: Kemeng Shi <shikemeng@...wei.com>
To: <paolo.valente@...aro.org>, <axboe@...nel.dk>
CC: <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<shikemeng@...wei.com>
Subject: [PATCH 05/20] block, bfq: recover the "service hole" if enough budget is left
If budget left is less than budget need by next request, the activated bfqq
will be expired if it preempts the in-service queue. Avoid to cause useless
overhead to check budget left is enough for next request.
Signed-off-by: Kemeng Shi <shikemeng@...wei.com>
---
block/bfq-iosched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index be69b0e061f7..f4b4ba05f804 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -1623,7 +1623,7 @@ static bool bfq_bfqq_update_budg_for_activation(struct bfq_data *bfqd,
* service. This would only cause useless overhead.
*/
if (bfq_bfqq_non_blocking_wait_rq(bfqq) && arrived_in_time &&
- bfq_bfqq_budget_left(bfqq) > 0) {
+ bfq_bfqq_budget_left(bfqq) >= bfq_serv_to_charge(bfqq->next_rq, bfqq)) {
/*
* We do not clear the flag non_blocking_wait_rq here, as
* the latter is used in bfq_activate_bfqq to signal
--
2.30.0
Powered by blists - more mailing lists