From: David Howells <dhowells@redhat.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: dhowells@redhat.com, willy@infradead.org, dwysocha@redhat.com,
Rohith Surabattula <rohiths.msft@gmail.com>,
Steve French <sfrench@samba.org>,
Shyam Prasad N <nspmangalore@gmail.com>,
Ilya Dryomov <idryomov@gmail.com>,
linux-cachefs@redhat.com, linux-cifs@vger.kernel.org,
linux-afs@lists.infradead.org,
v9fs-developer@lists.sourceforge.net, ceph-devel@vger.kernel.org,
linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2] mm, netfs, fscache: Stop read optimisation when folio removed from pagecache
Date: Tue, 15 Nov 2022 00:41:02 +0000 [thread overview]
Message-ID: <1457985.1668472862@warthog.procyon.org.uk> (raw)
In-Reply-To: <Y3Lbul7FZncNVwVZ@codewreck.org>
Dominique Martinet <asmadeus@codewreck.org> wrote:
> any harm in setting this if netfs isn't enabled?
> (just asking because you checked in fs/9p/cache.c above)
Well, it forces a call to ->release_folio() every time a folio is released, if
set, rather than just if PG_private/PG_private_2 is set.
> > +static inline void mapping_clear_release_always(struct address_space *mapping)
> > +{
> > + set_bit(AS_RELEASE_ALWAYS, &mapping->flags);
>
> clear_bit certainly?
Bah. Yes.
> > - if (folio_has_private(folio) && !filemap_release_folio(folio, 0))
> > + if (!filemap_release_folio(folio, 0))
>
> should this (and all others) check for folio_needs_release instead of has_private?
> filemap_release_folio doesn't check as far as I can see, but perhaps
> it's already fast and noop for another reason I didn't see.
Willy suggested merging the checks from folio_has_private() into
filemap_release_folio():
https://lore.kernel.org/r/Yk9V/03wgdYi65Lb@casper.infradead.org/
David
next prev parent reply other threads:[~2022-11-15 0:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 16:02 [RFC PATCH v2] mm, netfs, fscache: Stop read optimisation when folio removed from pagecache David Howells
2022-11-15 0:22 ` Dominique Martinet
2022-11-15 0:41 ` David Howells [this message]
2022-11-15 2:34 ` Dominique Martinet
2022-11-15 4:09 ` Matthew Wilcox
2022-11-15 9:40 ` David Howells
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=1457985.1668472862@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=asmadeus@codewreck.org \
--cc=ceph-devel@vger.kernel.org \
--cc=dwysocha@redhat.com \
--cc=idryomov@gmail.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=rohiths.msft@gmail.com \
--cc=sfrench@samba.org \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=willy@infradead.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).