Date: Mon, 22 Nov 2010 09:13:25 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern kern_tc.c Message-ID: <201011220913.oAM9DeBo001605@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011220913.oAM9DeBo001605>