[PATCH V2] arm64/mm/hotplug: Warn when memory limit has been reduced

David Hildenbrand david at redhat.com
Mon Jan 3 01:55:36 PST 2022


On 03.01.22 07:21, Anshuman Khandual wrote:
> If the max memory limit has been reduced with 'mem=' kernel command line
> option, there might be UEFI memory map described memory beyond that limit
> which could be hot removed. This might be problematic for subsequent kexec
> kernel which could just access such removed memory.
> 
> Memory offline notifier exists because there is no other way to block the
> removal of boot memory, only the offlining (which isn't actually a problem)
> But with 'mem=', there is no chance to stop such boot memory being offlined
> as it where never in use by the kernel. As 'mem=' is a debug only option on
> arm64 platform, just warn for such a situation and move on.
> 

Hi,

but why warn on the offlining path?

IIUC, you'd have a layout like


[ boot memory ][ unused memory ]
               ^memory_limit

Let's assume "unused memory" corresponds to exactly one DIMM that can
get hotunplugged. The complete DIMM isn't added to Linux and not online,
so the offline notifier will never trigger.

Via which mechanism would the unplug of that memory happen? On arm64,
this should only be possible via ACPI, when unplugging a DIMM that was
available since boot.

But won't acpi_memory_enable_device() try adding that memory while
ignoring the memory limit? And adding should work, no?

Can you share some details on how to trigger this on arm64?

-- 
Thanks,

David / dhildenb




More information about the linux-arm-kernel mailing list