Skip to contentSkip to conversation

nvme-pci: do not set the NUMA node of device if it has none

PATCH In review Pratyush Yadav 2 participants 2 messages Sep 12, 2023 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nvme-pci: do not set the NUMA node of device if it has none

If a device has no NUMA node information associated with it, the driver puts the device in node first_memory_node (say node 0). Not having a NUMA node and being associated with node 0 are completely different things and it makes little sense to mix the two.

---

Changes in v2:
- Re-worded the commit message.

 drivers/nvme/host/pci.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/nvme/host/pci.c +0 -3
index 2f57da12d983..347cb5daebc3 100644
@@ -2916,9 +2916,6 @@ static struct nvme_dev *nvme_pci_alloc_dev(struct pci_dev *pdev,
 	struct nvme_dev *dev;
 	int ret = -ENOMEM;
 
-	if (node == NUMA_NO_NODE)
-		set_dev_node(&pdev->dev, first_memory_node);
-
 	dev = kzalloc_node(sizeof(*dev), GFP_KERNEL, node);
 	if (!dev)
 		return ERR_PTR(-ENOMEM);
Signature · 1 line
2.40.1
maintainer
#1 lore raw
Quoted 4 lines · Pratyush Yadav

If a device has no NUMA node information associated with it, the driver puts the device in node first_memory_node (say node 0). Not having a NUMA node and being associated with node 0 are completely different things and it makes little sense to mix the two.

Applied for nvme-6.6. This overall makes sense, though I hope the patch isn't just to work around xen's incompatibility with managed irqs :)