Date: Mon, 14 Apr 1997 18:21:44 +1000 From: Bruce Evans <bde@zeta.org.au> To: hackers@freebsd.org, markd@Grizzly.COM Subject: Re: User time stopped. Message-ID: <199704140821.SAA01659@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>My 2.2.1 system has quit accumulating user time. I had encountered this
This is probably fixed in -current. Try this change:
Index: clock.c
===================================================================
RCS file: /a/ncvs/src/sys/i386/isa/clock.c,v
retrieving revision 1.72.2.3
retrieving revision 1.80
diff -c -2 -r1.72.2.3 -r1.80
*** clock.c 1997/03/05 08:19:02 1.72.2.3
--- clock.c 1997/04/06 13:25:48 1.80
***************
*** 312,324 ****
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
*/
static void
rtcintr(struct clockframe frame)
{
! u_char stat;
! stat = rtcin(RTC_INTR);
! if(stat & RTCIR_PERIOD) {
statclock(&frame);
- }
}
--- 312,329 ----
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
+ * Under high interrupt load, rtcintr() can be indefinitely delayed and
+ * the clock can tick immediately after the read from RTC_INTR. In this
+ * case, the mc146818A interrupt signal will not drop for long enough
+ * to register with the 8259 PIC. If an interrupt is missed, the stat
+ * clock will halt, considerably degrading system performance. This is
+ * why we use 'while' rather than a more straightforward 'if' below.
+ * Stat clock ticks can still be lost, causing minor loss of accuracy
+ * in the statistics, but the stat clock will no longer stop.
*/
static void
rtcintr(struct clockframe frame)
{
! while (rtcin(RTC_INTR) & RTCIR_PERIOD)
statclock(&frame);
}
Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704140821.SAA01659>
