From owner-freebsd-emulation@FreeBSD.ORG Thu Sep 9 17:30:54 2004 Return-Path: Delivered-To: freebsd-emulation@freebsd.org 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) To: From: "Paul Seniura" Errors-To: "Paul Seniura" Sender: "Paul Seniura" X-send-pr-version: 3.113 X-GNATS-Notify: Message-Id: <20040909172956.4A6095C13@techpc04.okladot.state.ok.us> Date: Thu, 9 Sep 2004 12:29:56 -0500 (CDT) X-ODOT-MailScanner-Information: Please contact the Help Desk for more information X-ODOT-MailScanner: This E-mail appears not to contain malware. X-ODOT-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-7.4, required 5, BAYES_01 -6.60, FVGT_u_BZ_TLD 2.40, J_CHICKENPOX_31 1.00, J_CHICKENPOX_32 1.00, J_CHICKENPOX_42 1.00, PATCH_UNIFIED_DIFF -6.30, RCVD_IN_ORBS 0.12) X-MIMETrack: Itemize by SMTP Server on Notes9c/ODOT(Release 6.5.1|January 21, 2004) at 09/09/2004 12:31:08 PM,at 09/09/2004 12:31:10 PM, Serialize complete at 09/09/2004 12:31:10 PM cc: knu@idaemons.org cc: freebsd-emulation@freebsd.org Subject: emulators/rtc: kernel msg "rtc: [number] > kern.hz: Timing will be inaccurate, please increase hz." issued even when [number] == kern.hz X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Seniura List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 17:30:54 -0000 >Submitter-Id: current-users >Originator: "Paul Seniura" >Organization: State of Okla. D.O.T. >Confidential: no >Synopsis: emulators/rtc: kernel msg "rtc: [number] > kern.hz: Timing will be inaccurate, please increase hz." issued even when [number] == kern.hz >Severity: non-critical >Priority: medium >Category: ports >Class: sw-bug >Release: FreeBSD 6.0-CURRENT i386 >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.