Date: Thu, 19 Jan 2017 19:17:39 +0300 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: "Jonathan T. Looney" <jtl@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r307319 - in head/sys/netinet: . tcp_stacks Message-ID: <20170119161739.GF58505@zxy.spb.ru> In-Reply-To: <201610141457.u9EEvhT8039210@repo.freebsd.org> References: <201610141457.u9EEvhT8039210@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170119161739.GF58505>