Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 1995 00:52:43 -0800 (PST)
From:      "Rodney W. Grimes" <rgrimes@GndRsh.aac.dev.com>
To:        uhclem%nemesis@fw.ast.com (Frank Durda IV)
Cc:        current@FreeBSD.org
Subject:   Re: Time problems
Message-ID:  <199511020852.AAA10537@GndRsh.aac.dev.com>
In-Reply-To: <m0tApWM-000IvyC@nemesis.lonestar.org> from "Frank Durda IV" at Nov 1, 95 08:36:00 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> [3]Bruce Evans <bde@zeta.org.au> writes:
> [3]Perhaps the 8254 clock is being accessed too fast.  Try adding some delays
> [3]before each inb() and outb() in clock.c:getit().  Count to 100 or so to
> [3]get at least 1 usec delay.
> 
> Uh, I don't think this will work as you expect on a Pentium or a P6. It is
> too easy for the parallel integer unit(s) to execute the inb/outbs in one
> unit and do the nice delay loop in the other, thus wrecking your timing delay.
> On the Pentium and up you must force these types of "timed" instruction
> sequences to be done sequentially.
> 
> Execution Time is no longer linear....   :-)
...

I suggest you go read the book again, IN and OUT instructions are
``serailization'' instuctions.  All code between them will have _completed_
execution before the external cycle runs.


-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



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