From owner-cvs-src-old@FreeBSD.ORG Mon Nov 22 09:13:40 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DBD106566B for ; Mon, 22 Nov 2010 09:13:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 603F48FC08 for ; Mon, 22 Nov 2010 09:13:40 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oAM9DeVs001606 for ; Mon, 22 Nov 2010 09:13:40 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oAM9DeBo001605 for cvs-src-old@freebsd.org; Mon, 22 Nov 2010 09:13:40 GMT (envelope-from cperciva@repoman.freebsd.org) Message-Id: <201011220913.oAM9DeBo001605@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to cperciva@repoman.freebsd.org using -f From: Colin Percival Date: Mon, 22 Nov 2010 09:13:25 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_tc.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 09:13:40 -0000 cperciva 2010-11-22 09:13:25 UTC FreeBSD src repository Modified files: sys/kern kern_tc.c Log: SVN rev 215665 on 2010-11-22 09:13:25Z by cperciva In tc_windup, handle the case where the previous call to tc_windup was more than 1s earlier. Prior to this commit, the computation of th_scale * delta (which produces a 64-bit value equal to the time since the last tc_windup call in units of 2^(-64) seconds) would overflow and any complete seconds would be lost. We fix this by repeatedly converting tc_frequency units of timecounter to one seconds; this is not exactly correct, since it loses the NTP adjustment, but if we find ourselves going more than 1s at a time between clock interrupts, losing a few seconds worth of NTP adjustments is the least of our problems... Revision Changes Path 1.195 +10 -0 src/sys/kern/kern_tc.c