From owner-freebsd-stable@FreeBSD.ORG Sat Dec 31 03:04:03 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA31F16A422 for ; Sat, 31 Dec 2005 03:04:03 +0000 (GMT) (envelope-from ed@edslocomb.com) Received: from mail.edslocomb.net (dsl231-050-180.sea1.dsl.speakeasy.net [216.231.50.180]) by mx1.FreeBSD.org (Postfix) with SMTP id AA52B43D6A for ; Sat, 31 Dec 2005 03:03:58 +0000 (GMT) (envelope-from ed@edslocomb.com) Received: (qmail 59544 invoked from network); 31 Dec 2005 02:37:53 -0000 Received: from unknown (HELO robotslave) (216.231.50.17) by dsl231-050-180.sea1.dsl.speakeasy.net with SMTP; 31 Dec 2005 02:37:53 -0000 Message-ID: <000c01c60db3$1cb4b5f0$1132e7d8@robotslave> From: "Ed" To: Date: Fri, 30 Dec 2005 18:37:15 -0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Kernel clock for 6-STABLE runs at 1/2 speed in VMware 5.0 - UPDATE (and question) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2005 03:04:03 -0000 Problem recap: Under VMWare 5.0 (and 5.5) running on Windows XP Pro = sp2, and FreeBSD 6-STABLE running as the guest OS, the system clock for = the guest OS runs at exactly 1/2 the rate of the host OS's system clock. This problem could be worked around by setting hint.apic.0.disabled=3D1 = in /boot/loader.conf Other attempts at working around the problem, including setting kern.hz = to something lower than the default 1000 (such as the old default, 100), = did not work. Update -- After an upgrade to VMWare 5.5.1 build-19175 and a fresh build of = RELENG_6 last week, I've found that setting kern.hz to a lower rate is = sufficient to address the problem. Disabling the APIC device is no = longer necessary. So, in /boot/loader.conf, I've got:=20 kern.hz=3D200 and that seems to do the trick. Kudos to whoever made the relevant = improvements. For what it's worth, I've experimented with the setting, and found that = with the appropriate vmware-guestd installed and running in the FreeBSD = 6 guest, the clocks stay properly synched up to kern.hz=3D596, and from = there the guest:host system clockrate ratio degrades more or less = linearly from 1:1 to 1:2 as kern.hz is increased from 596 to 1000 (this = on a 2.4Ghz p4, ymmv). =20 Logs show the occasional expected error "calcru: runtime went backwards = [...] (vmware-guestd)" regardless of kern.hz setting, though they appear = to increase in frequency as the kern.hz rate increases, and increase = dramatically as the rate of 596 is approached and passed. Anyhoo, my question now is: Why was kern.hz (which I'm guessing is an = interrupt frequency for a programmable hardware timer) increased from a = default 100 to a default 1000 in FreeBSD 6? And more concretely, should = I set this rate as high as I reasonably can?