Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 1996 23:17:57 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, phk@critter.tfs.com
Cc:        freebsd-current@freefall.freebsd.org, kuku@gilberto.physik.rwth-aachen.de
Subject:   Re: calcru: negative time:
Message-ID:  <199604021317.XAA23396@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> actual time	event		reported time	comments
>> 0		Xintr0()
>> 10		hardclock()
>> 9000		splhigh()
>> 10000		Xintr0()			sets ipending bit for intr0
>> 19000		microtime()	19000		no problem yet
>> 20000		Xintr0()			oops, missed a whole intr0
>Could we add a check for this under some suitable #ifdef ?

Oops, the second Xintr0() shouldn't be there - irq0 is masked until the
interrupt is processed.  If irq0 is edge triggered than it could be left
unmasked so that the second irq0 is detectable, but this isn't the default
and edge triggering should die when ISA dies.

Thus it is only practical to detect missed clock interrupts if another
clock is available.  We have enough - the rtc on all systems and the
tsc on i586's.  I plan to compare the clocks every second or 10.  This
should be standard to detect drift.

>Alternatively, could we make a check in spl*() so that if splhigh has been
>active >long< time we will print a warning ?

I plan to do this too.  This should only be enabled for debugging.  My
current tests have been detecting lots of problems but haven't been any
help for finding where the high latency comes from.  The problem should
be reported by stopping at a breakpoint in spl0 or in doreti before the
cpl has been reduced.  Then there will be a chance of seeing what set
cpl high for too long.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604021317.XAA23396>