[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16924973-c18e-6b1c-8271-1ff1954854de@huaweicloud.com>
Date: Thu, 14 Aug 2025 16:55:21 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Ming Lei <ming.lei@...hat.com>, Yu Kuai <yukuai1@...weicloud.com>
Cc: axboe@...nel.dk, bvanassche@....org, nilay@...ux.ibm.com, hare@...e.de,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, yangerkun@...wei.com, johnny.chenyi@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH 01/16] blk-mq-sched: add new parameter nr_requests in
blk_mq_alloc_sched_tags()
Hi,
在 2025/08/14 16:16, Ming Lei 写道:
>> struct elevator_tags *blk_mq_alloc_sched_tags(struct blk_mq_tag_set *set,
>> - unsigned int nr_hw_queues)
>> + unsigned int nr_hw_queues, unsigned int nr_requests)
>> {
>> unsigned int nr_tags;
>> int i;
>> @@ -475,8 +475,11 @@ struct elevator_tags *blk_mq_alloc_sched_tags(struct blk_mq_tag_set *set,
>> * 128, since we don't split into sync/async like the old code
>> * did. Additionally, this is a per-hw queue depth.
>> */
>> - et->nr_requests = 2 * min_t(unsigned int, set->queue_depth,
>> - BLKDEV_DEFAULT_RQ);
>> + if (nr_requests)
>> + et->nr_requests = nr_requests;
>> + else
>> + et->nr_requests = 2 * min_t(unsigned int, set->queue_depth,
>> + BLKDEV_DEFAULT_RQ);
> It looks more readable to add helper blk_mq_default_nr_requests(),
> and pass it from call sites directly, then people won't be confused
> with the passed zero `nr_requests`.
Yes, this sounds good.
Thanks for the review,
Kuai
Powered by blists - more mailing lists