Skip to contentSkip to conversation

block/mq-deadline: Set the fifo_time member also if inserting at head

PATCH Applied Bart Van Assche 2 participants 2 messages May 13, 2022 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block/mq-deadline: Set the fifo_time member also if inserting at head

Before commit 322cff70d46c the fifo_time member of requests on a dispatch list was not used. Commit 322cff70d46c 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 <[email protected]>
Cc Ming Lei <[email protected]>
Cc Damien Le Moal <[email protected]>
Fixes 322cff70d46c ("block/mq-deadline: Prioritize high-priority requests")
---
 block/mq-deadline.c | 1 +
 1 file changed, 1 insertion(+)
block/mq-deadline.c +1 -0
index 3ed5eaf3446a..6ed602b2f80a 100644
@@ -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);
 
maintainer Applied
#1 lore raw
Quoted 6 lines · Bart Van Assche

Before commit 322cff70d46c the fifo_time member of requests on a dispatch list was not used. Commit 322cff70d46c 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.

Applied, thanks!

[1/1] block/mq-deadline: Set the fifo_time member also if inserting at head

      commit: 725f22a1477c9c15aa67ad3af96fe28ec4fe72d2

Best regards,

Signature · 1 line
Jens Axboe