summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPratyush Yadav (Google) <pratyush@kernel.org>2026-08-01 10:48:26 +0200
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-08-04 09:25:55 +0300
commit47a31168f86dc00d075ba925267f1a339840a06b (patch)
treee4c53dc9ba9e64d8e969f0c03491f6db2a12cf99 /scripts
parent01a0dd3d6fb73fa02ff775c9f4d8feff9e8265c0 (diff)
downloadlinux-47a31168f86dc00d075ba925267f1a339840a06b.tar.gz
linux-47a31168f86dc00d075ba925267f1a339840a06b.zip
mm/mm_init: don't rely on memblock to get KHO scratch migratetype
Currently struct page init via memmap_init() or deferred_init_memmap() only queries the migrate type from KHO for each discrete memory range. That works currently since KHO scratch memory has a different memory type so it is always it its own region. An upcoming patch will add support for discovering blocks of memory with no preservations and it will mark it as MEMBLOCK_KHO_SCRATCH to allow allocations from them. This can lead to the bootmem KHO scratch areas to be merged into larger free ranges. This merging breaks the selection of migrate type. Get rid of memblock_is_kho_scratch_memory(). Instead, use kho_scratch_overlap() to decide the migrate type of the PFN. Since kho_scratch_migratetype() only uses KHO functions, move it to kexec_handover.h. Instead of calling kho_scratch_migratetype() once for each free range, call it once for each pageblock. Update pageblock_migratetype_init_range() and memmap_init_range() to do so. Since the migrate type is now evaluated for each pageblock and not each free range, drop the migratetype arguments to deferred_free_pages() and memmap_init_zone_range() and use MIGRATE_MOVABLE directly. Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org> Link: https://patch.msgid.link/20260801084833.1897543-18-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions