[PATCH v2 1/4] mm: page_ext: make lookup_page_ext() public

Luiz Capitulino posted 4 patches 11 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 1/4] mm: page_ext: make lookup_page_ext() public
Posted by Luiz Capitulino 11 months, 3 weeks ago
The next commit will use it.

Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
---
 include/linux/page_ext.h | 1 +
 mm/page_ext.c            | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index e4b48a0dda244..d6fb891c51d1d 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -79,6 +79,7 @@ static inline void page_ext_init(void)
 
 extern struct page_ext *page_ext_get(const struct page *page);
 extern void page_ext_put(struct page_ext *page_ext);
+extern struct page_ext *lookup_page_ext(const struct page *page);
 
 static inline void *page_ext_data(struct page_ext *page_ext,
 				  struct page_ext_operations *ops)
diff --git a/mm/page_ext.c b/mm/page_ext.c
index 641d93f6af4c1..23ad30597c05c 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -165,7 +165,7 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat)
 	pgdat->node_page_ext = NULL;
 }
 
-static struct page_ext *lookup_page_ext(const struct page *page)
+struct page_ext *lookup_page_ext(const struct page *page)
 {
 	unsigned long pfn = page_to_pfn(page);
 	unsigned long index;
@@ -245,7 +245,7 @@ static bool page_ext_invalid(struct page_ext *page_ext)
 	return !page_ext || (((unsigned long)page_ext & PAGE_EXT_INVALID) == PAGE_EXT_INVALID);
 }
 
-static struct page_ext *lookup_page_ext(const struct page *page)
+struct page_ext *lookup_page_ext(const struct page *page)
 {
 	unsigned long pfn = page_to_pfn(page);
 	struct mem_section *section = __pfn_to_section(pfn);
-- 
2.48.1
Re: [PATCH v2 1/4] mm: page_ext: make lookup_page_ext() public
Posted by David Hildenbrand 11 months, 2 weeks ago
On 24.02.25 22:59, Luiz Capitulino wrote:
> The next commit will use it.

This should likely be squashed into the next patch, where people also 
have the context why this is required.


-- 
Cheers,

David / dhildenb
Re: [PATCH v2 1/4] mm: page_ext: make lookup_page_ext() public
Posted by Luiz Capitulino 11 months, 2 weeks ago
On 2025-02-25 11:38, David Hildenbrand wrote:
> On 24.02.25 22:59, Luiz Capitulino wrote:
>> The next commit will use it.
> 
> This should likely be squashed into the next patch, where people also have the context why this is required.

Would you mind if I only squash it if I'm required to send v3?
Re: [PATCH v2 1/4] mm: page_ext: make lookup_page_ext() public
Posted by David Hildenbrand 11 months, 2 weeks ago
On 25.02.25 23:29, Luiz Capitulino wrote:
> On 2025-02-25 11:38, David Hildenbrand wrote:
>> On 24.02.25 22:59, Luiz Capitulino wrote:
>>> The next commit will use it.
>>
>> This should likely be squashed into the next patch, where people also have the context why this is required.
> 
> Would you mind if I only squash it if I'm required to send v3?

Sure, likely Andrew could also just squash them in his tree.

-- 
Cheers,

David / dhildenb