mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luis Henriques <luis@igalia.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Bernd Schubert <bernd@bsbernd.com>,
	 Laura Promberger <laura.promberger@cern.ch>,
	 Dave Chinner <david@fromorbit.com>,
	 Matt Harvey <mharvey@jumptrading.com>,
	 linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com,
	 linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v5 2/2] fuse: new work queue to invalidate dentries from old epochs
Date: Thu, 04 Sep 2025 16:21:02 +0100	[thread overview]
Message-ID: <87plc6kzvl.fsf@wotan.olymp> (raw)
In-Reply-To: <CAJfpegsyrSPxLK=nVLDSPWq0dyvoMr+s0K-Lep1BvqX1wpZphA@mail.gmail.com> (Miklos Szeredi's message of "Thu, 4 Sep 2025 16:38:32 +0200")

On Thu, Sep 04 2025, Miklos Szeredi wrote:

> On Thu, 4 Sept 2025 at 16:11, Luis Henriques <luis@igalia.com> wrote:
>>
>> On Thu, Sep 04 2025, Miklos Szeredi wrote:
>>
>> > On Thu, 28 Aug 2025 at 18:30, Luis Henriques <luis@igalia.com> wrote:
>> >>
>> >> With the infrastructure introduced to periodically invalidate expired
>> >> dentries, it is now possible to add an extra work queue to invalidate
>> >> dentries when an epoch is incremented.  This work queue will only be
>> >> triggered when the 'inval_wq' parameter is set.
>> >>
>> >> Signed-off-by: Luis Henriques <luis@igalia.com>
>> >> ---
>> >>  fs/fuse/dev.c    |  7 ++++---
>> >>  fs/fuse/dir.c    | 34 ++++++++++++++++++++++++++++++++++
>> >>  fs/fuse/fuse_i.h |  4 ++++
>> >>  fs/fuse/inode.c  | 41 ++++++++++++++++++++++-------------------
>> >>  4 files changed, 64 insertions(+), 22 deletions(-)
>> >>
>> >> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
>> >> index e80cd8f2c049..48c5c01c3e5b 100644
>> >> --- a/fs/fuse/dev.c
>> >> +++ b/fs/fuse/dev.c
>> >> @@ -2033,13 +2033,14 @@ static int fuse_notify_resend(struct fuse_conn *fc)
>> >>
>> >>  /*
>> >>   * Increments the fuse connection epoch.  This will result of dentries from
>> >> - * previous epochs to be invalidated.
>> >> - *
>> >> - * XXX optimization: add call to shrink_dcache_sb()?
>> >
>> > I guess it wouldn't hurt.   Definitely simpler, so I'd opt for this.
>>
>> So, your suggesting to have the work queue simply calling this instead of
>> walking through the dentries?  (Or even *not* having a work queue at all?)
>
> I think doing in in a work queue is useful, since walking the tree
> might take a significant amount of time.
>
> Not having to do the walk manually is definitely a simplification.
> It might throw out dentries that got looked up since the last epoch,
> but it's probably not a big loss in terms of performance.

OK, so that definitely makes things simpler for v6.  Thanks!

Cheers,
-- 
Luís

      reply	other threads:[~2025-09-04 15:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 16:29 [RFC PATCH v5 0/2] fuse: work queues to invalided dentries Luis Henriques
2025-08-28 16:29 ` [RFC PATCH v5 1/2] fuse: new work queue to periodically invalidate expired dentries Luis Henriques
2025-09-04 10:20   ` Miklos Szeredi
2025-09-04 14:00     ` Luis Henriques
2025-09-04 15:12       ` Miklos Szeredi
2025-09-04 15:30         ` Luis Henriques
2025-08-28 16:29 ` [RFC PATCH v5 2/2] fuse: new work queue to invalidate dentries from old epochs Luis Henriques
2025-09-04 10:35   ` Miklos Szeredi
2025-09-04 14:11     ` Luis Henriques
2025-09-04 14:38       ` Miklos Szeredi
2025-09-04 15:21         ` Luis Henriques [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=87plc6kzvl.fsf@wotan.olymp \
    --to=luis@igalia.com \
    --cc=bernd@bsbernd.com \
    --cc=david@fromorbit.com \
    --cc=kernel-dev@igalia.com \
    --cc=laura.promberger@cern.ch \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mharvey@jumptrading.com \
    --cc=miklos@szeredi.hu \
    /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

all inboxes | Powered by JetHome®