* [PATCH 2/5 v2] nvme-pci: override the value of the controller's numa node
2020-06-16 9:34 [PATCH 1/5 v2] nvme: set initial value for controller's numa node Max Gurtovoy
@ 2020-06-16 9:34 ` Max Gurtovoy
2020-06-16 9:34 ` [PATCH 3/5 v2] nvme-pci: initialize tagset numa value to the value of the ctrl Max Gurtovoy
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Max Gurtovoy @ 2020-06-16 9:34 UTC (permalink / raw)
To: sagi, linux-nvme, kbusch, hch, james.smart; +Cc: Max Gurtovoy, israelr, shlomin
Set the node value according to the PCI device numa node.
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
drivers/nvme/host/pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e2bacd3..46dc530 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -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;
--
1.8.3.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/5 v2] nvme-pci: initialize tagset numa value to the value of the ctrl
2020-06-16 9:34 [PATCH 1/5 v2] nvme: set initial value for controller's numa node Max Gurtovoy
2020-06-16 9:34 ` [PATCH 2/5 v2] nvme-pci: override the value of the " Max Gurtovoy
@ 2020-06-16 9:34 ` Max Gurtovoy
2020-06-16 9:34 ` [PATCH 4/5 v2] nvme-tcp: " Max Gurtovoy
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Max Gurtovoy @ 2020-06-16 9:34 UTC (permalink / raw)
To: sagi, linux-nvme, kbusch, hch, james.smart; +Cc: Max Gurtovoy, israelr, shlomin
Both admin's and drive's tagsets should be set according the numa node
of the controller.
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
drivers/nvme/host/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 46dc530..b1d18f0 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -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);
--
1.8.3.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5 v2] nvme-tcp: initialize tagset numa value to the value of the ctrl
2020-06-16 9:34 [PATCH 1/5 v2] nvme: set initial value for controller's numa node Max Gurtovoy
2020-06-16 9:34 ` [PATCH 2/5 v2] nvme-pci: override the value of the " Max Gurtovoy
2020-06-16 9:34 ` [PATCH 3/5 v2] nvme-pci: initialize tagset numa value to the value of the ctrl Max Gurtovoy
@ 2020-06-16 9:34 ` Max Gurtovoy
2020-06-16 9:34 ` [PATCH 5/5 v2] nvme-loop: " Max Gurtovoy
2020-06-17 8:06 ` [PATCH 1/5 v2] nvme: set initial value for controller's numa node Christoph Hellwig
4 siblings, 0 replies; 6+ messages in thread
From: Max Gurtovoy @ 2020-06-16 9:34 UTC (permalink / raw)
To: sagi, linux-nvme, kbusch, hch, james.smart; +Cc: Max Gurtovoy, israelr, shlomin
Both admin's and drive's tagsets should be set according the numa
node of the controller.
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
drivers/nvme/host/tcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 3345ec7..79ef2b8 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -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;
--
1.8.3.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5 v2] nvme-loop: initialize tagset numa value to the value of the ctrl
2020-06-16 9:34 [PATCH 1/5 v2] nvme: set initial value for controller's numa node Max Gurtovoy
` (2 preceding siblings ...)
2020-06-16 9:34 ` [PATCH 4/5 v2] nvme-tcp: " Max Gurtovoy
@ 2020-06-16 9:34 ` Max Gurtovoy
2020-06-17 8:06 ` [PATCH 1/5 v2] nvme: set initial value for controller's numa node Christoph Hellwig
4 siblings, 0 replies; 6+ messages in thread
From: Max Gurtovoy @ 2020-06-16 9:34 UTC (permalink / raw)
To: sagi, linux-nvme, kbusch, hch, james.smart; +Cc: Max Gurtovoy, israelr, shlomin
Both admin's and drive's tagsets should be set according the numa
node of the controller.
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
drivers/nvme/target/loop.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 0d54e73..6344e73 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -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);
--
1.8.3.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5 v2] nvme: set initial value for controller's numa node
2020-06-16 9:34 [PATCH 1/5 v2] nvme: set initial value for controller's numa node Max Gurtovoy
` (3 preceding siblings ...)
2020-06-16 9:34 ` [PATCH 5/5 v2] nvme-loop: " Max Gurtovoy
@ 2020-06-17 8:06 ` Christoph Hellwig
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2020-06-17 8:06 UTC (permalink / raw)
To: Max Gurtovoy; +Cc: sagi, israelr, james.smart, linux-nvme, shlomin, kbusch, hch
Thanks,
applied the series to nvme-5.8.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread