summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2022-05-19 12:52:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-09 10:23:01 +0200
commitcf9c07d8f7e98aeb0e414df477d1fc25e899cf93 (patch)
treea40d7b6182b130d002a856da23042a4167b703be /block
parent9de82bfc05149e4b58d25097771a120ba5343643 (diff)
downloadlinux-stable-cf9c07d8f7e98aeb0e414df477d1fc25e899cf93.tar.gz
linux-stable-cf9c07d8f7e98aeb0e414df477d1fc25e899cf93.tar.bz2
linux-stable-cf9c07d8f7e98aeb0e414df477d1fc25e899cf93.zip
bfq: Allow current waker to defend against a tentative one
[ Upstream commit c5ac56bb6110e42e79d3106866658376b2e48ab9 ] The code in bfq_check_waker() ignores wake up events from the current waker. This makes it more likely we select a new tentative waker although the current one is generating more wake up events. Treat current waker the same way as any other process and allow it to reset the waker detection logic. Fixes: 71217df39dc6 ("block, bfq: make waker-queue detection more robust") Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220519105235.31397-2-jack@suse.cz Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
-rw-r--r--block/bfq-iosched.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index a2aefb4a1e2e..343ca559ab8a 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2022,8 +2022,7 @@ static void bfq_check_waker(struct bfq_data *bfqd, struct bfq_queue *bfqq,
if (!bfqd->last_completed_rq_bfqq ||
bfqd->last_completed_rq_bfqq == bfqq ||
bfq_bfqq_has_short_ttime(bfqq) ||
- now_ns - bfqd->last_completion >= 4 * NSEC_PER_MSEC ||
- bfqd->last_completed_rq_bfqq == bfqq->waker_bfqq)
+ now_ns - bfqd->last_completion >= 4 * NSEC_PER_MSEC)
return;
if (bfqd->last_completed_rq_bfqq !=