[PATCH 09/17] block, bfq: stop to detect queue as waker queue if it already is now

From: Kemeng Shi
Date: Sat Feb 18 2023 - 21:41:50 EST


If last_completed_rq_bfqq is the current waker queue of bfqq, it's no
meaning to execute the detection logic as nothing will change whether
detection successes or fails.

Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
---
block/bfq-iosched.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 7a0283f08aed..0a11a381ee7d 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2147,7 +2147,8 @@ static void bfq_check_waker(struct bfq_data *bfqd, struct bfq_queue *bfqq,
bfq_bfqq_has_short_ttime(bfqq) ||
now_ns - bfqd->last_completion >= 4 * NSEC_PER_MSEC ||
bfqd->last_completed_rq_bfqq == &bfqd->oom_bfqq ||
- bfqq == &bfqd->oom_bfqq)
+ bfqq == &bfqd->oom_bfqq ||
+ bfqd->last_completed_rq_bfqq == bfqq->waker_bfqq)
return;

/*
--
2.30.0