From: "D. Wythe" <alibuda@linux.alibaba.com>
To: Karsten Graul <kgraul@linux.ibm.com>
Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next v5 1/5] net/smc: Make smc_tcp_listen_work() independent
Date: Wed, 9 Feb 2022 14:24:15 +0800 [thread overview]
Message-ID: <e8764a6e-7542-3048-fb30-cdb7fd4dcde2@linux.alibaba.com> (raw)
In-Reply-To: <0d1363b7-6080-5fb3-1dcb-cdedf82303fa@linux.ibm.com>
It is indeed okay to use system_wq at present. Dues to the load
balancing issues we found, queue_work() always submits tasks to the
worker on the current CPU. tcp_listen_work() execution once may submit a
large number of tasks to the worker of the current CPU, causing
unnecessary pending, even though worker on other CPU are totaly free. I
was plan to make tcp_listen_work() blocked wait on worker of every CPU,
so I create a new workqueue, and that's the only reason for it. But this
problem is not very urgent, and I don't have strong opinion too...
在 2022/2/9 上午1:06, Karsten Graul 写道:
> On 08/02/2022 13:53, D. Wythe wrote:
>> +static struct workqueue_struct *smc_tcp_ls_wq; /* wq for tcp listen work */
>> struct workqueue_struct *smc_hs_wq; /* wq for handshake work */
>> struct workqueue_struct *smc_close_wq; /* wq for close work */
>>
>> @@ -2227,7 +2228,7 @@ static void smc_clcsock_data_ready(struct sock *listen_clcsock)
>> lsmc->clcsk_data_ready(listen_clcsock);
>> if (lsmc->sk.sk_state == SMC_LISTEN) {
>> sock_hold(&lsmc->sk); /* sock_put in smc_tcp_listen_work() */
>> - if (!queue_work(smc_hs_wq, &lsmc->tcp_listen_work))
>> + if (!queue_work(smc_tcp_ls_wq, &lsmc->tcp_listen_work))
>> sock_put(&lsmc->sk);
>
> It works well this way, but given the fact that there is one tcp_listen worker per
> listen socket and these workers finish relatively quickly, wouldn't it be okay to
> use the system_wq instead of using an own queue? But I have no strong opinion about that...
next prev parent reply other threads:[~2022-02-09 6:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 12:53 [PATCH net-next v5 0/5] net/smc: Optimizing performance in short-lived scenarios D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 1/5] net/smc: Make smc_tcp_listen_work() independent D. Wythe
2022-02-08 17:06 ` Karsten Graul
2022-02-09 6:24 ` D. Wythe [this message]
2022-02-08 12:53 ` [PATCH net-next v5 2/5] net/smc: Limit backlog connections D. Wythe
2022-02-08 17:13 ` Karsten Graul
2022-02-09 7:11 ` D. Wythe
2022-02-09 7:56 ` Karsten Graul
2022-02-08 12:53 ` [PATCH net-next v5 3/5] net/smc: Fallback when handshake workqueue congested D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 4/5] net/smc: Dynamic control auto fallback by socket options D. Wythe
2022-02-08 17:08 ` Karsten Graul
2022-02-09 6:41 ` D. Wythe
2022-02-09 7:59 ` Karsten Graul
2022-02-09 9:01 ` D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 5/5] net/smc: Add global configure for auto fallback by netlink D. Wythe
2022-02-09 9:16 ` Tony Lu
2022-02-09 9:53 ` D. Wythe
2022-02-09 11:37 ` Tony Lu
2022-02-09 9:33 ` Tony Lu
2022-02-09 9:41 ` D. Wythe
2022-02-09 9:54 ` Tony Lu
2022-02-09 10:56 ` D. Wythe
2022-02-08 17:04 ` [PATCH net-next v5 0/5] net/smc: Optimizing performance in short-lived scenarios Karsten Graul
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=e8764a6e-7542-3048-fb30-cdb7fd4dcde2@linux.alibaba.com \
--to=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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