[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YPaosfFeqoPpx19G@kernel.org>
Date: Tue, 20 Jul 2021 13:42:57 +0300
From: Mike Rapoport <rppt@...nel.org>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, Christoph Hellwig <hch@....de>,
Jeff Layton <jlayton@...nel.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Vlastimil Babka <vbabka@...e.cz>,
William Kucharski <william.kucharski@...cle.com>,
David Howells <dhowells@...hat.com>
Subject: Re: [PATCH v14 012/138] mm: Handle per-folio private data
On Thu, Jul 15, 2021 at 04:34:58AM +0100, Matthew Wilcox (Oracle) wrote:
> Add folio_get_private() which mirrors 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 folio_attach_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 813 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().
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Acked-by: Jeff Layton <jlayton@...nel.org>
> Acked-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
> Reviewed-by: William Kucharski <william.kucharski@...cle.com>
> Reviewed-by: David Howells <dhowells@...hat.com>
> ---
> include/linux/mm_types.h | 11 +++++++++
> include/linux/pagemap.h | 48 ++++++++++++++++++++++++----------------
> 2 files changed, 40 insertions(+), 19 deletions(-)
Acked-by: Mike Rapoport <rppt@...ux.ibm.com>
Powered by blists - more mailing lists