[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <60a26451-22cd-409b-920d-eb9d8490e246@yukuai.org.cn>
Date: Mon, 6 Oct 2025 10:00:21 +0800
From: Yu Kuai <hailan@...uai.org.cn>
To: Nilay Shroff <nilay@...ux.ibm.com>, Yu Kuai <yukuai1@...weicloud.com>,
axboe@...nel.dk, bvanassche@....org, ming.lei@...hat.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai3@...wei.com, yi.zhang@...wei.com, yangerkun@...wei.com,
johnny.chenyi@...wei.com
Subject: Re: [PATCH 7/7] blk-mq: add documentation for new queue attribute
async_dpeth
Hi,
在 2025/10/2 23:12, Nilay Shroff 写道:
>
> On 9/30/25 12:41 PM, Yu Kuai wrote:
>> From: Yu Kuai <yukuai3@...wei.com>
>>
>> Explain the attribute and the default value in different case.
>>
>> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
>> ---
>> Documentation/ABI/stable/sysfs-block | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/Documentation/ABI/stable/sysfs-block b/Documentation/ABI/stable/sysfs-block
>> index 0ed10aeff86b..09b9b3db9a1f 100644
>> --- a/Documentation/ABI/stable/sysfs-block
>> +++ b/Documentation/ABI/stable/sysfs-block
>> @@ -609,6 +609,16 @@ Description:
>> enabled, and whether tags are shared.
>>
>>
>> +What: /sys/block/<disk>/queue/async_depth
>> +Date: August 2025
>> +Contact: linux-block@...r.kernel.org
>> +Description:
>> + [RW] This controls how many async requests may be allocated in the
>> + block layer. If elevator is none, then this value is nr_requests.
>> + By default, this value is 75% of nr_requests for bfq and kyber,
>> + abd nr_requests for mq-deadline.
>> +
> Hmm, it seems we need to further elaborate above documentation, seeing the
> way this new sysfs interface is playing out now for different I/O schedulers.
> I'd suggest rewriting this as follow (you may further modify/simplify it based
> on your taste, if needed):
>
> Description:
> [RW] Controls how many asynchronous requests may be allocated in the
> block layer. The value is always capped at nr_requests.
>
> When no elevator is active (none):
> - async_depth is always equal to nr_requests.
>
> For bfq scheduler:
> - By default, async_depth is set to 75% of nr_requests.
> Internal limits are then derived from this value:
> * Sync writes: limited to async_depth (≈75% of nr_requests).
> * Async I/O: limited to ~2/3 of async_depth (≈50% of nr_requests).
>
> If a bfq_queue is weight-raised:
> * Sync writes: limited to ~1/2 of async_depth (≈37% of nr_requests).
> * Async I/O: limited to ~1/4 of async_depth (≈18% of nr_requests).
>
> - If the user writes a custom value to async_depth, BFQ will recompute
> these limits proportionally based on the new value.
>
> For Kyber:
> - By default async_depth is set to 75% of nr_requests.
> - If the user writes a custom value to async_depth, then it override the
> default and directly control the limit for writes and async I/O.
>
> For mq-deadline:
> - By default async_depth is set to nr_requests.
> - If the user writes a custom value to async_depth, then it override the
> default and directly control the limit for writes and async I/O.
This is great! I will use this in the next version.
Thanks
Kuai
> Thanks,
> --Nilay
>
>
Powered by blists - more mailing lists