Re: [PATCH v4 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-06 Thread David Hildenbrand
On 03.10.23 22:03, Verma, Vishal L wrote: On Mon, 2023-10-02 at 11:28 +0200, David Hildenbrand wrote: + +static int __ref try_remove_memory(u64 start, u64 size) +{ +   int rc, nid = NUMA_NO_NODE; + +   BUG_ON(check_hotplug_memory_range(start, size)); + +   /* +    * All memory

Re: [PATCH v4 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-03 Thread Verma, Vishal L
On Mon, 2023-10-02 at 11:28 +0200, David Hildenbrand wrote: > > > + > > +static int __ref try_remove_memory(u64 start, u64 size) > > +{ > > +   int rc, nid = NUMA_NO_NODE; > > + > > +   BUG_ON(check_hotplug_memory_range(start, size)); > > + > > +   /* > > +    * All memory blocks m

Re: [PATCH v4 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-02 Thread David Hildenbrand
+ +static int __ref try_remove_memory(u64 start, u64 size) +{ + int rc, nid = NUMA_NO_NODE; + + BUG_ON(check_hotplug_memory_range(start, size)); + + /* +* All memory blocks must be offlined before removing memory. Check +* whether all memory blocks in question

[PATCH v4 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-09-28 Thread Vishal Verma
The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to 'memblock_size' chunks of memory being added. Adding a larger span of memory precludes memmap_on_memory semantics. For users of hotplug such as kmem, large amounts of memory might get added from the CXL subsystem. In some cases,