[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210406133733.GH3062550@infradead.org>
Date: Tue, 6 Apr 2021 14:37:33 +0100
From: Christoph Hellwig <hch@...radead.org>
To: "Matthew Wilcox (Oracle)" <willy@...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
Subject: Re: [PATCH v6 09/27] mm: Handle per-folio private data
On Wed, Mar 31, 2021 at 07:47:10PM +0100, Matthew Wilcox (Oracle) wrote:
> Add folio_private() and set_folio_private() which mirror page_private()
> and set_page_private() -- ie folio private data is the same as page
> private data. The only difference is that these return a void *
> instead of an unsigned long, which matches the majority of users.
>
> Turn attach_page_private() into attach_folio_private() and reimplement
> attach_page_private() as a wrapper. No filesystem which uses page private
> data currently supports compound pages, so we're free to define the rules.
> attach_page_private() may only be called on a head page; if you want
> to add private data to a tail page, you can call set_page_private()
> directly (and shouldn't increment the page refcount! That should be
> done when adding private data to the head page / folio).
>
> This saves 597 bytes of text with the distro-derived config that I'm
> testing due to removing the calls to compound_head() in get_page()
> & put_page().
Except that this seems to be the first patch that uses a field in the
non-struct page union leg in struct folio, which could be trivially
avoided this looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists