nvme: set initial value for controller's numa node
Subsystems (2)
PATCH v2 1/5 nvme: set initial value for controller's numa node
Initialize the node to NUMA_NO_NODE value. Transports that are aware of numa node affinity can override it (e.g. RDMA transport set the affinity according to the RDMA HCA).
--- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +1 -0
@@ -4174,6 +4174,7 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev, ctrl->dev = dev; ctrl->ops = ops; ctrl->quirks = quirks; + ctrl->numa_node =NUMA_NO_NODE ;INIT_WORK (&ctrl->scan_work, nvme_scan_work);INIT_WORK (&ctrl->async_event_work, nvme_async_event_work);INIT_WORK (&ctrl->fw_act_work, nvme_fw_act_work);
Signature · 7 lines
1.8.3.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH v2 2/5 nvme-pci: override the value of the controller's numa node
Set the node value according to the PCI device numa node.
--- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/host/pci.c +2 -0
@@ -1669,6 +1669,8 @@ static int nvme_pci_configure_admin_queue(struct nvme_dev *dev)if (result)return result; + dev->ctrl.numa_node =dev_to_node (dev->dev); + nvmeq = &dev->queues[0 ]; aqa = nvmeq->q_depth -1 ; aqa |= aqa <<16 ;
Signature · 7 lines
1.8.3.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH v2 3/5 nvme-pci: initialize tagset numa value to the value of the ctrl
In reply to Max GurtovoyBoth admin's and drive's tagsets should be set according the numa node of the controller.
--- drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/pci.c +2 -2
@@ -1593,7 +1593,7 @@ static int nvme_alloc_admin_tags(struct nvme_dev *dev) dev->admin_tagset.queue_depth =NVME_AQ_MQ_TAG_DEPTH ; dev->admin_tagset.timeout =ADMIN_TIMEOUT ; - dev->admin_tagset.numa_node =dev_to_node (dev->dev); + dev->admin_tagset.numa_node = dev->ctrl.numa_node; dev->admin_tagset.cmd_size =sizeof (struct nvme_iod ); dev->admin_tagset.flags =BLK_MQ_F_NO_SCHED ; dev->admin_tagset.driver_data = dev;
@@ -2259,7 +2259,7 @@ static void nvme_dev_add(struct nvme_dev *dev)if (dev->io_queues[HCTX_TYPE_POLL ]) dev->tagset.nr_maps++; dev->tagset.timeout =NVME_IO_TIMEOUT ; - dev->tagset.numa_node =dev_to_node (dev->dev); + dev->tagset.numa_node = dev->ctrl.numa_node; dev->tagset.queue_depth =min_t (int, dev->q_depth,BLK_MQ_MAX_DEPTH ) -1 ; dev->tagset.cmd_size =sizeof (struct nvme_iod );
Signature · 7 lines
1.8.3.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH v2 4/5 nvme-tcp: initialize tagset numa value to the value of the ctrl
In reply to Max GurtovoyBoth admin's and drive's tagsets should be set according the numa node of the controller.
--- drivers/nvme/host/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/tcp.c +2 -2
@@ -1532,7 +1532,7 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl, set->ops = &nvme_tcp_admin_mq_ops; set->queue_depth =NVME_AQ_MQ_TAG_DEPTH ; set->reserved_tags =2 ;/* connect + keep-alive */ - set->numa_node =NUMA_NO_NODE ; + set->numa_node = nctrl->numa_node; set->flags =BLK_MQ_F_BLOCKING ; set->cmd_size =sizeof (struct nvme_tcp_request ); set->driver_data = ctrl;
@@ -1544,7 +1544,7 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl, set->ops = &nvme_tcp_mq_ops; set->queue_depth = nctrl->sqsize +1 ; set->reserved_tags =1 ;/* fabric connect */ - set->numa_node =NUMA_NO_NODE ; + set->numa_node = nctrl->numa_node; set->flags =BLK_MQ_F_SHOULD_MERGE |BLK_MQ_F_BLOCKING ; set->cmd_size =sizeof (struct nvme_tcp_request ); set->driver_data = ctrl;
Signature · 7 lines
1.8.3.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH v2 5/5 nvme-loop: initialize tagset numa value to the value of the ctrl
In reply to Max GurtovoyBoth admin's and drive's tagsets should be set according the numa node of the controller.
--- drivers/nvme/target/loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/target/loop.c +2 -2
@@ -340,7 +340,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl) ctrl->admin_tag_set.ops = &nvme_loop_admin_mq_ops; ctrl->admin_tag_set.queue_depth =NVME_AQ_MQ_TAG_DEPTH ; ctrl->admin_tag_set.reserved_tags =2 ;/* connect + keep-alive */ - ctrl->admin_tag_set.numa_node =NUMA_NO_NODE ; + ctrl->admin_tag_set.numa_node = ctrl->ctrl.numa_node; ctrl->admin_tag_set.cmd_size =sizeof (struct nvme_loop_iod ) +NVME_INLINE_SG_CNT *sizeof (struct scatterlist ); ctrl->admin_tag_set.driver_data = ctrl;
@@ -512,7 +512,7 @@ static int nvme_loop_create_io_queues(struct nvme_loop_ctrl *ctrl) ctrl->tag_set.ops = &nvme_loop_mq_ops; ctrl->tag_set.queue_depth = ctrl->ctrl.opts->queue_size; ctrl->tag_set.reserved_tags =1 ;/* fabric connect */ - ctrl->tag_set.numa_node =NUMA_NO_NODE ; + ctrl->tag_set.numa_node = ctrl->ctrl.numa_node; ctrl->tag_set.flags =BLK_MQ_F_SHOULD_MERGE ; ctrl->tag_set.cmd_size =sizeof (struct nvme_loop_iod ) +NVME_INLINE_SG_CNT *sizeof (struct scatterlist );
Signature · 7 lines
1.8.3.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Thanks,
applied the series to nvme-5.8.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme