Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2005 12:53:38 -0700
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: Clock running fast
Message-ID:  <LOBBIFDAGNMAMLGJJCKNOEEPFBAA.tedm@toybox.placo.com>
In-Reply-To: <995071073.20050505131333@wanadoo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help


> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org
> [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Anthony
> Atkielski
> Sent: Thursday, May 05, 2005 4:14 AM
> To: freebsd-questions@freebsd.org
> Subject: Re: Clock running fast
>
>
> Ted Mittelstaedt writes:
>
> > Anthony, you really need to look in the code sometime:
>
> It takes a very long time to find relevant sections of code, and unless
> the author was very conscientious, there are usually few or no
> explanatory comments, anyway.
>

find /usr/src/sys -print |grep "whateveryourlookingfor" can help.

> > /usr/src/sys/dev/acpica/acpi_timer.c
>
> Thanks.
>
> > * 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.
>
> Whatever that means.
>

TSC, dummy, or i8254, probably depending on the results of other tests.

> > /usr/src/sys/i386/isa/clock.c
> > /usr/src/sys/i386/i386/tsc.c
>
> Thanks
>
> > /*
> > * 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.
> > */
>
> Hmm.  I think APM is turned off on my machine, at least that's what
> FreeBSD says.  The manual for the MB doesn't say anything
> about SMI use.
> I don't like the idea of a motherboard stealing cycles from my machine;
> it sounds way too much like a virus, and a virus built into
> the hardware
> is the worst nightmare.
>

It is probably a tossup between the i8254 driver taking cycles to run
and an internal kernel counter based off the CPU clock taking cycles to
run.

Ted

> --
> Anthony
>
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"
>



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