From owner-freebsd-current Sun Nov 8 02:06:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA20415 for freebsd-current-outgoing; Sun, 8 Nov 1998 02:06:04 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA20400 for ; Sun, 8 Nov 1998 02:05:58 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id VAA24481; Sun, 8 Nov 1998 21:05:41 +1100 Date: Sun, 8 Nov 1998 21:05:41 +1100 From: Bruce Evans Message-Id: <199811081005.VAA24481@godzilla.zeta.org.au> To: bde@zeta.org.au, phk@critter.freebsd.dk Subject: Re: Grrr... calcru: negative time blah blah blah Cc: current@FreeBSD.ORG, wpaul@skynet.ctr.columbia.edu Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>Timecounter strangeness seems to be only a symptom here. I've seen >>similar strangeness caused by ddb masking interrupts. However, >>{micro|nano}[run]time() only have obvious problems when tco_delta() >>overflows a u_int. Overflow occurs after only about 10 seconds for >>a 400MHz tsc timecounter, but not for one hour for an i8254 timecounter. > >Uhm, it happens earlier for a i8254, in fact it happens whenever more >than one interrupt is lost. The majority of the bits are software >bits. That's neither (C) overflow nor in {micro|nano}[run]time(). When the low-level i8254 timecounter is not called often enough, the timecounter just drops some multiple of timer0_max_count (about 11932) timecounter ticks. This doesn't necessarily happen when more than one interrupt is lost -- it happens when the low-level timecounter is not called for more than (2 - epsilon) interrupt periods. There must have been some low-level timecounter calls for the observed timecounter deltas to be more than (2 * timer0_max_count). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message