Thread (23 messages) 23 messages, 4 authors, 2023-06-21

[PATCH 09/16] mm/vmemmap: Allow architectures to override how vmemmap optimization works

From: Aneesh Kumar K.V <hidden>
Date: 2023-06-06 05:05:25
Subsystem: memory management, memory management - core, the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

Architectures like powerpc will like to use different page table allocators and
mapping mechanisms to implement vmemmap optimization. Similar to
vmemmap_populate allow architectures to implement vmemap_populate_compound_pages

Signed-off-by: Aneesh Kumar K.V <redacted>
---
 mm/sparse-vmemmap.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 10d73a0dfcec..0b83706c08fd 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -141,6 +141,7 @@ void __meminit vmemmap_verify(pte_t *pte, int node,
 			start, end - 1);
 }
 
+#ifndef vmemmap_populate_compound_pages
 pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node,
 				       struct vmem_altmap *altmap,
 				       struct page *reuse)
@@ -446,6 +447,8 @@ static int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
 	return 0;
 }
 
+#endif
+
 struct page * __meminit __populate_section_memmap(unsigned long pfn,
 		unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
 		struct dev_pagemap *pgmap)
-- 
2.40.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help