Skip to content

Commit

Permalink
bfq: Allow current waker to defend against a tentative one
Browse files Browse the repository at this point in the history
[ Upstream commit c5ac56b ]

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: 71217df ("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>
  • Loading branch information
jankara authored and gregkh committed Jun 9, 2022
1 parent 9196001 commit bfcdd22
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/bfq-iosched.c
Expand Up @@ -2133,8 +2133,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;

/*
Expand Down

0 comments on commit bfcdd22

Please sign in to comment.