svn commit: r307319 - in head/sys/netinet: . tcp_stacks
Slawa Olhovchenkov
slw at zxy.spb.ru
Thu Jan 19 16:17:47 UTC 2017
On Fri, Oct 14, 2016 at 02:57:43PM +0000, Jonathan T. Looney wrote:
> Author: jtl
> Date: Fri Oct 14 14:57:43 2016
> New Revision: 307319
> URL: https://svnweb.freebsd.org/changeset/base/307319
>
> Log:
> The code currently resets the keepalive timer each time a packet is
> received on a TCP session that has entered the ESTABLISHED state. This
> results in a lot of calls to reset the keepalive timer.
>
> This patch changes the behavior so we set the keepalive timer for the
> keepalive idle time (TP_KEEPIDLE). When the keepalive timer fires, it will
> first check to see if the session has been idle for TP_KEEPIDLE ticks. If
> not, it will reschedule the keepalive timer for the time the session will
> have been idle for TP_KEEPIDLE ticks.
>
> For a session with regular communication, the keepalive timer should fire
> approximately once every TP_KEEPIDLE ticks. For sessions with irregular
> communication, the keepalive timer might fire more often. But, the
> disruption from a periodic keepalive timer should be less than the regular
> cost of resetting the keepalive timer on every packet.
>
> (FWIW, this change saved approximately 1.73% of the busy CPU cycles on a
> particular test system with a heavy TCP output load. Of course, the
> actual impact is very specific to the particular hardware and workload.)
>
> Reviewed by: gallatin, rrs
> MFC after: 2 weeks
> Sponsored by: Netflix
> Differential Revision: https://reviews.freebsd.org/D8243
Some issus exist?
More information about the svn-src-all
mailing list