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 v3 3/4] 9p: Set default negative dentry retention time for cache=loose
Date: Wed, 04 Mar 2026 13:54:55 +0100 [thread overview]
Message-ID: <13960849.dW097sEU6C@weasel> (raw)
In-Reply-To: <59d4509e1015eb664bc2b5e59e1d5cf11ab95656.1772178819.git.repk@triplefau.lt>
On Friday, 27 February 2026 08:56:54 CET Remi Pommarel wrote:
> For cache=loose mounts, set the default negative dentry cache retention
> time to 24 hours.
>
> Signed-off-by: Remi Pommarel <repk@triplefau.lt>
> ---
> fs/9p/v9fs.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index a26bd9070786..d14f6eda94d6 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -24,6 +24,9 @@
> #include "v9fs_vfs.h"
> #include "cache.h"
>
> +/* cache=loose default negative dentry retention time is 24hours */
> +#define CACHE_LOOSE_NDENTRY_TMOUT_DEFAULT (24 * 60 * 60 * 1000)
> +
Come on, really worth to save 4 characters here as well? :)
Whatever:
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
> static DEFINE_SPINLOCK(v9fs_sessionlist_lock);
> static LIST_HEAD(v9fs_sessionlist);
> struct kmem_cache *v9fs_inode_cache;
> @@ -440,6 +443,13 @@ static void v9fs_apply_options(struct v9fs_session_info
> *v9ses, v9ses->uid = ctx->session_opts.uid;
> v9ses->session_lock_timeout = ctx->session_opts.session_lock_timeout;
> v9ses->ndentry_timeout_ms = ctx->session_opts.ndentry_timeout_ms;
> +
> + /* If negative dentry timeout has not been overriden set default for
> + * cache=loose
> + */
> + if (!(v9ses->flags & V9FS_NDENTRY_TMOUT_SET) &&
> + (v9ses->cache & CACHE_LOOSE))
> + v9ses->ndentry_timeout_ms = CACHE_LOOSE_NDENTRY_TMOUT_DEFAULT;
> }
>
> /**
next prev parent reply other threads:[~2026-03-04 12:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 7:56 [PATCH v3 0/4] 9p: Performance improvements for build workloads Remi Pommarel
2026-02-27 7:56 ` [PATCH v3 1/4] 9p: Cache negative dentries for lookup performance Remi Pommarel
2026-03-04 12:50 ` Christian Schoenebeck
2026-02-27 7:56 ` [PATCH v3 2/4] 9p: Add mount option for negative dentry cache retention Remi Pommarel
2026-03-03 14:53 ` Christian Schoenebeck
2026-03-03 21:45 ` Dominique Martinet
2026-03-04 8:25 ` Remi Pommarel
2026-03-04 9:01 ` Christian Schoenebeck
2026-03-04 9:16 ` Dominique Martinet
2026-03-04 12:45 ` Christian Schoenebeck
2026-02-27 7:56 ` [PATCH v3 3/4] 9p: Set default negative dentry retention time for cache=loose Remi Pommarel
2026-03-04 12:54 ` Christian Schoenebeck [this message]
2026-02-27 7:56 ` [PATCH v3 4/4] 9p: Enable symlink caching in page cache Remi Pommarel
2026-03-04 13:01 ` 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=13960849.dW097sEU6C@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