From owner-freebsd-questions@FreeBSD.ORG Sat Mar 7 09:33:47 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3BBC450 for ; Sat, 7 Mar 2015 09:33:46 +0000 (UTC) Received: from sasl.smtp.pobox.com (pb-sasl1.int.icgroup.com [208.72.237.25]) by mx1.freebsd.org (Postfix) with ESMTP id AE09D632 for ; Sat, 7 Mar 2015 09:33:45 +0000 (UTC) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 962D537010; Sat, 7 Mar 2015 04:33:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=sasl; bh= 8sTkTJ1KANFuwX9KuqfczFU9O6k=; b=ZPcdBk2h4O6N1STXJYklE0e5n15ezFuM an7izHNHjp9SeiwIgL60aK6jCUwe7OZlC3F0VAhU7gKJyuKn3W86PxEylT6+N/yc C/aSDz1+iNDlJNLefa6fGSKsPTBEf07S5UCqi7KfwRAGpEo/0GD0h0iFUS1eHctz nG0CVC9XWQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= sasl; b=ftOIGffITRKwF8LbwG/DXgTX9zhO9vvq3DIqxwSsCnd3GuiUG2vy4ypf NRVy+NkH8PJm/WMcq0cQHFnd9qepVPTyi49fQ0Kzb72Zf+BgQZrHlAR9NVpDBPRE ItnvtM9blrI9YBIgc9gGYTzxGCqK4Zmo9WarWkewm7jqA09yaRo= Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 8EA803700F; Sat, 7 Mar 2015 04:33:39 -0500 (EST) Received: from almini.rcthomas.org (unknown [208.53.120.31]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 9338137008; Sat, 7 Mar 2015 04:33:38 -0500 (EST) Subject: Re: How to adjust clock frequency in FreeBSD 10.1 ? Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=windows-1252 From: Rick Thomas In-Reply-To: <20150306133021.GC810@lena.kiev> Date: Sat, 7 Mar 2015 01:33:36 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150306133021.GC810@lena.kiev> To: Lena@lena.kiev.ua X-Mailer: Apple Mail (2.1878.6) X-Pobox-Relay-ID: 0944AB2C-C4AD-11E4-B345-B058D0B8C469-02150157!pb-sasl1.pobox.com Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 09:33:47 -0000 On Mar 6, 2015, at 5:30 AM, Lena@lena.kiev.ua wrote: >> From: Rick Thomas >=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: iomem 0xfefff000-0xfefff3ff = irq 0,8 on acpi0 > Timecounter "HPET" frequency 25000000 Hz quality 900 > atrtc0: 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=