Commit b69cdb73 authored by David Jeffery's avatar David Jeffery Committed by Wang Jianzheng
Browse files

UPSTREAM: blk-mq: avoid extending delays of active hctx from blk_mq_delay_run_hw_queues



When blk_mq_delay_run_hw_queues sets an hctx to run in the future, it can
reset the delay length for an already pending delayed work run_work. This
creates a scenario where multiple hctx may have their queues set to run,
but if one runs first and finds nothing to do, it can reset the delay of
another hctx and stall the other hctx's ability to run requests.

To avoid this I/O stall when an hctx's run_work is already pending,
leave it untouched to run at its current designated time rather than
extending its delay. The work will still run which keeps closed the race
calling blk_mq_delay_run_hw_queues is needed for while also avoiding the
I/O stall.

Signed-off-by: default avatarDavid Jeffery <djeffery@redhat.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220131203337.GA17666@redhat


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
(cherry picked from commit 8f5fea65)

Bug: 373489949
Change-Id: I53ad3e091ac4885f7b331f583b41657e11de88cb
Signed-off-by: default avatarWang Jianzheng <11134417@vivo.corp-partner.google.com>
parent 23dc02d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment