diff mbox series

[08/17] block, bfq: start service_from_wr accumulating of async queues correctly

Message ID 20230219104309.1511562-9-shikemeng@huaweicloud.com (mailing list archive)
State New, archived
Headers show
Series Some bugfix and cleanup patches for bfq | expand

Commit Message

Kemeng Shi Feb. 19, 2023, 10:43 a.m. UTC
Start accumulating service_from_wr when async queues are weight raised.
The service_from_wr for async queues is accumulated and checked to finish
weight-raise as sync queues. We need charge service_from_wr for async
queues or service_from_wr will keep accumulating and async queues will
finish weight-raise soon after weight-raise starts.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 block/bfq-iosched.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 5610a7dcacdf..7a0283f08aed 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2323,6 +2323,7 @@  static void bfq_add_request(struct request *rq)
 		    time_is_before_jiffies(
 				bfqq->last_wr_start_finish +
 				bfqd->bfq_wr_min_inter_arr_async)) {
+			bfqq->service_from_wr = 0;
 			bfqq->wr_coeff = bfqd->bfq_wr_coeff;
 			bfqq->wr_cur_max_time = bfq_wr_duration(bfqd);