[RFC] arm64: mm: update max_pfn after memory hotplug

Chris Goldsworthy quic_cgoldswo at quicinc.com
Fri Sep 24 13:52:58 PDT 2021


Thanks for the response David.

On Fri, Sep 24, 2021 at 10:17:46AM +0200, David Hildenbrand wrote:
> no-map means that no direct mapping is to be created, right? We would still
> have a memmap IIRC, and the pages are PG_reserved.
> 
> Again, I think this is very similar to just having no-map regions like
> random memory holes within the existing memory layout.

For those curious, see __reserved_mem_alloc_size() >
early_init_dt_alloc_reserved_memory_arch() > memblock_mark_nomap() - the
'no-map' attribute is read in __reserved_mem_alloc_size() and the pre-requisite
steps need to have the relevant struct pages marked as PG_reserved 
are taken in memblock_mark_nomap().

> What Chris proposes here is very similar to
> arch/x86/mm/init_64.c:update_end_of_memory_vars() called during
> arch_add_memory()->add_pages() on x86-64.
> 

For other's reference, the patch was derived from what x86 is doing with max_pfn
(such that we also set max_low_pfn as is done in arm64's mm/init.c.



More information about the linux-arm-kernel mailing list