TCP stack lock contention with short-lived connections
Julien Charbon
jch at freebsd.org
Thu Jul 14 17:45:06 UTC 2016
Hi,
On 6/28/16 12:06 PM, Julien Charbon wrote:
> On 12/7/15 4:36 PM, Julien Charbon wrote:
>> On 30/05/14 06:12, k simon wrote:
>>> Does any plan commit and MFC to the 10-stable ?
>>
>> I got a bit of interest of having the performance improvements for
>> short-lived TCP connections in 10-stable. Just to share the current
>> status to a wider audience:
>>
>> - I maintain a stack of our TCP performance related patches for
>> 10.2-RELENG here:
>>
>> https://github.com/verisign/freebsd/commits/10.2/tcp-scale
>
> Got more request to MFC TCP stack short-lived connection changes (see
> below) in 10:
>
> #1 Decrease lock contention within the TCP accept case by removing
> the INP_INFO lock from tcp_usr_accept
> https://svnweb.freebsd.org/base?view=revision&revision=271119
>
> #2 In tcp_input(), don't acquire the pcbinfo global write lock for SYN
> packets targeting a listening socket.
> https://svnweb.freebsd.org/base?view=revision&revision=271119
>
> #3 A connection in TIME_WAIT state before calling close() actually did
> not received any RST packet.
> https://svnweb.freebsd.org/base?view=revision&revision=273014
>
> #4 Decompose TCP INP_INFO lock to increase short-lived TCP connections
> scalability
> https://svnweb.freebsd.org/base?view=revision&revision=286227
>
> Fix a kernel assertion issue introduced with r286227
> https://svnweb.freebsd.org/base?view=revision&revision=286443
>
> #5 Make clear that TIME_WAIT timeout expiration is managed solely by
> tcp_tw_2msl_scan()
> https://svnweb.freebsd.org/base?view=revision&revision=286873
>
> If nobody complains, I plan to MFC them in stable/10. After actually
> quite a bunch of tests as I see a lot of changes that might impact these
> MFCs (like TFO support, etc.).
MFC over stable/10 of above commits done and tested here:
https://github.com/verisign/freebsd/commits/10/tcp-scale
Nothing particular, the result make stable/10 much closer to -CURRENT
TCP locking-wise.
Patrick and Navdeep, you might want to look (or not) at the last commit
and glance if everything looks ok TFO-wise (Patrick) and Chelsio-wise
(Navdeep):
https://github.com/verisign/freebsd/commit/787ff2dec1ad8a7343f86c0f6e759147fc64dac8
I did the diff with -CURRENT, and it looked quite the same than
-CURRENT state. Will push these commits slowly in stable/10 if all good.
Thanks.
--
Julien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20160714/a2100cfe/attachment.sig>
More information about the freebsd-net
mailing list