From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 16:43:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B04C416A4CE for ; Wed, 8 Sep 2004 16:43:39 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C0BD43D45 for ; Wed, 8 Sep 2004 16:43:39 +0000 (GMT) (envelope-from shchoi@gmail.com) Received: by mproxy.gmail.com with SMTP id w67so97456cwb for ; Wed, 08 Sep 2004 09:43:36 -0700 (PDT) Received: by 10.11.119.70 with SMTP id r70mr58105cwc; Wed, 08 Sep 2004 09:43:36 -0700 (PDT) Received: by 10.11.117.28 with HTTP; Wed, 8 Sep 2004 09:43:36 -0700 (PDT) Message-ID: <34b425c504090809435a949a03@mail.gmail.com> Date: Wed, 8 Sep 2004 17:43:36 +0100 From: Soo-Hyun Choi To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: TCP RTO X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Soo-Hyun Choi List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 16:43:39 -0000 Hi, I'm not sure if this list is appropriate to ask about the FreeBSD kernel source or not. If not, could somebody direct me in an appropriate list? My curiosity is if we see the tcp.cc code inside, there are two different version of srtt (smoothed rtt) and rttvar (smoothed mean deviation estimator). The one is simply 'srtt' and 'rttvar' and the other is 't_srtt' and 't_rttvar'. The unit of t_srtt is 'ticks * 8' and the unit of t_rttvar is 'ticks * 4'. These variables are used to calculate the TCP RTO. But why do they have the two different version of variables? The interesting thing is the 't_' variables are a fixed-point integer, and the original variables are just floating-point values. I assume the reason why they have is to avoid the floating-point arithmetic in the kernel. Is this really only reason for being two different version of those? Cheers, Soo-Hyun