From: Miklos Szeredi <miklos@szeredi.hu>
To: Chad Austin <chadaustin@fb.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"caustin@gmail.com" <caustin@gmail.com>
Subject: Re: Invalidating cached FUSE directory entries
Date: Mon, 4 Feb 2019 08:50:09 +0100 [thread overview]
Message-ID: <CAJfpegst-85pFuWW6UmXxDZXQc-rCxPGMsmc_MDkyZeO3aC8GQ@mail.gmail.com> (raw)
In-Reply-To: <8B717E7C-9C17-47E4-AAB6-5BF081D0C3A4@fb.com>
On Thu, Jan 31, 2019 at 2:57 AM Chad Austin <chadaustin@fb.com> wrote:
>
> On a recent kernel with readdir caching and FUSE_NO_OPENDIR_SUPPORT
> (and this follow-on patch:
> https://patchwork.kernel.org/patch/10785105/ ), I benchmarked our
> source control FUSE filesystem. With hot caches and zero requests
> being made to userspace, I could do a full directory crawl of a major
> subset of our repository in under 3 seconds. When I ran the same test
> against ext4 and btrfs, it took between 3 and 6 seconds. Awesome!
>
> However, though we were correctly sending FUSE_NOTIFY_INVAL_ENTRY
> whenever changing a directory inode's entry, this did not flush the
> readdir pagecache. It looks to me like FUSE_NOTIFY_INVAL_ENTRY only
> invalidates the readdir cache if the dcache has an entry with the
> given name. Whether that's true is entirely out of userspace's hands.
>
> We worked around it by also explicitly sending FUSE_NOTIFY_INVAL_INODE
> once per inode if we ever sent FUSE_NOTIFY_INVAL_ENTRY. But this
> increases our invalidation traffic and seems unnecessary.
>
> What do you think about having FUSE_NOTIFY_INVAL_ENTRY also
> unconditionally invalidate the readdir cache?
Makes sense.
Thanks,
Miklos
prev parent reply other threads:[~2019-02-04 7:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 1:57 Invalidating cached FUSE directory entries Chad Austin
2019-02-04 7:50 ` Miklos Szeredi [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=CAJfpegst-85pFuWW6UmXxDZXQc-rCxPGMsmc_MDkyZeO3aC8GQ@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=caustin@gmail.com \
--cc=chadaustin@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
/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).