mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ext4: Modify the comment about mb_optimize_scan
@ 2025-02-24  1:20 Zizhi Wo
  2025-02-24  1:59 ` Zhang Yi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zizhi Wo @ 2025-02-24  1:20 UTC (permalink / raw)
  To: linux-ext4, jack, tytso; +Cc: linux-fsdevel, linux-kernel, wozizhi, yangerkun

Commit 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") introduces
the sysfs control interface "mb_max_linear_groups" to address the problem
that rotational devices performance degrades when the "mb_optimize_scan"
feature is enabled, which may result in distant block group allocation.

However, the name of the interface was incorrect in the comment to the
ext4/mballoc.c file, and this patch fixes it, without further changes.

Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
---
 fs/ext4/mballoc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b25a27c86696..68b54afc78c7 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -187,7 +187,7 @@
  * /sys/fs/ext4/<partition>/mb_min_to_scan
  * /sys/fs/ext4/<partition>/mb_max_to_scan
  * /sys/fs/ext4/<partition>/mb_order2_req
- * /sys/fs/ext4/<partition>/mb_linear_limit
+ * /sys/fs/ext4/<partition>/mb_max_linear_groups
  *
  * The regular allocator uses buddy scan only if the request len is power of
  * 2 blocks and the order of allocation is >= sbi->s_mb_order2_reqs. The
@@ -209,7 +209,7 @@
  * get traversed linearly. That may result in subsequent allocations being not
  * close to each other. And so, the underlying device may get filled up in a
  * non-linear fashion. While that may not matter on non-rotational devices, for
- * rotational devices that may result in higher seek times. "mb_linear_limit"
+ * rotational devices that may result in higher seek times. "mb_max_linear_groups"
  * tells mballoc how many groups mballoc should search linearly before
  * performing consulting above data structures for more efficient lookups. For
  * non rotational devices, this value defaults to 0 and for rotational devices
-- 
2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: Modify the comment about mb_optimize_scan
  2025-02-24  1:20 [PATCH] ext4: Modify the comment about mb_optimize_scan Zizhi Wo
@ 2025-02-24  1:59 ` Zhang Yi
  2025-02-24  6:48 ` Ojaswin Mujoo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2025-02-24  1:59 UTC (permalink / raw)
  To: Zizhi Wo; +Cc: linux-fsdevel, linux-kernel, linux-ext4, jack, tytso, yangerkun

On 2025/2/24 9:20, Zizhi Wo wrote:
> Commit 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") introduces
> the sysfs control interface "mb_max_linear_groups" to address the problem
> that rotational devices performance degrades when the "mb_optimize_scan"
> feature is enabled, which may result in distant block group allocation.
> 
> However, the name of the interface was incorrect in the comment to the
> ext4/mballoc.c file, and this patch fixes it, without further changes.
> 
> Signed-off-by: Zizhi Wo <wozizhi@huawei.com>

Looks good to me.

Reviewed-by: Zhang Yi <yi.zhang@huawei.com>

> ---
>  fs/ext4/mballoc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index b25a27c86696..68b54afc78c7 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -187,7 +187,7 @@
>   * /sys/fs/ext4/<partition>/mb_min_to_scan
>   * /sys/fs/ext4/<partition>/mb_max_to_scan
>   * /sys/fs/ext4/<partition>/mb_order2_req
> - * /sys/fs/ext4/<partition>/mb_linear_limit
> + * /sys/fs/ext4/<partition>/mb_max_linear_groups
>   *
>   * The regular allocator uses buddy scan only if the request len is power of
>   * 2 blocks and the order of allocation is >= sbi->s_mb_order2_reqs. The
> @@ -209,7 +209,7 @@
>   * get traversed linearly. That may result in subsequent allocations being not
>   * close to each other. And so, the underlying device may get filled up in a
>   * non-linear fashion. While that may not matter on non-rotational devices, for
> - * rotational devices that may result in higher seek times. "mb_linear_limit"
> + * rotational devices that may result in higher seek times. "mb_max_linear_groups"
>   * tells mballoc how many groups mballoc should search linearly before
>   * performing consulting above data structures for more efficient lookups. For
>   * non rotational devices, this value defaults to 0 and for rotational devices


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: Modify the comment about mb_optimize_scan
  2025-02-24  1:20 [PATCH] ext4: Modify the comment about mb_optimize_scan Zizhi Wo
  2025-02-24  1:59 ` Zhang Yi
@ 2025-02-24  6:48 ` Ojaswin Mujoo
  2025-02-24  9:14 ` Baokun Li
  2025-03-18  3:41 ` Theodore Ts'o
  3 siblings, 0 replies; 5+ messages in thread
From: Ojaswin Mujoo @ 2025-02-24  6:48 UTC (permalink / raw)
  To: Zizhi Wo; +Cc: linux-ext4, jack, tytso, linux-fsdevel, linux-kernel, yangerkun

On Mon, Feb 24, 2025 at 09:20:05AM +0800, Zizhi Wo wrote:
> Commit 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") introduces
> the sysfs control interface "mb_max_linear_groups" to address the problem
> that rotational devices performance degrades when the "mb_optimize_scan"
> feature is enabled, which may result in distant block group allocation.
> 
> However, the name of the interface was incorrect in the comment to the
> ext4/mballoc.c file, and this patch fixes it, without further changes.

Looks good Zizhi, feel free to add:

Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>

IIRC the documentation above mballoc is a bit outdated and it might
be a good idea to see if we can make more improvements there. Maybe
something worth exploring

Regards,
ojaswin
> 
> Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
> ---
>  fs/ext4/mballoc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index b25a27c86696..68b54afc78c7 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -187,7 +187,7 @@
>   * /sys/fs/ext4/<partition>/mb_min_to_scan
>   * /sys/fs/ext4/<partition>/mb_max_to_scan
>   * /sys/fs/ext4/<partition>/mb_order2_req
> - * /sys/fs/ext4/<partition>/mb_linear_limit
> + * /sys/fs/ext4/<partition>/mb_max_linear_groups
>   *
>   * The regular allocator uses buddy scan only if the request len is power of
>   * 2 blocks and the order of allocation is >= sbi->s_mb_order2_reqs. The
> @@ -209,7 +209,7 @@
>   * get traversed linearly. That may result in subsequent allocations being not
>   * close to each other. And so, the underlying device may get filled up in a
>   * non-linear fashion. While that may not matter on non-rotational devices, for
> - * rotational devices that may result in higher seek times. "mb_linear_limit"
> + * rotational devices that may result in higher seek times. "mb_max_linear_groups"
>   * tells mballoc how many groups mballoc should search linearly before
>   * performing consulting above data structures for more efficient lookups. For
>   * non rotational devices, this value defaults to 0 and for rotational devices
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: Modify the comment about mb_optimize_scan
  2025-02-24  1:20 [PATCH] ext4: Modify the comment about mb_optimize_scan Zizhi Wo
  2025-02-24  1:59 ` Zhang Yi
  2025-02-24  6:48 ` Ojaswin Mujoo
@ 2025-02-24  9:14 ` Baokun Li
  2025-03-18  3:41 ` Theodore Ts'o
  3 siblings, 0 replies; 5+ messages in thread
From: Baokun Li @ 2025-02-24  9:14 UTC (permalink / raw)
  To: Zizhi Wo; +Cc: jack, linux-fsdevel, linux-kernel, yangerkun, tytso, linux-ext4

On 2025/2/24 9:20, Zizhi Wo wrote:
> Commit 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") introduces
> the sysfs control interface "mb_max_linear_groups" to address the problem
> that rotational devices performance degrades when the "mb_optimize_scan"
> feature is enabled, which may result in distant block group allocation.
>
> However, the name of the interface was incorrect in the comment to the
> ext4/mballoc.c file, and this patch fixes it, without further changes.
>
> Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Looks good.

Reviewed-by: Baokun Li <libaokun1@huawei.com>
> ---
>   fs/ext4/mballoc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index b25a27c86696..68b54afc78c7 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -187,7 +187,7 @@
>    * /sys/fs/ext4/<partition>/mb_min_to_scan
>    * /sys/fs/ext4/<partition>/mb_max_to_scan
>    * /sys/fs/ext4/<partition>/mb_order2_req
> - * /sys/fs/ext4/<partition>/mb_linear_limit
> + * /sys/fs/ext4/<partition>/mb_max_linear_groups
>    *
>    * The regular allocator uses buddy scan only if the request len is power of
>    * 2 blocks and the order of allocation is >= sbi->s_mb_order2_reqs. The
> @@ -209,7 +209,7 @@
>    * get traversed linearly. That may result in subsequent allocations being not
>    * close to each other. And so, the underlying device may get filled up in a
>    * non-linear fashion. While that may not matter on non-rotational devices, for
> - * rotational devices that may result in higher seek times. "mb_linear_limit"
> + * rotational devices that may result in higher seek times. "mb_max_linear_groups"
>    * tells mballoc how many groups mballoc should search linearly before
>    * performing consulting above data structures for more efficient lookups. For
>    * non rotational devices, this value defaults to 0 and for rotational devices



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: Modify the comment about mb_optimize_scan
  2025-02-24  1:20 [PATCH] ext4: Modify the comment about mb_optimize_scan Zizhi Wo
                   ` (2 preceding siblings ...)
  2025-02-24  9:14 ` Baokun Li
@ 2025-03-18  3:41 ` Theodore Ts'o
  3 siblings, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2025-03-18  3:41 UTC (permalink / raw)
  To: linux-ext4, jack, Zizhi Wo
  Cc: Theodore Ts'o, linux-fsdevel, linux-kernel, yangerkun


On Mon, 24 Feb 2025 09:20:05 +0800, Zizhi Wo wrote:
> Commit 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") introduces
> the sysfs control interface "mb_max_linear_groups" to address the problem
> that rotational devices performance degrades when the "mb_optimize_scan"
> feature is enabled, which may result in distant block group allocation.
> 
> However, the name of the interface was incorrect in the comment to the
> ext4/mballoc.c file, and this patch fixes it, without further changes.
> 
> [...]

Applied, thanks!

[1/1] ext4: Modify the comment about mb_optimize_scan
      commit: 447c11274113dd3543224816cca0d3027759c630

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-18  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-24  1:20 [PATCH] ext4: Modify the comment about mb_optimize_scan Zizhi Wo
2025-02-24  1:59 ` Zhang Yi
2025-02-24  6:48 ` Ojaswin Mujoo
2025-02-24  9:14 ` Baokun Li
2025-03-18  3:41 ` Theodore Ts'o

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®