From: Bart Van Assche <bvanassche@acm.org>
To: chengkaitao <pilgrimtao@gmail.com>, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Chengkaitao <chengkaitao@kylinos.cn>
Subject: Re: [PATCH] mq-deadline: the dd->dispatch queue follows a FIFO policy
Date: Mon, 8 Dec 2025 08:24:16 -0800 [thread overview]
Message-ID: <33dcc737-1419-4f3e-8952-2f34db47a087@acm.org> (raw)
In-Reply-To: <20251208110213.92884-1-pilgrimtao@gmail.com>
On 12/8/25 4:02 AM, chengkaitao wrote:
> From: Chengkaitao <chengkaitao@kylinos.cn>
>
> In the initial implementation, the 'list_add(&rq->queuelist, ...' statement
> added to the dd_insert_request function was designed to differentiate
> priorities among various IO-requests within the same linked list. For
> example, 'Commit 945ffb60c11d ("mq-deadline: add blk-mq adaptation of the
> deadline IO scheduler")', introduced this 'list_add' operation to ensure
> that requests with the at_head flag would always be dispatched before
> requests without the REQ_TYPE_FS flag.
>
> Since 'Commit 7687b38ae470 ("bfq/mq-deadline: remove redundant check for
> passthrough request")', removed blk_rq_is_passthrough, the dd->dispatch
> list now contains only requests with the at_head flag. In this context,
> all at_head requests should be treated as having equal priority, and a
> first-in-first-out (FIFO) policy better aligns with the current situation.
> Therefore, replacing list_add with list_add_tail is more appropriate.
>
> Signed-off-by: Chengkaitao <chengkaitao@kylinos.cn>
> ---
> block/mq-deadline.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index 3e3719093aec..dcd7f4f1ecd2 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -661,7 +661,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
> trace_block_rq_insert(rq);
>
> if (flags & BLK_MQ_INSERT_AT_HEAD) {
> - list_add(&rq->queuelist, &dd->dispatch);
> + list_add_tail(&rq->queuelist, &dd->dispatch);
> rq->fifo_time = jiffies;
> } else {
> deadline_add_rq_rb(per_prio, rq);
I think the current behavior (LIFO) is on purpose and also that it only
should be changed if there is a strong reason to change it. I don't see
a strong reason being mentioned in the patch description.
Bart.
next prev parent reply other threads:[~2025-12-08 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 11:02 chengkaitao
2025-12-08 16:24 ` Bart Van Assche [this message]
2025-12-09 2:06 ` Tao pilgrim
2025-12-09 22:11 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33dcc737-1419-4f3e-8952-2f34db47a087@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=chengkaitao@kylinos.cn \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pilgrimtao@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®