From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 9 17:40:28 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6342316A4CF for ; Thu, 9 Sep 2004 17:40:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FCAA43D55 for ; Thu, 9 Sep 2004 17:40:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i89HeSSH009835 for ; Thu, 9 Sep 2004 17:40:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i89HeSxr009834; Thu, 9 Sep 2004 17:40:28 GMT (envelope-from gnats) Resent-Date: Thu, 9 Sep 2004 17:40:28 GMT Resent-Message-Id: <200409091740.i89HeSxr009834@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Paul Seniura" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D83416A4CE; Thu, 9 Sep 2004 17:30:54 +0000 (GMT) Received: from odot.okladot.state.ok.us (odot.okladot.state.ok.us [192.149.244.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDC8443D39; Thu, 9 Sep 2004 17:30:53 +0000 (GMT) (envelope-from root@techpc04.okladot.state.ok.us) Received: from notes9c.okladot.state.ok.us (notes9c.okladot.state.ok.us [10.36.36.31])MAA31600; Thu, 9 Sep 2004 12:30:30 -0500 Received: from isdmon2.okladot.state.ok.us ([192.149.244.24]) by notes9c.okladot.state.ok.us (Lotus Domino Release 6.5.1) with ESMTP id 2004090912310868-74649 ; Thu, 9 Sep 2004 12:31:08 -0500 Received: from techpc04.okladot.state.ok.us (techpc04.okladot.state.ok.us [199.27.9.37])i89HU1LR016962; Thu, 9 Sep 2004 12:30:01 -0500 (CDT) (envelope-from root@techpc04.okladot.state.ok.us) Received: by techpc04.okladot.state.ok.us (Postfix, from userid 0) id 4A6095C13; Thu, 9 Sep 2004 12:29:56 -0500 (CDT) Message-Id: <20040909172956.4A6095C13@techpc04.okladot.state.ok.us> Date: Thu, 9 Sep 2004 12:29:56 -0500 (CDT) From: "Paul Seniura" Sender: "Paul Seniura" To: X-Send-Pr-Version: 3.113 cc: knu@idaemons.org cc: freebsd-emulation@FreeBSD.org Subject: ports/71536: emulators/rtc: kernel msg "rtc: [number] > kern.hz: Timing will be inaccurate, please increase hz." issued even when [number] == kern.hz X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Seniura List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 17:40:28 -0000 >Number: 71536 >Category: ports >Synopsis: emulators/rtc: kernel msg "rtc: [number] > kern.hz: Timing will be inaccurate, please increase hz." issued even when [number] == kern.hz >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 09 17:40:27 GMT 2004 >Closed-Date: >Last-Modified: >Originator: "Paul Seniura" >Release: FreeBSD 6.0-CURRENT i386 >Organization: State of Okla. D.O.T. >Environment: System: FreeBSD techpc04.okladot.state.ok.us 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Wed Sep 8 13:47:43 CDT 2004 root@techpc04.okladot.state.ok.us:/usr/obj/src/sys/IBM300SY_4BSD_Os i386 >Description: We see the kernel msg: rtc: [number] > kern.hz: Timing will be inaccurate, please increase hz. on the console as well as in /var/log/messages (maybe dmesg) even when [number] and kern.hz are the same value or close to each other. >How-To-Repeat: (1) Choose a suitable kern.hz value that your machine can handle. For the "puny p2" I'm using here at work, I set this to 512 for testing. (2) Add a line in your /boot/loader.conf to set kern.hz to the same value e.g. for me: kern.hz="512" . (3) Compile the port multimedia/mplayer with WITH_RTC=yes and WITH_KERN_HZ=[number] set in your /etc/make.conf e.g. for me: WITH_KERN_HZ=512 . (4) Compile & install emulators/rtc normally. Load rtc.ko and ensure /dev/rtc is ready to be used etc. (5) Test the freshly-built mplayer with any supported sound file i.e. something simple. I test this on a local ttyv session with no X running at all. (6) Look at your console and/or /var/log/messages (maybe dmesg) to see the 'Timing will be inaccurate' msg is logged. >Fix: I don't know much about this, but it sure seems rtc.c is comparing apples with soccerballs ;) . I have been using the following patch for many many weeks so far: ===cut-here=== diff -ur files_orig/rtc.c files/rtc.c --- files_orig/rtc.c Thu Jun 24 08:54:46 2004 +++ files/rtc.c Wed Sep 8 17:11:56 2004 @@ -268,7 +268,7 @@ break; } sc->var.freq = freq; - if (sc->var.freq * 9 > hz * 8) { + if (sc->var.freq > hz) { sc->var.freq = hz; printf("rtc: %d > kern.hz: Timing will be inaccurate, please increase hz.\n", sc->var.freq); } ===cut-here=== FWIW I will usually use 500 for kern.hz et al. as it is more evenly-divisable for other related system parms. Also FWIW this "puny p2" machine really slows down if kern.hz gets close to or over 1000 for kern.hz; this slowdown really shows while running KDE or Gnome. At any rate, I'm not so interested in atomic-level accuracy here, but rather have a cleaner log, since this particular msg is issued every single time mplayer is invoked. ;) Besides, wouldn't the accuracy be 'best' if both were set to exactly the same value? -- thx, Paul Seniura System Specialist State of Okla. D.O.T. >Release-Note: >Audit-Trail: >Unformatted: