From owner-freebsd-smp Mon Jun 29 02:51:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA12625 for freebsd-smp-outgoing; Mon, 29 Jun 1998 02:51:38 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA12549 for ; Mon, 29 Jun 1998 02:51:18 -0700 (PDT) (envelope-from jhay@zibbi.mikom.csir.co.za) Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.9.0/8.9.0) id LAA22466; Mon, 29 Jun 1998 11:46:48 +0200 (SAT) From: John Hay Message-Id: <199806290946.LAA22466@zibbi.mikom.csir.co.za> Subject: Re: time problem? In-Reply-To: <9570.899103386@critter.freebsd.dk> from Poul-Henning Kamp at "Jun 29, 98 08:56:26 am" To: phk@critter.freebsd.dk (Poul-Henning Kamp) Date: Mon, 29 Jun 1998 11:46:48 +0200 (SAT) Cc: freebsd-smp@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > >I have an 1 pps signal connected to DCD of my serial port. > > What source do you use for this ? A Garmin GPS-25XL. I feed the signal to 2 machines, one is this SMP machine and the other is a 66MHz 486DX2 also running FreeBSD-current, although normally not quite as current. :-) I don't see those .85 second jumps on it, so I doubt if it is the pps signal. > > >---------------- > >A: 899000790.981073054 #29011 D: 1.000004191 > >A: 899000792.826104370 #29012 D: 1.845031316 > >A: 899016109.813482765 #44329 D: 0.999940488 > >A: 899016111.668519664 #44330 D: 1.855036899 > >---------- > > > >So on sequence numbers 29012 and 44330, I have gained .85 seconds > >in the space of a second. For the 15000 seconds between 29012 and > >44329 there were no glitches or jumps. The machine has been running for more than 12 hours now with your patch and there has been 5 .85 second jumps in that period. > > Now, one source of this could be interrupts diasabled for too long, > since your timestamps depend on the sio interrupt that would be my > primary suspect. I'll see if it still happen if I change the program not to use the sio timestamping, but just use one of the normal userlevel calls like gettimeofday() or clock_gettime(). > > Is there anything that makes it happen more often ? Not that I know of yet. I have left the machine idle for long periods and also done a lot of make worlds, but it did not seem to make a difference. > > >Is this function, i8254_get_timecount(), used by something that can > >have a permanent effect on time? I thought it was only used by > >nanotime() and microtime() to get the offset from the previous tick, > >but that it wasn't used to calculate the next tick? > > It shouldn't be, apart from "tco_forward()" which bumps the timecounters > reference time once each hardclock() (kern/kern_clock.c) Ok, I missed tco_delta() being called from sync_other_counter() at the start of tco_forward(); John -- John Hay -- John.Hay@mikom.csir.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message