linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Yuwen Chen <ywen.chen@foxmail.com>
To: hch@infradead.org
Cc: brauner@kernel.org, ywen.chen@foxmail.com, tytso@mit.edu,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, ebiggers@kernel.org,
	adilger.kernel@dilger.ca, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match
Date: Tue,  8 Jul 2025 15:11:41 +0800	[thread overview]
Message-ID: <tencent_19ABF292BF48BBA08B98B8C3C7BD5D19CE09@qq.com> (raw)
In-Reply-To: <aGtatW8g2fV6bFkm@infradead.org>

On Sun, 6 Jul 2025 22:27:17 -0700 Christoph Hellwig wrote:
> But I wonder why generic_ci_match is even called that often.  Both ext4
> and f2fs support hashed lookups, so you should usually only see it called
> for the main match, plus the occasional hash false positive, which should
> be rate if the hash works.

At present, in the latest version of Linux, in some scenarios,
f2fs still uses linear search.

The logic of linear search was introduced by Commit 91b587ba79e1
(f2fs: Introduce linear search for dentries). Commit 91b587ba79e1
was designed to solve the problem of inconsistent hashes before
and after the rollback of Commit 5c26d2f1d3f5
("unicode: Don't special case ignorable code points"),
which led to files being inaccessible.

In order to reduce the impact of linear search, in relatively new
versions, the logic of turning off linear search has also been
introduced. However, the triggering conditions for this
turn - off logic on f2fs are rather strict:

1. Use the latest version of the fsck.f2fs tool to correct
the file system.
2. Use a relatively new version of the kernel. (For example,
linear search cannot be turned off in v6.6)

The performance gain of this commit is very obvious in scenarios
where linear search is not turned off. In scenarios where linear
search is turned off, no performance problems will be introduced
either.



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2025-07-08  7:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03  8:21 [f2fs-dev] [PATCH] f2fs: improve the performance of f2fs_lookup Yuwen Chen
2025-07-03  8:56 ` Christoph Hellwig
2025-07-04  2:43   ` [f2fs-dev] [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match Yuwen Chen
2025-07-04  6:02     ` Eric Biggers via Linux-f2fs-devel
2025-07-07  5:27       ` Christoph Hellwig
2025-07-08  7:11         ` Yuwen Chen [this message]
     [not found]         ` <tencent_3B7E5FEB5DB445A5DC50E3F3AE4DE72A7908@qq.com>
2025-07-08  9:40           ` [f2fs-dev] 回复: " Christoph Hellwig
2025-07-04  2:44   ` [f2fs-dev] [PATCH v3 2/2] f2fs: improve the performance of f2fs_lookup Yuwen Chen
2025-07-03  9:54 ` [f2fs-dev] [PATCH v2] " Yuwen Chen
2025-07-08  6:41 ` [f2fs-dev] [PATCH v4 1/2] libfs: reduce the number of memory allocations in generic_ci_match Yuwen Chen
2025-07-09  2:42 ` [f2fs-dev] [PATCH] f2fs: improve the performance of f2fs_lookup kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-07-08  6:52 [f2fs-dev] [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match ywen.chen

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=tencent_19ABF292BF48BBA08B98B8C3C7BD5D19CE09@qq.com \
    --to=ywen.chen@foxmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=brauner@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=hch@infradead.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).