Date: Fri, 28 Oct 2005 17:48:19 +0800 From: Jiawei Ye <leafy7382@gmail.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Mark Kirkwood <markir@paradise.net.nz>, Pawel Jakub Dawidek <pjd@freebsd.org>, David Xu <davidxu@freebsd.org>, "Yuriy N. Shkandybin" <jura@networks.ru>, current@freebsd.org Subject: Re: Timers and timing, was: MySQL Performance 6.0rc1 Message-ID: <c21e92e20510280248g6b47a7c6t79cb07e53a7db118@mail.gmail.com> In-Reply-To: <30513.1130492612@critter.freebsd.dk> References: <20051028091016.GC3596@garage.freebsd.pl> <30513.1130492612@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/28/05, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
>
> By default the timecounter with the highest score is selected (but
> negative scores are never selected automatically).
>
> You can override this with
> sysctl kern.timecounter.hardware=3Dsomething
> where something is one of the timecounters listed in kern.timecounter.cho=
ice
>
> --
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
This is what I get on a UP P4-1.8 -current system. No debugging enabled ker=
nel.
root@chihiro:/home/leafy/tmp# sysctl kern.timecounter.hardware=3DTSC
kern.timecounter.hardware: ACPI-fast -> TSC
root@chihiro:/home/leafy/tmp# ./a.out
null function: 0.00794
getpid(): 0.94267
time(): 1.26512
gettimeofday(): 1.25332
root@chihiro:/home/leafy/tmp# sysctl kern.timecounter.hardware=3DACPI-fast
kern.timecounter.hardware: TSC -> ACPI-fast
root@chihiro:/home/leafy/tmp# ./a.out
null function: 0.00796
getpid(): 0.94788
time(): 2.31868
gettimeofday(): 2.29598
root@chihiro:/home/leafy/tmp# sysctl kern.timecounter.hardware=3Di8254
kern.timecounter.hardware: ACPI-fast -> i8254
root@chihiro:/home/leafy/tmp# ./a.out
null function: 0.00812
getpid(): 0.96921
time(): 5.01022
gettimeofday(): 5.01292
--
"Without the userland, the kernel is useless."
--inspired by The Tao of Programming
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c21e92e20510280248g6b47a7c6t79cb07e53a7db118>
