linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Dan Schatzberg <dschatzberg@fb.com>
Cc: Tejun Heo <tj@kernel.org>, Kernel Team <Kernel-team@fb.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fuse: enable caching of symlinks
Date: Wed, 10 Oct 2018 10:29:39 +0200	[thread overview]
Message-ID: <CAJfpegugRrA7-U4+6zRWZBEuTiYa=GgLqCeJWvhBz15-5szubQ@mail.gmail.com> (raw)
In-Reply-To: <FEA49C2E-639E-4B1E-A4A1-0E0879F1214A@fb.com>

On Tue, Oct 2, 2018 at 11:33 PM, Dan Schatzberg <dschatzberg@fb.com> wrote:
> On 9/27/18, 9:59 AM, "Miklos Szeredi" <miklos@szeredi.hu> wrote:
>
>>  On Thu, Sep 27, 2018 at 3:52 PM, Dan Schatzberg <dschatzberg@fb.com> wrote:
>>> FUSE file reads are cached in the page cache, but symlink reads are
>>> not. This patch enables FUSE READLINK operations to be cached which
>>> can improve performance of some FUSE workloads.
>>>
>>> In particular, I'm working on a FUSE filesystem for access to source
>>> code and discovered that about a 10% improvement to build times is
>>> achieved with this patch (there are a lot of symlinks in the source
>>> tree).
>>>
>>> Please provide feedback, I'm looking to flesh this out more.
>>
>> Need to think about how/when to invalidate the cached symlink
>> contents.  I think treating it like metadata (i.e. look at
>> attr_timeout for validity) would be the simplest.
>>
>> Thanks,
>> Miklos
>>
>
> Any further thoughts on this? Just so I can confirm my understanding,
> the attached patch will unconditionally cache READLINK responses
> However, based on the entry timeout provided by the LOOKUP response,
> Userspace can decide to invalidate this by providing a different inode on
> a subsequent LOOKUP (e.g. during fuse_dentry_revalidate())

Indeed.

> Would you like there to be a way to invalidate the cached symlink without
>  changing the inode via LOOKUP?

No, that would make no sense, since symlink contents are not mutable.
This was just a braino on my part.

I still worry about backward compatibility, though.  So we should add
a flag to negotiate symlink caching in with the INIT request.

Thanks,
Miklos

  reply	other threads:[~2018-10-10  8:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 13:52 [PATCH] fuse: enable caching of symlinks Dan Schatzberg
2018-09-27 13:58 ` Miklos Szeredi
2018-10-02 21:33   ` Dan Schatzberg
2018-10-10  8:29     ` Miklos Szeredi [this message]
2018-10-09 14:29   ` Dan Schatzberg

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='CAJfpegugRrA7-U4+6zRWZBEuTiYa=GgLqCeJWvhBz15-5szubQ@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=Kernel-team@fb.com \
    --cc=dschatzberg@fb.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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).