diff mbox series

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

Message ID 20230219104309.1511562-10-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
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@huaweicloud.com>
---
 block/bfq-iosched.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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;
 
 	/*