From: Keith Busch <kbusch@meta.com>
To: <linux-nvme@lists.infradead.org>, <james.smart@broadcom.com>
Cc: <sagi@grimberg.me>, <hch@lst.de>, Keith Busch <kbusch@kernel.org>
Subject: [PATCH] nvme-fc: set numa_node after nvme_init_ctrl
Date: Tue, 19 Dec 2023 09:49:34 -0800 [thread overview]
Message-ID: <20231219174934.20400-1-kbusch@meta.com> (raw)
From: Keith Busch <kbusch@kernel.org>
nvme_init_ctrl() always sets ctrl->numa_node to NUMA_NO_NODE. Set the
desired value after that function call so it won't be overwritten.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/fc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 9f9a3b35dc64d..2de506d58593b 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3509,10 +3509,6 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
ctrl->ctrl.opts = opts;
ctrl->ctrl.nr_reconnects = 0;
- if (lport->dev)
- ctrl->ctrl.numa_node = dev_to_node(lport->dev);
- else
- ctrl->ctrl.numa_node = NUMA_NO_NODE;
INIT_LIST_HEAD(&ctrl->ctrl_list);
ctrl->lport = lport;
ctrl->rport = rport;
@@ -3558,6 +3554,11 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
if (ret)
goto out_free_queues;
+ if (lport->dev)
+ ctrl->ctrl.numa_node = dev_to_node(lport->dev);
+ else
+ ctrl->ctrl.numa_node = NUMA_NO_NODE;
+
/* at this point, teardown path changes to ref counting on nvme ctrl */
ret = nvme_alloc_admin_tag_set(&ctrl->ctrl, &ctrl->admin_tag_set,
--
2.34.1
next reply other threads:[~2023-12-19 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 17:49 Keith Busch [this message]
2023-12-19 20:31 ` [PATCH] nvme-fc: set numa_node after nvme_init_ctrl Sagi Grimberg
2023-12-20 3:15 ` Jens Axboe
2023-12-20 6:37 ` Christoph Hellwig
2023-12-20 13:43 ` Max Gurtovoy
2023-12-21 17:21 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231219174934.20400-1-kbusch@meta.com \
--to=kbusch@meta.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox