Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Nov 2014 11:56:17 +0800
From:      k simon <chio1990@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: TCP stack lock contention with short-lived connections
Message-ID:  <54584E61.3020605@gmail.com>
In-Reply-To: <5457832D.6070709@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> <5457832D.6070709@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Great job. It would help me a lot.


Simon

在 14/11/3 21:29, Julien Charbon 写道:
>
>   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=183659
>>>>>>
>>>>>>    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 also
>>>>>> require enough eyeballs to avoid tricky race conditions introduction
>>>>>> 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=revision&revision=273014
>
>   - 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=revision&revision=273850
>
>   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=revision&revision=264321
> https://svnweb.freebsd.org/base?view=revision&revision=264342
> https://svnweb.freebsd.org/base?view=revision&revision=264351
> https://svnweb.freebsd.org/base?view=revision&revision=264356
> https://svnweb.freebsd.org/base?view=revision&revision=273850
>
>   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/6e47f726f4d58f986e977fb0f816b8a271804460
>
>   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
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54584E61.3020605>