Date: Sun, 28 Jun 1998 13:40:51 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: John Hay <jhay@mikom.csir.co.za> Cc: freebsd-smp@FreeBSD.ORG Subject: Re: time problem? Message-ID: <2720.899034051@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 28 Jun 1998 12:42:31 %2B0200." <199806281042.MAA04522@zibbi.mikom.csir.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2720.899034051>