linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Luiz Capitulino <luizcap@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	yuzhao@google.com, pasha.tatashin@soleen.com
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, muchun.song@linux.dev
Subject: Re: [PATCH v3 1/3] mm: page_ext: add an iteration API for page extensions
Date: Fri, 7 Mar 2025 09:10:53 +0100	[thread overview]
Message-ID: <264e859c-820f-4001-b5b7-d4011fcbc192@redhat.com> (raw)
In-Reply-To: <a45893880b7e1601082d39d2c5c8b50bcc096305.1741301089.git.luizcap@redhat.com>


> +++ 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@redhat.com>

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2025-03-07  8:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 22:44 [PATCH v3 0/3] mm: page_ext: Introduce new iteration API Luiz Capitulino
2025-03-06 22:44 ` [PATCH v3 1/3] mm: page_ext: add an iteration API for page extensions Luiz Capitulino
2025-03-07  8:10   ` David Hildenbrand [this message]
2025-03-06 22:44 ` [PATCH v3 2/3] mm: page_table_check: use new iteration API Luiz Capitulino
2025-03-06 22:44 ` [PATCH v3 3/3] mm: page_owner: " Luiz Capitulino
2025-03-07  8:13   ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=264e859c-820f-4001-b5b7-d4011fcbc192@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luizcap@redhat.com \
    --cc=muchun.song@linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=yuzhao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox