[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210419135528.GC2531743@casper.infradead.org>
Date: Mon, 19 Apr 2021 14:55:28 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-cachefs@...hat.com,
linux-afs@...ts.infradead.org, Christoph Hellwig <hch@....de>,
Jeff Layton <jlayton@...nel.org>
Subject: Re: [PATCH v7 09/28] mm: Create FolioFlags
On Mon, Apr 19, 2021 at 03:25:46PM +0200, Peter Zijlstra wrote:
> On Fri, Apr 09, 2021 at 07:50:46PM +0100, Matthew Wilcox (Oracle) wrote:
> > These new functions are the folio analogues of the PageFlags functions.
> > If CONFIG_DEBUG_VM_PGFLAGS is enabled, we check the folio is not a tail
> > page at every invocation. Note that this will also catch the PagePoisoned
> > case as a poisoned page has every bit set, which would include PageTail.
> >
> > This saves 1727 bytes of text with the distro-derived config that
> > I'm testing due to removing a double call to compound_head() in
> > PageSwapCache().
>
> I vote for dropping the Camels if we're going to rework all this.
I'm open to that. It's a bit of rework now, but easier to do it as
part of this than as a separate series.
So, concretely:
PageReferences() becomes folio_referenced()
SetPageReferenced() becomes folio_set_referenced()
ClearPageReferenced() becomes folio_clear_referenced()
__SetFolioReferenced() becomes __folio_set_referenced()
__ClearFolioReferenced() becomes __folio_clear_referenced()
TestSetPageReferenced() becomes folio_test_set_referenced()
TestClearPageReferenced() becomes folio_test_clear_referenced()
We do have some functions already like set_page_writeback(), but I
think those can become folio_set_writeback() without doing any harm.
We also have page_is_young(), page_is_pfmemalloc(), page_is_guard(),
etc. Should it be folio_referenced()? or folio_is_referenced()?
Powered by blists - more mailing lists