From owner-freebsd-ports@FreeBSD.ORG Fri Apr 29 23:27:25 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 93427106564A; Fri, 29 Apr 2011 23:27:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Fri, 29 Apr 2011 19:27:11 -0400 User-Agent: KMail/1.6.2 References: <430fcb25aefc374bf256e45e3151de15@bluelife.at> In-Reply-To: <430fcb25aefc374bf256e45e3151de15@bluelife.at> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Ql0uN0E9ZXdthKb" Message-Id: <201104291927.12924.jkim@FreeBSD.org> Cc: Bernhard Froehlich , freebsd-ports@freebsd.org Subject: Re: Call for Testers: VirtualBox 4.0.6 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2011 23:27:25 -0000 --Boundary-00=_Ql0uN0E9ZXdthKb Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 22 April 2011 07:01 am, Bernhard Froehlich wrote: > It's about two months since the last call for testers and a lot of > bugfixing has happened since then. Not all of the reported problems > were FreeBSD related which is a good indication that we're not too > far behind the stability of the other hosts. So let's get it one > once again. > > Last time I asked for some help and Baptiste Daroussin (bapt@) made > the classic mistake to respond. So all please welcome bapt to the > FreeBSD Vbox Team! > > This is also the first time that we provide FreeBSD binary > packages. They are build for FreeBSD 7.4 and 8.2 on i386 and amd64 > platform and have the DEBUG option enabled. If you use a STABLE > kernel you can use the virtualbox-ose-4.0.6-*-RELEASE-*.tbz binary > package but have to compile the kernel module port for your kernel > yourself. > (emulators/virtualbox-ose-kmod) For very long time, I had a serious performance/timer issues with VirtualBox where TSC is not constant and timecounter hardware is not TSC. Today, I finally found a workaround (please see the attached patch). With this patch, TSC frequency is quite reasonable now. Basically, we were using nano(up)time(9) and they were too expensive for VirtualBox timekeeping. I believe it is okay to use getnano(up)time(9) here because a) VirtualBox already assumes these calls do not return accurate time (unless high-res timer is available, i.e., Linux) and b) we already report timer granularity is equal to kern.hz via RTTimerGetSystemGranularity(). Any thoughts? Thanks for your hard work! Jung-uk Kim --Boundary-00=_Ql0uN0E9ZXdthKb Content-Type: text/plain; charset="iso-8859-1"; name="patch-src-VBox-Runtime-r0drv-freebsd-time-r0drv-freebsd.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-src-VBox-Runtime-r0drv-freebsd-time-r0drv-freebsd.c" --- src/VBox/Runtime/r0drv/freebsd/time-r0drv-freebsd.c.orig 2011-04-21 06:31:45.000000000 -0400 +++ src/VBox/Runtime/r0drv/freebsd/time-r0drv-freebsd.c 2011-04-29 18:57:26.000000000 -0400 @@ -41,7 +41,7 @@ RTDECL(uint64_t) RTTimeNanoTS(void) { struct timespec tsp; - nanouptime(&tsp); + getnanouptime(&tsp); return tsp.tv_sec * UINT64_C(1000000000) + tsp.tv_nsec; } @@ -68,6 +68,6 @@ RTDECL(uint64_t) RTTimeSystemMilliTS(voi RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPEC pTime) { struct timespec tsp; - nanotime(&tsp); + getnanotime(&tsp); return RTTimeSpecSetTimespec(pTime, &tsp); } --Boundary-00=_Ql0uN0E9ZXdthKb--