From owner-svn-src-head@freebsd.org Thu Jan 19 16:17:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8750ACB8A56; Thu, 19 Jan 2017 16:17:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6101D2C; Thu, 19 Jan 2017 16:17:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cUFP9-000DKc-Gz; Thu, 19 Jan 2017 19:17:39 +0300 Date: Thu, 19 Jan 2017 19:17:39 +0300 From: Slawa Olhovchenkov To: "Jonathan T. Looney" 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> References: <201610141457.u9EEvhT8039210@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610141457.u9EEvhT8039210@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2017 16:17:47 -0000 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?