Re: [PATCH v4 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory

From: Aneesh Kumar K V
Date: Wed Oct 04 2023 - 01:16:40 EST


On 10/4/23 5:18 AM, Verma, Vishal L wrote:
> On Tue, 2023-10-03 at 09:34 +0530, Aneesh Kumar K V wrote:
>> On 9/29/23 2:00 AM, Vishal Verma wrote:
>>> Large amounts of memory managed by the kmem driver may come in via CXL,
>>> and it is often desirable to have the memmap for this memory on the new
>>> memory itself.
>>>
>>> Enroll kmem-managed memory for memmap_on_memory semantics if the dax
>>> region originates via CXL. For non-CXL dax regions, retain the existing
>>> default behavior of hot adding without memmap_on_memory semantics.
>>>
>>
>> Are we not looking at doing altmap space for CXL DAX regions? Last discussion around
>> this was suggesting we look at doing this via altmap reservation so that
>> we get contigous space for device memory enabling us to map them
>> via 1G direct mapping entries?
>>
> Hey Aneesh - was this on a previous posting or something - do you have
> a link so I can refresh myself on what the discussion was?
>
> If it is enabling something in CXL similar to the --map=mem mode for
> pmem + device dax, that could be incremental to this.

Yes. Agree that we can do that incremental to this.

https://lore.kernel.org/linux-mm/b6753402-2de9-25b2-36e9-eacd49752b19@xxxxxxxxxx

-aneesh