From owner-freebsd-current@FreeBSD.ORG Fri Dec 28 08:39:19 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 19DFD16A417 for ; Fri, 28 Dec 2007 08:39:19 +0000 (UTC) (envelope-from gary@vsnx.net) Received: from longhorn.velocity-servers.net (longhorn.velocity-servers.net [65.99.246.30]) by mx1.freebsd.org (Postfix) with ESMTP id CDB9813C442 for ; Fri, 28 Dec 2007 08:39:18 +0000 (UTC) (envelope-from gary@vsnx.net) Received: from pool-70-106-59-217.hag.east.verizon.net ([70.106.59.217] helo=dragoon.vsnx.net) by longhorn.velocity-servers.net with esmtpa (Exim 4.68 (FreeBSD)) (envelope-from ) id 1J8ATL-000FEz-3J; Fri, 28 Dec 2007 02:21:39 -0600 X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Fri, 28 Dec 2007 03:21:38 -0500 To: Mike Silbersack ,current@freebsd.org From: "G. Stanley" In-Reply-To: <20071228015651.X1565@odysseus.silby.com> References: <20071228015651.X1565@odysseus.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - longhorn.velocity-servers.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [26 6] / [26 6] X-AntiAbuse: Sender Address Domain - vsnx.net Message-Id: <20071228083918.CDB9813C442@mx1.freebsd.org> Cc: 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 08:39:19 -0000 At 03:03 AM 12/28/2007, Mike Silbersack wrote: >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. I had a diff, but I lost it due to hardware crash... Anyways, I've tested your patch with VMWare and it works perfectly.