Date: Mon, 03 Nov 2014 14:29:17 +0100 From: Julien Charbon <jch@freebsd.org> To: freebsd-net@freebsd.org Cc: "De La Gueronniere, Marc" <mdelagueronniere@verisign.com> Subject: Re: TCP stack lock contention with short-lived connections Message-ID: <5457832D.6070709@freebsd.org> In-Reply-To: <542EA1C9.6080907@freebsd.org> References: <op.w51mxed6ak5tgc@fri2jcharbon-m1.local> <op.w56mamc0ak5tgc@dul1rjacobso-l3.vcorp.ad.vrsn.com> <len481$sfv$2@ger.gmane.org> <537F39DF.1090900@verisign.com> <542EA1C9.6080907@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VLXE2EJj2IFQl2Cv5JLw3s1W08jPW5rqc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, On 03/10/14 15:16, Julien Charbon wrote: > On 23/05/14 14:06, Julien Charbon wrote: >> On 27/02/14 11:32, Julien Charbon wrote: >>> On 07/11/13 14:55, Julien Charbon wrote: >>>> On Mon, 04 Nov 2013 22:21:04 +0100, Julien Charbon >>>> <jcharbon@verisign.com> wrote: >>>>> I have put technical and how-to-repeat details in below PR: >>>>> >>>>> kern/183659: TCP stack lock contention with short-lived connections= >>>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D183659 >>>>> >>>>> We are currently working on this performance improvement effort; = it >>>>> will impact only the TCP locking strategy not the TCP stack logic >>>>> itself. We will share on freebsd-net the patches we made for >>>>> reviewing and improvement propositions; anyway this change might a= lso >>>>> require enough eyeballs to avoid tricky race conditions introductio= n >>>>> in TCP stack. As usual, a follow-up the TCP short-lived connections performance improvement progress: Thanks to jhb (mentor/reviewer) and adrian, rpaulo, rwatson (reviewers), two related commits have been added in HEAD: - First, just a fix for a wrong ECONNRESET error on close(): A connection in TIME_WAIT state before calling close() actually did not received any RST packet https://svnweb.freebsd.org/base?view=3Drevision&revision=3D273014 - Second, a race condition fix with a code clean-up: Fix a race condition in TCP timewait between tcp_tw_2msl_reuse() and tcp_tw_2msl_scan() https://svnweb.freebsd.org/base?view=3Drevision&revision=3D273850 It means that the whole set of tcp_tw_2msl_scan()-related changes could now be MFC-ed in 10-STABLE as the KBI stability can be kept now: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D264321 https://svnweb.freebsd.org/base?view=3Drevision&revision=3D264342 https://svnweb.freebsd.org/base?view=3Drevision&revision=3D264351 https://svnweb.freebsd.org/base?view=3Drevision&revision=3D264356 https://svnweb.freebsd.org/base?view=3Drevision&revision=3D273850 It also means that only one (big) related patch remains to be pushed: Introduce the INP_LIST global mutex for protecting pcbinfo global structures. Then use INP_INFO_RLOCK in critical paths to increase TCP processing scalability, and use INP_INFO_WLOCK in full INPs iteration loops. (See also joined patch). https://github.com/verisign/freebsd/commit/6e47f726f4d58f986e977fb0f816b8= a271804460 Nothing new here, just check previous emails in this thread to get all details. So far, we are adding comments and reviewing the change in more specific cases, then we plan to push this change in review around December 2014. My 2 cents. -- Julien --VLXE2EJj2IFQl2Cv5JLw3s1W08jPW5rqc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUV4M0AAoJEKVlQ5Je6dhxG+IIAJ3sAh4KnAkAmySbRnPnFV7N WtnsOTxsJLZPqtDOQI1vaJZQrS7d8JS3WftDs29LuTc6Va8iCyiXt2xFZaPjXEPy Mm1eF7nuHRpW/u/tcSzGlm+rUrXYza92g685solZKkCyIYCyAS5r4UtmD2S2ReqV U5wFYGSud3fY3/H+3cJMb9aEU1kWmHxkzsVZxSBr9LUhK+Cd8Fwy+VqLo7r1PlUb dgjtCeaOFXzjXv88/BynfyIMHzH+n/XOfJ0FaRKPs/EWYS1YIKaMhaSthNcp9ECo oVGYfXOYE6cyYGka3g6tYHY1rW6FEtRM5vYNCsbBIwwIiLyK2t4U52TfO8tjU5Y= =6plW -----END PGP SIGNATURE----- --VLXE2EJj2IFQl2Cv5JLw3s1W08jPW5rqc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5457832D.6070709>