[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1457985.1668472862@warthog.procyon.org.uk>
Date: Tue, 15 Nov 2022 00:41:02 +0000
From: David Howells <dhowells@...hat.com>
To: Dominique Martinet <asmadeus@...ewreck.org>
Cc: dhowells@...hat.com, willy@...radead.org, dwysocha@...hat.com,
Rohith Surabattula <rohiths.msft@...il.com>,
Steve French <sfrench@...ba.org>,
Shyam Prasad N <nspmangalore@...il.com>,
Ilya Dryomov <idryomov@...il.com>, linux-cachefs@...hat.com,
linux-cifs@...r.kernel.org, linux-afs@...ts.infradead.org,
v9fs-developer@...ts.sourceforge.net, ceph-devel@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2] mm, netfs, fscache: Stop read optimisation when folio removed from pagecache
Dominique Martinet <asmadeus@...ewreck.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
Powered by blists - more mailing lists