Re: [PATCH v13 4/9] mm/demotion/dax/kmem: Set node's abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE
From: Huang, Ying
Date: Tue Aug 09 2022 - 21:10:20 EST
Aneesh Kumar K V <aneesh.kumar@xxxxxxxxxxxxx> writes:
> On 8/9/22 8:34 AM, Huang, Ying wrote:
>> "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxx> writes:
>>
>>> By default, all nodes are assigned to the default memory tier which
>>> is the memory tier designated for nodes with DRAM
>>>
>>> Set dax kmem device node's tier to slower memory tier by assigning
>>> abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE. Low-level drivers
>>> like papr_scm or ACPI NFIT can initialize memory device type to a
>>> more accurate value based on device tree details or HMAT.
>>
>> I don't know how ACPI NFIT can help here. Can you teach me?
>>
>> Per my understanding, we may use the information provided by ACPI SLIT
>> or HMAT (or device tree via papr_scm) to create memory types. Before
>> that is implemented, we just create a memory type with default abstract
>> distance.
>>
>
> My idea is to use ACPI NFIT driver that creates a persistent memory region
> (nvdimm_region_create) to also create memory type and assign that to the
> NUMA node mapping that region. For now NFIT driver manages all the persistent
> memory region/DIMM creation (drivers/acpi/nfit/core.c). It can also do the
> memory type creation using other ACPI information like SLIT/HMAT etc. Similarly
> CXL driver can do the same using CDAT.
I still think that it's better to create memory types in dax/kmem.c and
CXL driver. But we can discuss further on that later.
Best Regards,
Huang, Ying