From: Damien Le Moal <dlemoal@kernel.org>
To: Yu Kuai <yukuai1@huaweicloud.com>,
ming.lei@redhat.com, yukuai3@huawei.com, tj@kernel.org,
josef@toxicpanda.com, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
yangerkun@huawei.com, johnny.chenyi@huawei.com
Subject: Re: [PATCH RFC v2 4/5] blk-mq-sched: refactor __blk_mq_do_dispatch_sched()
Date: Mon, 16 Jun 2025 11:54:56 +0900 [thread overview]
Message-ID: <62d47057-1ab4-4558-961c-8c8f7e170e4b@kernel.org> (raw)
In-Reply-To: <20250614092528.2352680-5-yukuai1@huaweicloud.com>
On 6/14/25 18:25, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> Introduce struct sched_dispatch_ctx, and split the helper into
> elevator_dispatch_one_request() and elevator_finish_dispatch(). Make
> code cleaner and prepare to support request batch dispatching.
It is not clear how this patch prepares for supporting batch dispatching. Since
this is only a refactor without any semantic change, I would either drop this
comment or explain more clearly what you mean. This patch can also probably come
earlier in the series.
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> +static int elevator_finish_dispatch(struct sched_dispatch_ctx *ctx)
Please add a comment here to document the return values.
> +/*
> + * Only SCSI implements .get_budget and .put_budget, and SCSI restarts
> + * its queue by itself in its completion handler, so we don't need to
> + * restart queue if .get_budget() fails to get the budget.
> + *
> + * Returns -EAGAIN if hctx->dispatch was found non-empty and run_work has to
> + * be run again. This is necessary to avoid starving flushes.
And what is returned for the non error case ? (e.e. document the meaning of 0
and 1 return values).
> + */
> +static int __blk_mq_do_dispatch_sched(struct blk_mq_hw_ctx *hctx)
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2025-06-16 2:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-14 9:25 [PATCH RFC v2 0/5] blk-mq-sched: support request batch dispatching for sq elevator Yu Kuai
2025-06-14 9:25 ` [PATCH RFC v2 1/5] elevator: introduce global lock for sq_shared elevator Yu Kuai
2025-06-16 2:38 ` Damien Le Moal
2025-06-14 9:25 ` [PATCH RFC v2 2/5] mq-deadline: switch to use elevator lock Yu Kuai
2025-06-16 2:41 ` Damien Le Moal
2025-06-14 9:25 ` [PATCH RFC v2 3/5] block, bfq: " Yu Kuai
2025-06-16 2:46 ` Damien Le Moal
2025-06-14 9:25 ` [PATCH RFC v2 4/5] blk-mq-sched: refactor __blk_mq_do_dispatch_sched() Yu Kuai
2025-06-16 2:54 ` Damien Le Moal [this message]
2025-06-14 9:25 ` [PATCH RFC v2 5/5] blk-mq-sched: support request batch dispatching for sq elevator Yu Kuai
2025-06-16 3:07 ` Damien Le Moal
2025-06-16 4:03 ` [PATCH RFC v2 0/5] " Damien Le Moal
2025-06-16 7:22 ` Yu Kuai
2025-06-16 7:37 ` Damien Le Moal
2025-06-16 9:14 ` Yu Kuai
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=62d47057-1ab4-4558-961c-8c8f7e170e4b@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=johnny.chenyi@huawei.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=tj@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.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®