From: Ping Gan <jacky_gam_2001@163.com>
To: hare@suse.de, sagi@grimberg.me, hch@lst.de, kch@nvidia.com,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: ping.gan@dell.com, Ping Gan <jacky_gam_2001@163.com>
Subject: [PATCH v2 1/2] nvmet-tcp: add unbound_wq support for nvmet-tcp
Date: Wed, 17 Jul 2024 17:14:50 +0800 [thread overview]
Message-ID: <20240717091451.111158-2-jacky_gam_2001@163.com> (raw)
In-Reply-To: <20240717091451.111158-1-jacky_gam_2001@163.com>
To define a module parameter use_unbound_wq to enable unbound
workqueue to handle TCP's IO.
Signed-off-by: Ping Gan <jacky_gam_2001@163.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
drivers/nvme/target/tcp.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 5bff0d5464d1..f71d56843e1a 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -73,6 +73,10 @@ device_param_cb(idle_poll_period_usecs, &set_param_ops,
MODULE_PARM_DESC(idle_poll_period_usecs,
"nvmet tcp io_work poll till idle time period in usecs: Default 0");
+static bool use_unbound_wq;
+module_param(use_unbound_wq, bool, 0444);
+MODULE_PARM_DESC(use_unbound_wq, "use unbound workqueue to handle IO request: Default false");
+
#ifdef CONFIG_NVME_TARGET_TCP_TLS
/*
* TLS handshake timeout
@@ -2196,9 +2200,13 @@ static const struct nvmet_fabrics_ops nvmet_tcp_ops = {
static int __init nvmet_tcp_init(void)
{
int ret;
+ unsigned int flags;
+
+ flags = WQ_MEM_RECLAIM | WQ_HIGHPRI;
+ if (use_unbound_wq)
+ flags |= (WQ_UNBOUND | WQ_SYSFS);
- nvmet_tcp_wq = alloc_workqueue("nvmet_tcp_wq",
- WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
+ nvmet_tcp_wq = alloc_workqueue("nvmet_tcp_wq", flags, 0);
if (!nvmet_tcp_wq)
return -ENOMEM;
--
2.26.2
next prev parent reply other threads:[~2024-07-17 9:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 9:14 [PATCH v2 0/2] nvmet: support unbound_wq for RDMA and TCP Ping Gan
2024-07-17 9:14 ` Ping Gan [this message]
2024-07-17 20:28 ` [PATCH v2 1/2] nvmet-tcp: add unbound_wq support for nvmet-tcp Sagi Grimberg
2024-07-17 9:14 ` [PATCH v2 2/2] nvmet-rdma: add unbound_wq support for nvmet-rdma Ping Gan
2024-07-17 20:29 ` Sagi Grimberg
2024-07-19 5:31 ` [PATCH v2 0/2] nvmet: support unbound_wq for RDMA and TCP Christoph Hellwig
2024-07-19 6:28 ` Hannes Reinecke
2024-07-19 8:07 ` Ping Gan
2024-07-19 8:26 ` Hannes Reinecke
2024-07-19 8:49 ` Ping Gan
2024-07-21 11:11 ` Sagi Grimberg
2024-07-21 11:09 ` Sagi Grimberg
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=20240717091451.111158-2-jacky_gam_2001@163.com \
--to=jacky_gam_2001@163.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ping.gan@dell.com \
--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