linux-stable/drivers
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
..
accel accel/ivpu: Use cached buffers for FW loading 2023-09-27 07:40:43 +02:00
accessibility
acpi acpi, hmat: calculate abstract distance with HMAT 2023-10-16 15:44:39 -07:00
amba
android binder: dynamically allocate the android-binder shrinker 2023-10-04 10:32:23 -07:00
ata ATA fixes for 6.6-rc4 2023-09-29 13:38:34 -07:00
atm
auxdisplay
base
bcma
block rbd: take header_rwsem in rbd_dev_refresh() only when updating 2023-09-26 10:33:19 +02:00
bluetooth
bus
cache
cdrom
cdx
char
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl cxl/acpi: Annotate struct cxl_cxims_data with __counted_by 2023-09-22 14:31:04 -07:00
dax dax, kmem: calculate abstract distance with general interface 2023-10-16 15:44:39 -07:00
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire scsi: sd: Differentiate system and runtime start/stop management 2023-09-28 21:23:00 +09:00
firmware efi/unaccepted: do not let /proc/vmcore try to access unaccepted memory 2023-10-04 10:32:22 -07:00
fpga
fsi
gnss
gpio gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip 2023-09-27 09:12:09 +02:00
gpu drm/panfrost: dynamically allocate the drm-panfrost shrinker 2023-10-04 10:32:25 -07:00
greybus
hid
hsi
hte
hv
hwmon hwmon: (nct6775) Fix non-existent ALARM warning 2023-09-18 11:52:18 -07:00
hwspinlock
hwtracing
i2c i2c: npcm7xx: Fix callback completion ordering 2023-09-27 21:32:06 +02:00
i3c
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip irqchip: irq-xtensa-mx: include header for missing prototype 2023-09-20 05:03:20 -07:00
isdn
leds
macintosh
mailbox
mcb
md mm: shrinker: convert shrinker_rwsem to mutex 2023-10-04 10:32:26 -07:00
media media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call 2023-09-19 09:03:21 +02:00
memory
memstick
message
mfd mfd: cs42l43: Use correct macro for new-style PM runtime ops 2023-09-23 11:10:23 -07:00
misc vmw_balloon: dynamically allocate the vmw-balloon shrinker 2023-10-04 10:32:25 -07:00
mmc
most
mtd
mux
net sfc: handle error pointers returned by rhashtable_lookup_get_insert_fast() 2023-09-21 10:37:16 +02:00
nfc
ntb
nubus
nvdimm
nvme nvme fixes for Linux 6.6 2023-09-14 16:20:31 -06:00
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf
phy
pinctrl
platform platform/x86: thinkpad_acpi: Take mutex in hotkey_resume 2023-09-18 15:16:19 +02:00
pmdomain
pnp
power power: supply: rk817: Fix node refcount leak 2023-09-20 19:37:15 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi ATA fixes for 6.6-rc4 2023-09-29 13:38:34 -07:00
sh
siox
slimbus
soc soc: loongson: loongson2_guts: Remove unneeded semicolon 2023-09-27 11:05:47 +02:00
soundwire
spi spi: spi-gxp: BUG: Correct spi write return value 2023-09-27 17:06:36 +02:00
spmi
ssb
staging
target
tc
tee
thermal thermal: sysfs: Fix trip_point_hyst_store() 2023-09-18 13:13:05 +02:00
thunderbolt
tty Revert "tty: n_gsm: fix UAF in gsm_cleanup_mux" 2023-09-18 10:12:11 +02:00
ufs
uio
usb
vdpa
vfio vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-09-22 12:48:04 -06:00
vhost
video fbdev/sh7760fb: Depend on FB=y 2023-09-21 10:33:49 +02:00
virt
virtio virtio_balloon: dynamically allocate the virtio-balloon shrinker 2023-10-04 10:32:25 -07:00
vlynq
w1
watchdog
xen xenbus/backend: dynamically allocate the xen-backend shrinker 2023-10-04 10:32:23 -07:00
zorro
Kconfig
Makefile