linux-stable/drivers/dax
Huang Ying 6bc2cfdf82 dax, kmem: calculate abstract distance with general interface
Previously, a fixed abstract distance MEMTIER_DEFAULT_DAX_ADISTANCE is
used for slow memory type in kmem driver.  This limits the usage of kmem
driver, for example, it cannot be used for HBM (high bandwidth memory).

So, we use the general abstract distance calculation mechanism in kmem
drivers to get more accurate abstract distance on systems with proper
support.  The original MEMTIER_DEFAULT_DAX_ADISTANCE is used as fallback
only.

Now, multiple memory types may be managed by kmem.  These memory types are
put into the "kmem_memory_types" list and protected by
kmem_memory_type_lock.

Link: https://lkml.kernel.org/r/20230926060628.265989-5-ying.huang@intel.com
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Tested-by: Bharata B Rao <bharata@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Rafael J Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-10-16 15:44:39 -07:00
..
hmem dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
pmem dax: Kill DEV_DAX_PMEM_COMPAT 2021-11-24 19:21:35 -08:00
bus.c dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
bus.h dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
cxl.c dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
dax-private.h dax: Introduce alloc_dev_dax_id() 2023-06-23 01:03:50 -06:00
device.c mm: remove enum page_entry_size 2023-08-24 16:20:30 -07:00
Kconfig cxl for v6.3 2023-02-25 09:19:23 -08:00
kmem.c dax, kmem: calculate abstract distance with general interface 2023-10-16 15:44:39 -07:00
Makefile cxl/dax: Create dax devices for CXL RAM regions 2023-02-10 17:33:45 -08:00
pmem.c dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
super.c dax: enable dax fault handler to report VM_FAULT_HWPOISON 2023-06-26 07:54:23 -06:00