[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42582e63-ad03-8ae7-89d3-bbf2725acccd@suse.cz>
Date: Fri, 14 May 2021 12:35:07 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
akpm@...ux-foundation.org
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Zi Yan <ziy@...dia.com>,
Christoph Hellwig <hch@....de>,
Jeff Layton <jlayton@...nel.org>
Subject: Re: [PATCH v10 02/33] mm: Add folio_pgdat and folio_zone
On 5/11/21 11:47 PM, Matthew Wilcox (Oracle) wrote:
> These are just convenience wrappers for callers with folios; pgdat and
> zone can be reached from tail pages as well as head pages.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> Reviewed-by: Zi Yan <ziy@...dia.com>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Acked-by: Jeff Layton <jlayton@...nel.org>
Acked-by: Vlastimil Babka <vbabka@...e.cz>
> ---
> include/linux/mm.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index b29c86824e6b..a55c2c0628b6 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1560,6 +1560,16 @@ static inline pg_data_t *page_pgdat(const struct page *page)
> return NODE_DATA(page_to_nid(page));
> }
>
> +static inline struct zone *folio_zone(const struct folio *folio)
> +{
> + return page_zone(&folio->page);
> +}
> +
> +static inline pg_data_t *folio_pgdat(const struct folio *folio)
> +{
> + return page_pgdat(&folio->page);
> +}
> +
> #ifdef SECTION_IN_PAGE_FLAGS
> static inline void set_page_section(struct page *page, unsigned long section)
> {
>
Powered by blists - more mailing lists