[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62d47057-1ab4-4558-961c-8c8f7e170e4b@kernel.org>
Date: Mon, 16 Jun 2025 11:54:56 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>, ming.lei@...hat.com,
yukuai3@...wei.com, tj@...nel.org, josef@...icpanda.com, axboe@...nel.dk
Cc: linux-block@...r.kernel.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, yi.zhang@...wei.com, yangerkun@...wei.com,
johnny.chenyi@...wei.com
Subject: Re: [PATCH RFC v2 4/5] blk-mq-sched: refactor
__blk_mq_do_dispatch_sched()
On 6/14/25 18:25, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@...wei.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@...wei.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
Powered by blists - more mailing lists