linux-stable/drivers/nvme/host
Nilay Shroff 904a590dab nvme: find numa distance only if controller has valid numa id
[ Upstream commit 863fe60ed2 ]

On system where native nvme multipath is configured and iopolicy
is set to numa but the nvme controller numa node id is undefined
or -1 (NUMA_NO_NODE) then avoid calculating node distance for
finding optimal io path. In such case we may access numa distance
table with invalid index and that may potentially refer to incorrect
memory. So this patch ensures that if the nvme controller numa node
id is -1 then instead of calculating node distance for finding optimal
io path, we set the numa node distance of such controller to default 10
(LOCAL_DISTANCE).

Link: https://lore.kernel.org/all/20240413090614.678353-1-nilay@linux.ibm.com/
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:32:01 +02:00
..
Kconfig
Makefile
core.c nvme-core: check for too small lba shift 2024-01-25 14:37:36 -08:00
fabrics.c
fabrics.h nvme-fabrics: fix state check in nvmf_ctlr_matches_baseopts() 2022-02-08 18:30:35 +01:00
fault_inject.c
fc.c nvme-fc: do not wait in vain when unloading module 2024-03-01 13:16:44 +01:00
fc.h
hwmon.c nvme-hwmon: kmalloc the NVME SMART log buffer 2022-10-30 09:41:17 +01:00
lightnvm.c nvme: split nvme_alloc_request() 2022-06-29 08:59:49 +02:00
multipath.c nvme: find numa distance only if controller has valid numa id 2024-06-16 13:32:01 +02:00
nvme.h nvme: introduce helper function to get ctrl state 2024-01-25 14:37:37 -08:00
pci.c drivers/nvme: Add quirks for device 126f:2262 2024-04-13 12:59:53 +02:00
rdma.c nvme-rdma: do not try to stop unallocated queues 2023-10-25 11:54:25 +02:00
tcp.c nvme-tcp: fix potential unbalanced freeze & unfreeze 2023-08-16 18:21:02 +02:00
trace.c
trace.h Revert "nvme: use command_id instead of req->tag in trace_nvme_complete_rq()" 2024-01-15 18:48:08 +01:00
zns.c