[PATCH v3 6/7] dax/kmem: Always enroll hotplugged memory for memmap_on_memory

David Hildenbrand david at redhat.com
Tue Jul 11 20:21:21 AEST 2023


On 11.07.23 06:48, Aneesh Kumar K.V wrote:
> From: Vishal Verma <vishal.l.verma at intel.com>
> 
> With DAX memory regions originating from CXL memory expanders or
> NVDIMMs, the kmem driver may be hot-adding huge amounts of system memory
> on a system without enough 'regular' main memory to support the memmap
> for it. To avoid this, ensure that all kmem managed hotplugged memory is
> added with the MHP_MEMMAP_ON_MEMORY flag to place the memmap on the
> new memory region being hot added.
> 
> To do this, call add_memory() in chunks of memory_block_size_bytes() as
> that is a requirement for memmap_on_memory.
> 
> Cc: "Rafael J. Wysocki" <rafael at kernel.org>
> Cc: Len Brown <lenb at kernel.org>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: David Hildenbrand <david at redhat.com>
> Cc: Oscar Salvador <osalvador at suse.de>
> Cc: Dan Williams <dan.j.williams at intel.com>
> Cc: Dave Jiang <dave.jiang at intel.com>
> Cc: Dave Hansen <dave.hansen at linux.intel.com>
> Cc: Huang Ying <ying.huang at intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma at intel.com>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.ibm.com>
> ---


See my feedback as reply to the original patch.

-- 
Cheers,

David / dhildenb



More information about the Linuxppc-dev mailing list