From owner-freebsd-stable Tue Apr 13 4:17:34 1999 Delivered-To: freebsd-stable@freebsd.org Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.40.153]) by hub.freebsd.org (Postfix) with ESMTP id 42E6914BFD for ; Tue, 13 Apr 1999 04:17:30 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by phk.freebsd.dk (8.9.1/8.8.8) with ESMTP id NAA22953; Tue, 13 Apr 1999 13:15:06 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.2/8.9.2) with ESMTP id NAA11310; Tue, 13 Apr 1999 13:14:58 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Mark Powell Cc: Mike Smith , freebsd-stable@freebsd.org Subject: Re: Real time clock problem in 3.1-STABLE In-reply-to: Your message of "Fri, 09 Apr 1999 15:49:38 BST." Date: Tue, 13 Apr 1999 13:14:58 +0200 Message-ID: <11308.924002098@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Make absolutely sure that you don't have APM enabled in any way, shape or form in the bios. The variance you show can only be credibly explained by APM or really sick hardware. APM is the most likely. If you have access to a frequency counter, you can measure the frequency on pin "something" in the ISA bus and see if it wanders all over the place. All frequencies on modern motherboards are derived from the same 14.318 MHz xtal by a small PLL chip. I have on my list some code to detect when the TSC isn't suitable and disable the use of it, but I have a lot in front of that little project, so don't hold your breath for it. Poul-Henning In message , Mark Powell writes: >On Thu, 8 Apr 1999, Mike Smith wrote: > >> > Installed 3.1-STABLE on an Apricot Shogun server. xntpd wouldn't sync time >> > correctly though. I set it up just as I do on any other machine. However, >> > on the same machine RedHat 5.2 can sync the time just fine. >> > FreeBSD had problems both before and after the recent kernel clock mods. >> > I notice that with 3.1-S looking at the clocks at boot up, it would appear >> > that over 40 reboots, the TSC clock has varied from 126668897 to >> > 132002659, a variance of almost 5%. Is this normal? Whereas when Linux >> > boots up the variance in processor clock speed is only about 1000Hz. Could >> > this be causing the time problems, and if so is there anyway I can fiddle >> > with tickadj or something to let xntpd work on this machine? >> > Unfortunately I'm going to have to go with Linux on this machine if >> > 3.1-S can't sync the time correctly. Anyone help? Cheers. >> >> The problem is probably our "advanced" timecounter code being screwed >> by the Apricot's firmware. You might try >> >> sysctl -w kern.timecounter.method=1 >> >> and see if that helps. Also talk to phk@freebsd.org about this if you >> haven't already. > >Tried that and it makes no difference. This machine has a single 133MHz >Pentium. I notice on only two occasions that xntpd was able to sync time >correctly, that at boot-up the clock speed was read correctly: > >Mar 12 15:44:33 mimas /kernel: FreeBSD 3.1-STABLE #0: Mon Mar 8 14:52:37 >GMT 1999 >Mar 12 15:44:33 mimas /kernel: >Mar 12 15:44:33 mimas /kernel: Timecounter "i8254" frequency 1193182 Hz >Mar 12 15:44:33 mimas /kernel: Timecounter "TSC" frequency 133335819 Hz >Mar 12 15:44:33 mimas /kernel: CPU: Pentium/P54C (133.34-MHz 586-class >CPU) >Mar 12 15:44:33 mimas /kernel: Origin = "GenuineIntel" Id = 0x525 >Stepping=5 > >This morning I rebooted, it again read the clock correctly and xntpd was >able to sync time. > >Apr 9 12:29:16 mimas /kernel: FreeBSD 3.1-STABLE #0: Wed Mar 24 11:49:30 >GMT 1999 >Apr 9 12:29:16 mimas /kernel: >Apr 9 12:29:16 mimas /kernel: Timecounter "i8254" frequency 1193182 Hz >Apr 9 12:29:16 mimas /kernel: Timecounter "TSC" frequency 133335989 Hz >Apr 9 12:29:16 mimas /kernel: CPU: Pentium/P54C (133.34-MHz 586-class >CPU) >Apr 9 12:29:16 mimas /kernel: Origin = "GenuineIntel" Id = 0x525 >Stepping=5 > >However, I've rebooted again and the time is drifting again: > >Apr 9 15:25:13 mimas /kernel: FreeBSD 3.1-STABLE #0: Wed Mar 24 11:49:30 >GMT 1999 >Apr 9 15:25:13 mimas /kernel: >Apr 9 15:25:13 mimas /kernel: Timecounter "i8254" frequency 1193182 Hz >Apr 9 15:25:13 mimas /kernel: Timecounter "TSC" frequency 132002173 Hz >Apr 9 15:25:13 mimas /kernel: CPU: Pentium/P54C (132.00-MHz 586-class >CPU) >Apr 9 15:25:13 mimas /kernel: Origin = "GenuineIntel" Id = 0x525 >Stepping=5 > >Any ideas? >Cheers. > >Mark Powell - System Administrator (UNIX) - Clifford Whitworth Building >A.I.S., University of Salford, Salford, Manchester, UK. >Tel: +44 161 295 5936 Fax: +44 161 295 5888 www.pgp.com for PGP key >M.S.Powell@ais.salfrd.ac.uk (spell salford correctly to reply to me) > > -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message