[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c4c4365-2c2b-4985-bbb1-5d58bf332671@suse.de>
Date: Wed, 17 Jul 2024 10:20:24 +0200
From: Hannes Reinecke <hare@...e.de>
To: Ping Gan <jacky_gam_2001@....com>, sagi@...mberg.me, hch@....de,
kch@...dia.com, linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: ping.gan@...l.com
Subject: Re: [PATCH 1/2] nvmet-tcp: add unbound_wq support for nvmet-tcp
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@....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@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.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
Powered by blists - more mailing lists