mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
blk-mq: Avoid that blk_mq_delay_run_hw_queue() introduces unintended delays
Make sure that calling blk_mq_run_hw_queue() or blk_mq_kick_requeue_list() triggers a queue run without delay even if blk_mq_delay_run_hw_queue() has been called recently and if its delay has not yet expired. Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
c77ff7fd03
commit
ae943d2062
@ -785,7 +785,7 @@ EXPORT_SYMBOL(blk_mq_add_to_requeue_list);
|
|||||||
|
|
||||||
void blk_mq_kick_requeue_list(struct request_queue *q)
|
void blk_mq_kick_requeue_list(struct request_queue *q)
|
||||||
{
|
{
|
||||||
kblockd_schedule_delayed_work(&q->requeue_work, 0);
|
kblockd_mod_delayed_work_on(WORK_CPU_UNBOUND, &q->requeue_work, 0);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(blk_mq_kick_requeue_list);
|
EXPORT_SYMBOL(blk_mq_kick_requeue_list);
|
||||||
|
|
||||||
@ -1401,9 +1401,8 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
|
|||||||
put_cpu();
|
put_cpu();
|
||||||
}
|
}
|
||||||
|
|
||||||
kblockd_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx),
|
kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work,
|
||||||
&hctx->run_work,
|
msecs_to_jiffies(msecs));
|
||||||
msecs_to_jiffies(msecs));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs)
|
void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs)
|
||||||
|
Loading…
Reference in New Issue
Block a user