On 11.07.23 06:48, Aneesh Kumar K.V wrote:
From: Vishal Verma <vishal.l.ve...@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" <raf...@kernel.org>
Cc: Len Brown <l...@kernel.org>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: David Hildenbrand <da...@redhat.com>
Cc: Oscar Salvador <osalva...@suse.de>
Cc: Dan Williams <dan.j.willi...@intel.com>
Cc: Dave Jiang <dave.ji...@intel.com>
Cc: Dave Hansen <dave.han...@linux.intel.com>
Cc: Huang Ying <ying.hu...@intel.com>
Signed-off-by: Vishal Verma <vishal.l.ve...@intel.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.ibm.com>
---
See my feedback as reply to the original patch.
--
Cheers,
David / dhildenb