[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <264e859c-820f-4001-b5b7-d4011fcbc192@redhat.com>
Date: Fri, 7 Mar 2025 09:10:53 +0100
From: David Hildenbrand <david@...hat.com>
To: Luiz Capitulino <luizcap@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, yuzhao@...gle.com, pasha.tatashin@...een.com
Cc: akpm@...ux-foundation.org, hannes@...xchg.org, muchun.song@...ux.dev
Subject: Re: [PATCH v3 1/3] mm: page_ext: add an iteration API for page
extensions
> +++ b/mm/page_ext.c
> @@ -507,6 +507,19 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat)
>
> #endif
>
> +/**
> + * page_ext_lookup() - Lookup a page extension for a PFN.
> + * @pfn: PFN of the page we're interested in.
> + *
> + * Must be called with RCU read lock taken and @pfn must be valid.
> + *
> + * Return: NULL if no page_ext exists for this page.
> + */
> +struct page_ext *page_ext_lookup(unsigned long pfn)
> +{
> + return lookup_page_ext(pfn_to_page(pfn));
> +}
> +
> /**
> * page_ext_get() - Get the extended information for a page.
> * @page: The page we're interested in.
As discussed offline, getting rid of lookup_page_ext() can be done later
as a cleanup.
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists