From owner-freebsd-hackers Thu Jul 30 22:42:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA05037 for freebsd-hackers-outgoing; Thu, 30 Jul 1998 22:42:34 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ren.dtir.qld.gov.au (ns.dtir.qld.gov.au [203.108.138.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA05020 for ; Thu, 30 Jul 1998 22:42:30 -0700 (PDT) (envelope-from syssgm@dtir.qld.gov.au) Received: by ren.dtir.qld.gov.au; id PAA11388; Fri, 31 Jul 1998 15:41:57 +1000 (EST) Received: from ogre.dtir.qld.gov.au(167.123.8.3) by ren.dtir.qld.gov.au via smap (3.2) id xma011380; Fri, 31 Jul 98 15:41:49 +1000 Received: from atlas.dtir.qld.gov.au (atlas.dtir.qld.gov.au [167.123.8.9]) by ogre.dtir.qld.gov.au (8.8.8/8.8.7) with ESMTP id PAA17444; Fri, 31 Jul 1998 15:41:48 +1000 (EST) Received: from nymph.dtir.qld.gov.au (nymph.dtir.qld.gov.au [167.123.10.10]) by atlas.dtir.qld.gov.au (8.8.5/8.8.5) with ESMTP id PAA26276; Fri, 31 Jul 1998 15:41:48 +1000 (EST) Received: from nymph.dtir.qld.gov.au (localhost.dtir.qld.gov.au [127.0.0.1]) by nymph.dtir.qld.gov.au (8.8.8/8.8.7) with ESMTP id PAA11224; Fri, 31 Jul 1998 15:41:46 +1000 (EST) (envelope-from syssgm@nymph.dtir.qld.gov.au) Message-Id: <199807310541.PAA11224@nymph.dtir.qld.gov.au> To: bill schaub cc: freebsd-hackers@FreeBSD.ORG, syssgm@dtir.qld.gov.au Subject: Re: you may be intrested in this strange problem i found in 2.2.1 References: In-Reply-To: from bill schaub at "Thu, 30 Jul 1998 16:19:35 -0500" Date: Fri, 31 Jul 1998 15:41:45 +1000 From: Stephen McKay Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thursday, 30th July 1998, bill schaub wrote: >im running 2.2.1 on a 386 for a web and email server ... >the problem is after the system is runnign for a while it stops reporting >the cpu useage for any process and systat dies with the alternate system >clock has died now reverting to "pigs" display iostat keeps reporting a >bogus reading of 92 % idle 3 % user 3% system and 2% interrupt witch is >bogus sicne it stays the same even when compileing the kernel Upgrade to 2.2.7. This problem was fixed in 2.2.2. But if you want a quick fix, apply this patch to /sys/i386/isa/clock.c: Index: clock.c =================================================================== RCS file: /cvs/src/sys/i386/isa/clock.c,v retrieving revision 1.72.2.3 retrieving revision 1.72.2.4 diff -u -r1.72.2.3 -r1.72.2.4 --- clock.c 1997/03/05 08:19:02 1.72.2.3 +++ clock.c 1997/04/27 13:44:19 1.72.2.4 @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.72.2.3 1997/03/05 08:19:02 bde Exp $ + * $Id: clock.c,v 1.72.2.4 1997/04/27 13:44:19 mckay Exp $ */ /* @@ -311,15 +311,20 @@ * * 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) { - u_char stat; - stat = rtcin(RTC_INTR); - if(stat & RTCIR_PERIOD) { + while (rtcin(RTC_INTR) & RTCIR_PERIOD) statclock(&frame); - } } #include "opt_ddb.h" >i know i dont have good grammer skills but i am not a total moron Don't skimp on the capitalisation and punctuation, or most people will assume the worst. Stephen. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message