NetBSD Problem Report #44227
From www@NetBSD.org Sun Dec 12 23:06:36 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 31A0063B883
for <gnats-bugs@gnats.NetBSD.org>; Sun, 12 Dec 2010 23:06:36 +0000 (UTC)
Message-Id: <20101212230636.07A5263B87A@www.NetBSD.org>
Date: Sun, 12 Dec 2010 23:06:36 +0000 (UTC)
From: lacombar@gmail.com
Reply-To: lacombar@gmail.com
To: gnats-bugs@NetBSD.org
Subject: 5.99.25 misdects CPU frequency
X-Send-Pr-Version: www-1.0
>Number: 44227
>Category: kern
>Synopsis: 5.99.25 misdects CPU frequency
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 12 23:10:00 +0000 2010
>Last-Modified: Mon Dec 13 00:15:03 +0000 2010
>Originator: Arnaud Lacombe
>Release: 5.99.25
>Organization:
n/a
>Environment:
-
>Description:
From http://mail-index.netbsd.org/current-users/2010/04/17/msg013120.htm, dmesg says:
NetBSD 5.99.13 (GENERIC) #14: Sun Jun 21 22:34:42 EDT 2009
al@nybbas:/nbsd/src/build/obj/sys/arch/i386/compile/GENERIC
total memory = 3037 MB
avail memory = 2977 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
LENOVO. 2743CTO (ThinkPad SL400)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 1795MHz, id 0x6fd
cpu1 at mainbus0 apid 1: Intel 686-class, 1795MHz, id 0x6fd
5.99.25 says:
NetBSD 5.99.25 (GENERIC) #0: Tue Apr 27 22:29:06 EDT 2010
al@nybbas:/nbsd/src/build/obj/sys/arch/i386/compile/GENERIC
total memory = 3037 MB
avail memory = 2977 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
LENOVO. 2743CTO (ThinkPad SL400)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 2154MHz, id 0x6fd
cpu1 at mainbus0 apid 1: Intel 686-class, 2154MHz, id 0x6fd
The CPU frequency is wrong is the second case. I cannot say right now whether or not 5.99.41 gets the correct answer.
This may be responsible of the ~16% time drift I'm seeing sometime with 5.99.25. The error between the 2 frequencies is the same ratio, ~16%.
>How-To-Repeat:
>Fix:
>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/44227: 5.99.25 misdects CPU frequency
Date: Mon, 13 Dec 2010 01:11:57 +0100
On Sun, Dec 12, 2010 at 11:10:01PM +0000, lacombar@gmail.com wrote:
> >Synopsis: 5.99.25 misdects CPU frequency
When booting with a few Xeon W3520, 2660MHz, the cpu line reported by
NetBSD switches between
cpu0 at mainbus0 apid 0: Intel 686-class, 2672MHz, id 0x106a5
and
cpu0 at mainbus0 apid 0: Intel 686-class, 3207MHz, id 0x106a5
This also causes
-timecounter: Timecounter "TSC" frequency 2672865880 Hz quality 3000
+timecounter: Timecounter "TSC" frequency 3207398120 Hz quality 3000
For this reason I've switched the timecounter to avoid the time
drifting problem:
# grep timecounter /etc/sysctl.conf
kern.timecounter.hardware=hpet0
Then I at least don't see any effects of this weirdness.
I've seen this behaviour for a long time now (at least in 5.99.15,
5.99.22, 5.99.23, 5.99.24, 5.99.36, 5.99.39) also with different
numbers (e.g. 3741MHz). I didn't notice it in the last month or so,
but there were less reboots than usual. Sometimes reboots change the
MHz.
Thomas
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.