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 2/5] net/smc: Limit backlog connections
Date: Wed, 9 Feb 2022 15:11:12 +0800 [thread overview]
Message-ID: <7f35f47b-af31-a07e-752a-11bb15aa0db9@linux.alibaba.com> (raw)
In-Reply-To: <c28365d5-72e3-335b-372e-2a9069898df1@linux.ibm.com>
There are indirectly limits on smc accept queue with following code.
+ if (sk_acceptq_is_full(&smc->sk)) {
+ NET_INC_STATS(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS);
+ goto drop;
+ }
In fact, we treat the connections in smc accept queue as Full
establisted connection. As I wrote in patch commits, there are
trade-offs to this implemets.
Thanks.
在 2022/2/9 上午1:13, Karsten Graul 写道:
> On 08/02/2022 13:53, D. Wythe wrote:
>> From: "D. Wythe" <alibuda@linux.alibaba.com>
>>
>> Current implementation does not handling backlog semantics, one
>> potential risk is that server will be flooded by infinite amount
>> connections, even if client was SMC-incapable.
>
> In this patch you count the number of inflight SMC handshakes as pending and
> check them against the defined max_backlog. I really like this improvement.
>
> There is another queue in af_smc.c, the smc accept queue and any new client
> socket that completed the handshake process is enqueued there (in smc_accept_enqueue() )
> and is waiting to get accepted by the user space application. To apply the correct
> semantics here, I think the number of sockets waiting in the smc accept queue
> should also be counted as backlog connections, right? I see no limit for this queue
> now. What do you think?
next prev parent reply other threads:[~2022-02-09 7:11 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
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 [this message]
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=7f35f47b-af31-a07e-752a-11bb15aa0db9@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