From owner-freebsd-smp Sun Jun 28 04:51:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA11216 for freebsd-smp-outgoing; Sun, 28 Jun 1998 04:51:47 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.133.1] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA11112 for ; Sun, 28 Jun 1998 04:49:54 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id NAA02722; Sun, 28 Jun 1998 13:40:53 +0200 (CEST) To: John Hay cc: freebsd-smp@FreeBSD.ORG Subject: Re: time problem? In-reply-to: Your message of "Sat, 28 Jun 1998 12:42:31 +0200." <199806281042.MAA04522@zibbi.mikom.csir.co.za> Date: Sun, 28 Jun 1998 13:40:51 +0200 Message-ID: <2720.899034051@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >I have found that my dual P5 100MHz machine will gain +- 0.85 seconds >every now and again. [...] >so it looks like it has something >to do with the SMP code. It also does not seem to have anything to do >with how busy the machine is, it has happened on a totally idle machine >and also during a make world. > >Anybody have any ideas how I can look for this? I don't understand all >the low level time stuff yet (especially the SMP side of it), but if >given a little direction I'm willing to try a few things. It is really very simple, and there is nothing SMP specific about the code. .85 seconds sounds suspiciosly like 2^20 cycles at 1193182 Hz. Unfortunately that doesn't really make any kind of sense to me... How do you detect this jump ? what is the exact sequnce of events ? The only possibly weak spot I know is this test in i386/isa/clock.c, you can try out this patch, but I doubt it will fix it. Index: clock.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v retrieving revision 1.124 diff -u -r1.124 clock.c --- clock.c 1998/06/09 13:10:46 1.124 +++ clock.c 1998/06/28 11:39:03 @@ -1148,7 +1148,7 @@ high = inb(TIMER_CNTR0); count = hardclock_max_count - ((high << 8) | low); - if (count < i8254_lastcount) { + if (count <= i8254_lastcount) { i8254_ticked = 1; i8254_offset += hardclock_max_count; } -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message