Clock running fast

Ted Mittelstaedt tedm at toybox.placo.com
Thu May 5 02:20:12 PDT 2005


Anthony, you really need to look in the code sometime:

/usr/src/sys/dev/acpica/acpi_timer.c

     * If all tests of the counter succeed, use the ACPI-fast method.  If
     * at least one failed, default to using the safe routine, which
reads
     * the timer multiple times to get a consistent value before
returning.

/usr/src/sys/i386/isa/clock.c

  the init routines for the i8254 clock chip

/usr/src/sys/i386/i386/tsc.c

{
        /*
         * We can not use the TSC if we support APM. Precise timekeeping
         * on an APM'ed machine is at best a fools pursuit, since
         * any and all of the time spent in various SMM code can't
         * be reliably accounted for.  Reading the RTC is your only
         * source of reliable time info.  The i8254 looses too of course
         * but we need to have some kind of time...
         * We don't know at this point whether APM is going to be used
         * or not, nor when it might be activated.  Play it safe.
         */


Ted

> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org
> [mailto:owner-freebsd-questions at freebsd.org]On Behalf Of Anthony
> Atkielski
> Sent: Thursday, May 05, 2005 1:44 AM
> To: freebsd-questions at freebsd.org
> Subject: Re: Clock running fast
>
>
> Charles Swiger writes:
>
> > Try changing the kern.timecounter.hardware sysctl; you can
> look at the
> > available choices via:
> >
> >          sysctl kern.timecounter.choice
>
> So what do the choices mean?  How are they used?
>
> On one machine, I see TSC, ACPI-fast, i8254, and dummy as choices, and
> ACPI-fast is selected (this is a P4 machine). On the other, older
> machine (a 2-processor Pentium Pro), I see TSC, i8254, and dummy, and
> i8254 is selected.
>
> I presume that TSC is a real-time clock based on the processor TSC, and
> I presume also that i8254 is such a clock based on the classic i8254
> timer, but what is dummy, and what is ACPI-fast?
>
> What are the pros and cons of selecting different choices?
>
> --
> Anthony
>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>



More information about the freebsd-questions mailing list