Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 2015 01:33:36 -0800
From:      Rick Thomas <rbthomas@pobox.com>
To:        Lena@lena.kiev.ua
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to adjust clock frequency in FreeBSD 10.1 ?
Message-ID:  <D80C2FB3-A4D2-4ED3-895B-1BFA6702D99F@pobox.com>
In-Reply-To: <20150306133021.GC810@lena.kiev>
References:  <mailman.63.1425643201.60012.freebsd-questions@freebsd.org> <20150306133021.GC810@lena.kiev>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 6, 2015, at 5:30 AM, Lena@lena.kiev.ua wrote:

>> From: Rick Thomas <rbthomas@pobox.com>
>=20
>>>> I?ve got a machine with a really bad clock.
>=20
> Motherboards usually have several timers, not single clock.
> At boot time, FreeBSD kernel assigns a number called "quality" to each =
timer
> and chooses which timer to use.
> Using some hints in /etc/device.hints, you can forbid FreeBSD kernel
> to use the faulty timer.
>=20
> ~ $ dmesg | egrep -i 'time|clock'
> Timecounter "i8254" frequency 1193182 Hz quality 0
> Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
> acpi_hpet0: <High Precision Event Timer> iomem 0xfefff000-0xfefff3ff =
irq 0,8 on acpi0
> Timecounter "HPET" frequency 25000000 Hz quality 900
> atrtc0: <AT realtime clock> port 0x70-0x73 on acpi0
> pmtimer0 on isa0
> Timecounter "TSC" frequency 2204612489 Hz quality 800
> Timecounters tick every 1.000 msec
>=20
> sysctl -a | egrep -i 'time|clock' | less
> ...
> kern.timecounter.choice: TSC(800) HPET(900) ACPI-fast(1000) i8254(0) =
dummy(-1000000)
> kern.timecounter.hardware: ACPI-fast
>=20
> If that doesn=92t help, look for TIMER_FREQ in /sys/i386/conf/NOTES .

Thanks very much for the hints!  The machine in question is a PowerPC G4 =
Apple Macintosh.  So the timers aren=92t quite so varied as you=92d have =
on an i386 machine.  Here=92s what I get=85  Is any of it likely to be =
helpful?

> rbthomas@grey:~ % dmesg | egrep -i 'time|clock'
> Timecounter "timebase" frequency 33290001 Hz quality 0
> Event timer "decrementer" frequency 33290001 Hz quality 1000
> Timecounters tick every 1.000 msec

> rbthomas@grey:~ % sysctl -a | egrep -i 'time|clock
> kern.clockrate: { hz =3D 1000, tick =3D 1000, profhz =3D 8127, stathz =
=3D 127 }
> ...
> kern.eventtimer.choice: decrementer(1000)
> kern.eventtimer.et.decrementer.flags: 7
> kern.eventtimer.et.decrementer.frequency: 33290001
> kern.eventtimer.et.decrementer.quality: 1000
> kern.eventtimer.periodic: 0
> kern.eventtimer.timer: decrementer
> kern.eventtimer.idletick: 0
> kern.eventtimer.singlemul: 2
> ...
> kern.timecounter.fast_gettime: 1
> kern.timecounter.tick: 1
> kern.timecounter.choice: timebase(0) dummy(-1000000)
> kern.timecounter.hardware: timebase
> kern.timecounter.alloweddeviation: 5
> kern.timecounter.stepwarnings: 0
> kern.timecounter.tc.timebase.mask: 4294967295
> kern.timecounter.tc.timebase.counter: 2876823599
> kern.timecounter.tc.timebase.frequency: 33290001
> kern.timecounter.tc.timebase.quality: 0
> ...
> machdep.wall_cmos_clock: 0
> p1003_1b.realtime_signals: 200112
> p1003_1b.timers: 200112
> p1003_1b.delaytimer_max: 2147483647
> p1003_1b.timer_max: 32

And /sys/*/conf doesn=92t seem to exist=85

> rbthomas@grey:~ % ls -l /sys
> lrwxr-xr-x  1 root  wheel  11 Nov 11 17:21 /sys -> usr/src/sys
> rbthomas@grey:~ % ls -l /usr/src/
> total 0
> rbthomas@grey:~ %=20

Am I missing something?

Thanks again!
Rick=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D80C2FB3-A4D2-4ED3-895B-1BFA6702D99F>