From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: v9fs@lists.linux.dev, Remi Pommarel <repk@triplefau.lt>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Van Hensbergen <ericvh@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Dominique Martinet <asmadeus@codewreck.org>,
Remi Pommarel <repk@triplefau.lt>
Subject: Re: [PATCH v2 2/3] 9p: Introduce option for negative dentry cache retention time
Date: Wed, 11 Feb 2026 16:58:02 +0100 [thread overview]
Message-ID: <3929797.kQq0lBPeGt@weasel> (raw)
In-Reply-To: <7e38e7bd31674208ab2b0de909c0744feda2c03f.1769013622.git.repk@triplefau.lt>
On Wednesday, 21 January 2026 20:56:09 CET Remi Pommarel wrote:
> Add support for a new mount option in v9fs that allows users to specify
> the duration for which negative dentries are retained in the cache. The
> retention time can be set in milliseconds using the ndentrytmo option.
>
> For the same consistency reasons, this option should only be used in
> exclusive or read-only mount scenarios, aligning with the cache=loose
> usage.
>
> Signed-off-by: Remi Pommarel <repk@triplefau.lt>
> ---
> fs/9p/v9fs.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index 1da7ab186478..f58a2718e412 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -39,7 +39,7 @@ enum {
> * source if we rejected it as EINVAL */
> Opt_source,
> /* Options that take integer arguments */
> - Opt_debug, Opt_dfltuid, Opt_dfltgid, Opt_afid,
> + Opt_debug, Opt_dfltuid, Opt_dfltgid, Opt_afid, Opt_ndentrytmo,
> /* String options */
> Opt_uname, Opt_remotename, Opt_cache, Opt_cachetag,
> /* Options that take no arguments */
> @@ -93,6 +93,7 @@ const struct fs_parameter_spec v9fs_param_spec[] = {
> fsparam_string ("access", Opt_access),
> fsparam_flag ("posixacl", Opt_posixacl),
> fsparam_u32 ("locktimeout", Opt_locktimeout),
> + fsparam_s32 ("ndentrytmo", Opt_ndentrytmo),
Not better "ndentrytimeout" ?
My first thought was whether it was really worth introducing a dedicated
timeout option exactly for negative dentries (instead of a general cache
timeout option). But on a 2nd thought it actually needs separate handling, as
negative dentries have the potential to pollute with a ridiculous amount of
bogus entries.
Wouldn't it make sense to enable this option with some meaningful value for
say cache=loose by default? 24 hours maybe?
>
> /* client options */
> fsparam_u32 ("msize", Opt_msize),
> @@ -159,6 +160,8 @@ int v9fs_show_options(struct seq_file *m, struct dentry
> *root) from_kgid_munged(&init_user_ns, v9ses->dfltgid));
> if (v9ses->afid != ~0)
> seq_printf(m, ",afid=%u", v9ses->afid);
> + if (v9ses->ndentry_timeout != 0)
> + seq_printf(m, ",ndentrytmo=%d", v9ses->ndentry_timeout);
> if (strcmp(v9ses->uname, V9FS_DEFUSER) != 0)
> seq_printf(m, ",uname=%s", v9ses->uname);
> if (strcmp(v9ses->aname, V9FS_DEFANAME) != 0)
> @@ -337,6 +340,10 @@ int v9fs_parse_param(struct fs_context *fc, struct
> fs_parameter *param) session_opts->session_lock_timeout =
> (long)result.uint_32 * HZ; break;
>
> + case Opt_ndentrytmo:
> + session_opts->ndentry_timeout = result.int_32;
> + break;
> +
> /* Options for client */
> case Opt_msize:
> if (result.uint_32 < 4096) {
next prev parent reply other threads:[~2026-02-11 15:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 19:56 [PATCH v2 0/3] 9p: Performance improvements for build workloads Remi Pommarel
2026-01-21 19:56 ` [PATCH v2 1/3] 9p: Cache negative dentries for lookup performance Remi Pommarel
2026-02-11 15:49 ` Christian Schoenebeck
2026-02-12 9:16 ` Remi Pommarel
2026-02-18 12:46 ` Christian Schoenebeck
2026-02-21 20:35 ` Remi Pommarel
2026-02-23 14:45 ` Christian Schoenebeck
2026-01-21 19:56 ` [PATCH v2 2/3] 9p: Introduce option for negative dentry cache retention time Remi Pommarel
2026-02-11 15:58 ` Christian Schoenebeck [this message]
2026-02-12 9:24 ` Remi Pommarel
2026-02-18 12:56 ` Christian Schoenebeck
2026-01-21 19:56 ` [PATCH v2 3/3] 9p: Enable symlink caching in page cache Remi Pommarel
2026-02-12 15:35 ` Christian Schoenebeck
2026-02-12 21:42 ` Remi Pommarel
2026-02-15 12:36 ` Dominique Martinet
2026-02-19 10:18 ` Christian Schoenebeck
2026-01-21 23:23 ` [PATCH v2 0/3] 9p: Performance improvements for build workloads Dominique Martinet
2026-02-04 11:37 ` Christian Schoenebeck
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=3929797.kQq0lBPeGt@weasel \
--to=linux_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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