memblock: introduce MEMBLOCK_RSRV_NOINIT flag
authorUsama Arif <usama.arif@bytedance.com>
Wed, 13 Sep 2023 10:54:00 +0000 (11:54 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:30 +0000 (10:32 -0700)
commit77e6c43e137c130138c3fbadc847351a83c4befe
treed93ff3743c36fee1c6a060df4cfa1600f1de92d9
parentee8d2071ef52d83a2ac4f8a474fafb2aea91766d
memblock: introduce MEMBLOCK_RSRV_NOINIT flag

For reserved memory regions marked with this flag, reserve_bootmem_region
is not called during memmap_init_reserved_pages.  This can be used to
avoid struct page initialization for regions which won't need them, for
e.g.  hugepages with Hugepage Vmemmap Optimization enabled.

Link: https://lkml.kernel.org/r/20230913105401.519709-4-usama.arif@bytedance.com
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Fam Zheng <fam.zheng@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memblock.h
mm/memblock.c