[merged mm-stable] x86-mm-stop-marking-vmemmap-as-section_info.patch removed from -mm tree
Andrew Morton <[email protected]> Tue, 04 Aug 2026 19:24:13 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: x86/mm: stop marking vmemmap as SECTION_INFO
has been removed from the -mm tree. Its filename was
x86-mm-stop-marking-vmemmap-as-section_info.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "David Hildenbrand (Arm)" <[email protected]>
Subject: x86/mm: stop marking vmemmap as SECTION_INFO
Date: Thu, 16 Jul 2026 16:51:04 +0200
We added the whole bootmem registration machinery in commit 04753278769f
("memory hotplug: register section/node id to free").
The main use case was to remember to which memory section memmap pages
belonged, so the memmap could be handled accordingly when freeing memory.
However, all that machinery is not required anymore: a memory section can
only get offlined if *all* pages can get offlined; and it can only get
unplugged once offline. If some of these pages are unmovable memmap
pages: bad luck, doesn't work. Offlining will fail.
Further, a lot of this machinery was required for pre-vmemmap support.
Now we only support the vmemmap with memory hotplug.
So the whole machinery is useless today. Let's start by removing the last
pieces by first stopping to mark vmemmap pages as SECTION_INFO. In
free_vmemmap_pages(), we can now always just free the reserved pages
directly.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: David Hildenbrand (Arm) <[email protected]>
Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Alexander Gordeev <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: "Borislav Petkov (AMD)" <[email protected]>
Cc: Brendan Jackman <[email protected]>
Cc: Brendan Jackman <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Gerald Schaefer <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Sven Schnelle <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Zi Yan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
arch/x86/mm/init_64.c | 30 ++++--------------------------
1 file changed, 4 insertions(+), 26 deletions(-)
--- a/arch/x86/mm/init_64.c~x86-mm-stop-marking-vmemmap-as-section_info
+++ a/arch/x86/mm/init_64.c
@@ -1024,19 +1024,12 @@ static void __meminit free_vmemmap_pages
{
unsigned long nr_pages = 1u << order;
- if (altmap) {
+ if (altmap)
vmem_altmap_free(altmap, nr_pages);
- } else if (PageReserved(page)) {
- if (IS_ENABLED(CONFIG_HAVE_BOOTMEM_INFO_NODE) &&
- bootmem_type(page) == SECTION_INFO) {
- while (nr_pages--)
- put_page_bootmem(page++);
- } else {
- free_reserved_pages(page, order);
- }
- } else {
+ else if (PageReserved(page))
+ free_reserved_pages(page, order);
+ else
__free_pages(page, order);
- }
}
static void __meminit free_pte_table(pte_t *pte_start, pmd_t *pmd)
@@ -1593,12 +1586,8 @@ void register_page_bootmem_memmap(unsign
p4d_t *p4d;
pud_t *pud;
pmd_t *pmd;
- unsigned int nr_pmd_pages;
- struct page *page;
for (; addr < end; addr = next) {
- pte_t *pte = NULL;
-
pgd = pgd_offset_k(addr);
if (pgd_none(*pgd)) {
next = (addr + PAGE_SIZE) & PAGE_MASK;
@@ -1630,19 +1619,8 @@ void register_page_bootmem_memmap(unsign
next = (addr + PAGE_SIZE) & PAGE_MASK;
get_page_bootmem(section_nr, pmd_page(*pmd),
MIX_SECTION_INFO);
-
- pte = pte_offset_kernel(pmd, addr);
- if (pte_none(*pte))
- continue;
- get_page_bootmem(section_nr, pte_page(*pte),
- SECTION_INFO);
} else {
next = pmd_addr_end(addr, end);
- nr_pmd_pages = (next - addr) >> PAGE_SHIFT;
- page = pmd_page(*pmd);
- while (nr_pmd_pages--)
- get_page_bootmem(section_nr, page++,
- SECTION_INFO);
}
}
}
_
Patches currently in -mm which might be from [email protected] are
mm-standardize-printing-for-pgtable-entries.patch
mm-gup-fix-always-draining-lru-caches-in-collect_longterm_unpinnable_folios.patch