From owner-freebsd-current Thu Mar 28 9:47:20 2002 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 572D037B404 for ; Thu, 28 Mar 2002 09:47:09 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g2SHl8i28030; Thu, 28 Mar 2002 10:47:08 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g2SHl6f28842; Thu, 28 Mar 2002 10:47:06 -0700 (MST) (envelope-from imp@village.org) Date: Thu, 28 Mar 2002 10:46:54 -0700 (MST) Message-Id: <20020328.104654.74403212.imp@village.org> To: phk@critter.freebsd.dk Cc: kris@obsecurity.org, roberto@eurocontrol.fr, freebsd-current@FreeBSD.ORG Subject: Re: Time counter broken? From: "M. Warner Losh" In-Reply-To: <17301.1017317101@critter.freebsd.dk> References: <20020328034747.B98857@xor.obsecurity.org> <17301.1017317101@critter.freebsd.dk> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <17301.1017317101@critter.freebsd.dk> Poul-Henning Kamp writes: : : I think I found a mistake I made, can you try this patch please ? : : Index: kern_tc.c : =================================================================== : RCS file: /home/ncvs/src/sys/kern/kern_tc.c,v : retrieving revision 1.117 : diff -u -r1.117 kern_tc.c : --- kern_tc.c 19 Mar 2002 21:24:06 -0000 1.117 : +++ kern_tc.c 28 Mar 2002 12:00:13 -0000 : @@ -241,7 +241,7 @@ : * The range is +/- 500PPM so we can multiply by about 8500 : * without overflowing. 4398/1024 = is very close to ideal. : */ : - scale += (tc->tc_adjustment * 4398) >> 10; : + scale += (tc->tc_adjustment * 4398) >> 11; : scale /= tc->tc_tweak->tc_frequency; : tc->tc_scale = scale * 2; : } This patch is broken because it doesn't fix the comment, which should read ... 4398 / 2048 is very close to ideal. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message