public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Yi <yizhang089@gmail.com>
To: Jan Kara <jack@suse.cz>, Ted Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Baokun Li <libaokun1@huawei.com>
Subject: Re: [PATCH 2/2] ext4: use optimized mballoc scanning regardless of inode format
Date: Sat, 10 Jan 2026 09:38:13 +0800	[thread overview]
Message-ID: <5877f412-003c-4893-bf6d-229957802eda@gmail.com> (raw)
In-Reply-To: <20260109105354.16008-4-jack@suse.cz>

On 1/9/2026 6:53 PM, Jan Kara wrote:
> Currently we don't used mballoc optimized scanning (using max free
> extent order and avg free extent order group lists) for inodes with
> indirect block based format. This is confusing for users and I don't see
> a good reason for that. Even with indirect block based inode format we
> can spend big amount of time searching for free blocks for large
> filesystems with fragmented free space. To add to the confusion before
> commit 077d0c2c78df ("ext4: make mb_optimize_scan performance mount
> option work with extents") optimized scanning was applied *only* to
> indirect block based inodes so that commit appears as a performance
> regression to some users. Just use optimized scanning whenever it is
> enabled by mount options.
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

Makes sense to me.

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

> ---
>   fs/ext4/mballoc.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index f0e07bf11a93..cd98c472631e 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -1145,8 +1145,6 @@ static inline int should_optimize_scan(struct ext4_allocation_context *ac)
>   		return 0;
>   	if (ac->ac_criteria >= CR_GOAL_LEN_SLOW)
>   		return 0;
> -	if (!ext4_test_inode_flag(ac->ac_inode, EXT4_INODE_EXTENTS))
> -		return 0;
>   	return 1;
>   }
>   


  parent reply	other threads:[~2026-01-10  1:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 10:53 [PATCH 0/2 v2] ext4: use mb_optimize_scan regardless of inode format Jan Kara
2026-01-09 10:53 ` [PATCH 1/2] ext4: always allocate blocks only from groups inode can use Jan Kara
2026-01-10  0:59   ` Baokun Li
2026-01-10  1:36   ` Zhang Yi
2026-01-13 16:28   ` Pedro Falcato
2026-01-14 17:26     ` Jan Kara
2026-01-09 10:53 ` [PATCH 2/2] ext4: use optimized mballoc scanning regardless of inode format Jan Kara
2026-01-10  1:00   ` Baokun Li
2026-01-10  1:38   ` Zhang Yi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-01-14 18:28 [PATCH 0/2 v3] ext4: use mb_optimize_scan " Jan Kara
2026-01-14 18:28 ` [PATCH 2/2] ext4: use optimized mballoc scanning " Jan Kara

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=5877f412-003c-4893-bf6d-229957802eda@gmail.com \
    --to=yizhang089@gmail.com \
    --cc=jack@suse.cz \
    --cc=libaokun1@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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