Date: Sat, 6 Jan 2018 22:56:48 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327651 - stable/11/sys/amd64/vmm/io Message-ID: <201801062256.w06MumgA001560@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Sat Jan 6 22:56:48 2018 New Revision: 327651 URL: https://svnweb.freebsd.org/changeset/base/327651 Log: MFC r325108: Improve the performance of the hpet timer in bhyve guests by making the timer frequency a power of two. This changes the frequency from 10 to 16.7 MHz (2 ^ 24 HZ). Using a power of two avoids roundoff errors when doing arithmetic in sbintime_t units. Testing shows this can fix erratic ntpd behavior in guests using the hpet timer (which is the default for multicore guests). Modified: stable/11/sys/amd64/vmm/io/vhpet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/io/vhpet.c ============================================================================== --- stable/11/sys/amd64/vmm/io/vhpet.c Sat Jan 6 21:37:23 2018 (r327650) +++ stable/11/sys/amd64/vmm/io/vhpet.c Sat Jan 6 22:56:48 2018 (r327651) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_VHPET, "vhpet", "bhyve virtual hpet"); -#define HPET_FREQ 10000000 /* 10.0 Mhz */ +#define HPET_FREQ 16777216 /* 16.7 (2^24) Mhz */ #define FS_PER_S 1000000000000000ul /* Timer N Configuration and Capabilities Register */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801062256.w06MumgA001560>