From: Hannes Reinecke <hare@suse.de>
To: Ping Gan <jacky_gam_2001@163.com>,
sagi@grimberg.me, hch@lst.de, kch@nvidia.com,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: ping.gan@dell.com
Subject: Re: [PATCH 1/2] nvmet-tcp: add unbound_wq support for nvmet-tcp
Date: Wed, 17 Jul 2024 10:20:24 +0200 [thread overview]
Message-ID: <0c4c4365-2c2b-4985-bbb1-5d58bf332671@suse.de> (raw)
In-Reply-To: <20240717075208.87324-2-jacky_gam_2001@163.com>
On 7/17/24 09:52, Ping Gan wrote:
> To define a module parameter use_unbound_wq to enable unbound
> workqueue to handle TCP's IO.
>
> Signed-off-by: jackygam2001 <jacky_gam_2001@163.com>
Please use your real name 'Ping Gan' as the author name, not the mail alias.
> ---
> 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;
>
Otherwise looks good.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2024-07-17 8:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 7:52 [PATCH 0/2] nvmet: support unbound_wq for RDMA and TCP Ping Gan
2024-07-17 7:52 ` [PATCH 1/2] nvmet-tcp: add unbound_wq support for nvmet-tcp Ping Gan
2024-07-17 8:20 ` Hannes Reinecke [this message]
2024-07-17 8:52 ` Ping Gan
2024-07-17 7:52 ` [PATCH 2/2] nvmet-rdma: add unbound_wq support for nvmet-rdma Ping Gan
2024-07-17 8:21 ` Hannes Reinecke
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=0c4c4365-2c2b-4985-bbb1-5d58bf332671@suse.de \
--to=hare@suse.de \
--cc=hch@lst.de \
--cc=jacky_gam_2001@163.com \
--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
all inboxes | Powered by JetHome®