From owner-freebsd-current@FreeBSD.ORG Fri Dec 28 17:57:58 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D5916A419 for ; Fri, 28 Dec 2007 17:57:58 +0000 (UTC) (envelope-from SRS0=mkQ4=RT=tm.uka.de=max.laier@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id C3A3013C45D for ; Fri, 28 Dec 2007 17:57:57 +0000 (UTC) (envelope-from SRS0=mkQ4=RT=tm.uka.de=max.laier@srs.kundenserver.de) Received: from vampire.homelinux.org (dslb-088-066-001-237.pools.arcor-ip.net [88.66.1.237]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1J8JGt2Jwf-0005cK; Fri, 28 Dec 2007 18:45:23 +0100 Received: (qmail 26303 invoked by uid 80); 28 Dec 2007 17:44:48 -0000 Received: from 2001:6f8:12c8:1:21d:60ff:fe0c:1771 (SquirrelMail authenticated user mlaier) by router.laiers.local with HTTP; Fri, 28 Dec 2007 18:44:48 +0100 (CET) Message-ID: <55777.2001:6f8:12c8:1:21d:60ff:fe0c:1771.1198863888.squirrel@router.laiers.local> In-Reply-To: <20071228015651.X1565@odysseus.silby.com> References: <20071228015651.X1565@odysseus.silby.com> Date: Fri, 28 Dec 2007 18:44:48 +0100 (CET) From: "Max Laier" To: "Mike Silbersack" User-Agent: SquirrelMail/1.4.13 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Provags-ID: V01U2FsdGVkX18TnMX3eFuZJF4enaL5oslsyC/3FD3XDsZ2wlI jwSh2Jg99zSe1wYN3gu0gNMapg6Cli8+lGAcBc4bn4SihBDp+P jHaFbo4Zi+Z7Yvj0B3RUQ== X-Mailman-Approved-At: Fri, 28 Dec 2007 18:18:08 +0000 Cc: current@freebsd.org Subject: Re: [patch] Auto-setting hz to 100 inside QEMU/VMWare X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 17:57:58 -0000 Am Fr, 28.12.2007, 09:03, schrieb Mike Silbersack: > > When running FreeBSD inside QEMU / VMWare, one of my pet peeves is that > time is completely inaccurate. This seems to be cured by setting > kern.hz=100 (down from the default of 1000) in /boot/loader.conf, but I'm > getting sick of doing that every time I set up a virtual box. > > So, here's a patch to have the kernel auto-detect that it's running inside > one of those two environments and automatically make that adjustment. > > If you're running FreeBSD inside any other virtual environments > (Parallels? Microsoft Virtual PC?) and can detect them via data in kenv, > I'll be happy to add them to the patch as well. > > I have only tested this patch in QEMU so far, I will test inside VMWare > tomorrow. > > If anyone could review and/or test this, it would be appreciated. > > Thanks, VirtualBox (QEMU based) has hint.acpi.0.oem="VBOX ". -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News