From owner-freebsd-virtualization@FreeBSD.ORG Sat Apr 11 06:41:57 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48275B75 for ; Sat, 11 Apr 2015 06:41:57 +0000 (UTC) Received: from family.redbarn.org (family.redbarn.org [24.104.150.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E3E284E for ; Sat, 11 Apr 2015 06:41:56 +0000 (UTC) Received: from [IPv6:2001:559:8000:cb:447:ba78:32f4:47fd] (unknown [IPv6:2001:559:8000:cb:447:ba78:32f4:47fd]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by family.redbarn.org (Postfix) with ESMTPSA id 87EA31813C; Sat, 11 Apr 2015 06:41:54 +0000 (UTC) Message-ID: <5528C230.8070406@redbarn.org> Date: Fri, 10 Apr 2015 23:41:52 -0700 From: Paul Vixie User-Agent: Postbox 3.0.11 (Windows/20140602) MIME-Version: 1.0 To: Neel Natu Subject: Re: bhyve clock problem, solved by kern.timecounter.hardware="TSC-low" in /etc/sysctl.conf References: <552809F4.6070206@redbarn.org> In-Reply-To: X-Enigmail-Version: 1.2.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 06:41:57 -0000 Neel Natu wrote: > Hi Paul, > > On Fri, Apr 10, 2015 at 10:35 AM, Paul Vixie wrote: >> ... >> >> can we make TSC-low the default? >> > > The choice of using the TSC is not without issues: > > - As rstone@ points out the TSCs need to be synchronized across physical cpus. ok, then the reason i'm not seeing this is i have a single 6-core CPU. (ntpd would complain about clocks going backward.) > - Depending on system load the guest's estimate of the TSC frequency > might be way off the mark. i see what you mean. > So, in a way the HPET or the ACPI time counters are better since both > the host and guest agree on the frequency. But it seems there is > either an issue with the emulation or an artifact due to the > guest-to-host round trip time. to be fair, some of my bhyve's ran fast (so, positive adjustments by ntpd), some ran slow (negative adjustments). i did not try every possible timecounter hardware; TSC-low fixed it, so i stopped. > I have been doing experiments but don't have anything conclusive yet. thanks for looking into it. paravirtualization (kvm-clock or some equivalent) seems desirable. -- Paul Vixie