diff mbox series

[08/20] block, bfq: do srt filtering for interactive queues in bfq_completed_request

Message ID 20221101093417.10540-9-shikemeng@huawei.com (mailing list archive)
State New, archived
Headers show
Series A few bugfix and cleanup patches for bfq-iosched | expand

Commit Message

Kemeng Shi Nov. 1, 2022, 9:34 a.m. UTC
Commit 20cd32450bcbec ("block, bfq: do not consider interactive queues in
srt filtering") remove the updating of soft_rt_next_start for bfq_queues
in interactive weight raising.
Commit 3c337690d2ebb7 ("block, bfq: avoid spurious switches to soft_rt of
interactive queues") try to revert the first commit to add back updating of
soft_rt_next_start for bfq_queues in interactive weight raising and fix
original problem by reset consumed bandwidth if a bfq_queue switches from
interactive to normal mode.
The problem this patch fixes is that first commit is not fully reverted as
updating of soft_rt_next_start for bfq_queues in interactive weight
raising is still removed in bfq_completed_request. Fix this by updating
soft_rt_next_start for bfq_queues in interactive weight raising in
bfq_completed_request.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
 block/bfq-iosched.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 15e7d6c6fa83..fa96cbca7814 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -6317,14 +6317,11 @@  static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd)
 	 * isochronous, and both requisites for this condition to hold
 	 * are now satisfied, then compute soft_rt_next_start (see the
 	 * comments on the function bfq_bfqq_softrt_next_start()). We
-	 * do not compute soft_rt_next_start if bfqq is in interactive
-	 * weight raising (see the comments in bfq_bfqq_expire() for
-	 * an explanation). We schedule this delayed update when bfqq
-	 * expires, if it still has in-flight requests.
+	 * schedule this delayed update when bfqq expires, if it still
+	 * has in-flight requests.
 	 */
 	if (bfq_bfqq_softrt_update(bfqq) && bfqq->dispatched == 0 &&
-	    RB_EMPTY_ROOT(&bfqq->sort_list) &&
-	    bfqq->wr_coeff != bfqd->bfq_wr_coeff)
+	    RB_EMPTY_ROOT(&bfqq->sort_list))
 		bfqq->soft_rt_next_start =
 			bfq_bfqq_softrt_next_start(bfqd, bfqq);