Skip to content

Commit

Permalink
block/mq-deadline: Set the fifo_time member also if inserting at head
Browse files Browse the repository at this point in the history
Before commit 322cff7 the fifo_time member of requests on a dispatch
list was not used. Commit 322cff7 introduces code that reads the
fifo_time member of requests on dispatch lists. Hence this patch that sets
the fifo_time member when adding a request to a dispatch list.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Fixes: 322cff7 ("block/mq-deadline: Prioritize high-priority requests")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220513171307.32564-1-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
bvanassche authored and axboe committed May 13, 2022
1 parent f1c8781 commit 725f22a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/mq-deadline.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,

if (at_head) {
list_add(&rq->queuelist, &per_prio->dispatch);
rq->fifo_time = jiffies;
} else {
deadline_add_rq_rb(per_prio, rq);

Expand Down

0 comments on commit 725f22a

Please sign in to comment.