From: Dominique Martinet <asmadeus@codewreck.org>
To: Remi Pommarel <repk@triplefau.lt>, David Howells <dhowells@redhat.com>
Cc: v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Eric Van Hensbergen <ericvh@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Christian Schoenebeck <linux_oss@crudebyte.com>
Subject: Re: [PATCH v7 4/4] 9p: Enable symlink caching in page cache
Date: Fri, 3 Jul 2026 23:36:56 +0900 [thread overview]
Message-ID: <akfJCNdLhWX8RHYk@codewreck.org> (raw)
In-Reply-To: <982462d17c0c0d2856763266a25eb04d080c1dbb.1779355927.git.repk@triplefau.lt>
Remi Pommarel wrote on Thu, May 21, 2026 at 11:40:32AM +0200:
> Currently, when cache=loose is enabled, file reads are cached in the
> page cache, but symlink reads are not. This patch allows the results
> of p9_client_readlink() to be stored in the page cache, eliminating
> the need for repeated 9P transactions on subsequent symlink accesses.
>
> This change improves performance for workloads that involve frequent
> symlink resolution.
Hi Remi, David,
This is similar to what is being discussed in [1] about file size not
matching data in sysfs, but this breaks symlinks there as well because
they have a size of 0...
[1] https://lore.kernel.org/all/akfHGcqke9qixd3Q@codewreck.org/
With /sys exported with tag 'test':
-virtfs local,path=/sys,mount_tag=test,security_model=none,multidevs=forbid
Then
# mount -t 9p -o cache=loose test /mnt
# ls -l /mnt/class/net
total 0
lrwxrwxrwx 1 nobody nogroup 0 Apr 30 22:07 lo -> ''
lrwxrwxrwx 1 nobody nogroup 0 Apr 30 22:07 dummy0 -> ''
I think we could just straight up ignore the size for symlinks and just
try to read it like we do with cache=none (that still works)?
OTOH someone mounting /sys with cache is likely to get rough surprises
so I'm not sure it's worth spending much time on such bogus files,
leaving this up to you, but wanted to bring symlinks up separately as
it's a new feature
Thanks,
--
Dominique Martinet | Asmadeus
prev parent reply other threads:[~2026-07-03 14:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 9:40 [PATCH v7 0/4] 9p: Performance improvements for build workloads Remi Pommarel
2026-05-21 9:40 ` [PATCH v7 1/4] 9p: Cache negative dentries for lookup performance Remi Pommarel
2026-05-21 9:40 ` [PATCH v7 2/4] 9p: Add mount option for negative dentry cache retention Remi Pommarel
2026-05-21 9:40 ` [PATCH v7 3/4] 9p: Set default negative dentry retention time for cache=loose Remi Pommarel
2026-05-21 9:40 ` [PATCH v7 4/4] 9p: Enable symlink caching in page cache Remi Pommarel
2026-07-03 14:36 ` Dominique Martinet [this message]
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=akfJCNdLhWX8RHYk@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=dhowells@redhat.com \
--cc=ericvh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=repk@triplefau.lt \
--cc=v9fs@lists.linux.dev \
/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