Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2005 13:41:33 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Norikatsu Shigemura <nork@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, bde@zeta.org.au
Subject:   Re: cvs commit: src/sys/sys time.h src/sys/kern kern_time.c
Message-ID:  <20051127133552.U81764@fledge.watson.org>
In-Reply-To: <20051127223509.8913eafe.nork@FreeBSD.org>
References:  <200511270055.jAR0tIkF032480@repoman.freebsd.org> <20051127005622.H81764@fledge.watson.org> <20051127234937.X28222@delplex.bde.org> <20051127131838.F81764@fledge.watson.org> <20051127223509.8913eafe.nork@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 27 Nov 2005, Norikatsu Shigemura wrote:

> On Sun, 27 Nov 2005 13:23:00 +0000 (GMT)
> Robert Watson <rwatson@freebsd.org> wrote:
>>> time(3) should use the environment variable too, since the fast version
>>> gives a value that is both imprecise and wrong.  It inherits bugs from
>>> the kernel's time_second variable.  time_second is not the current time
>>> truncated, but is the (current time less up to about tc_tick/HZ)
>>> truncated.  It lags the current time by more than 1 second for up to
>>> about tc_tick/HZ seconds before every rollover of the correct truncated
>>> time.
>> Yes -- this is a mistake in the current library wrapper.  All interfaces
>> modified to be "fast" or "precise" should be controlled by the
>> environmental variable so that testing is more consistent (i.e., other
>> than wrapping costs, the non-configured version should behave identically
>> to the non-wrapped version).
>
> 	I think that to use libmap.conf(5) is a best solution:-), if
> 	someone want to use low resolution version.  I didn't confirm
> 	following setting:
>
> # All binaries use low resolution version on /usr/local/bin/
> [/usr/local/bin/]
> libc.so.6	libwrapper.so.1
>
> 	Of cource, you can use mysql only, and no more controll by
> 	environment variable.

In the general case -- i.e., if the wrapper were going to be for more than 
testing -- I'd agree.  However, the wrapper is designed to support 
automated testing without dealing with system-wide configuration files. 
:-)  For those wishing to pick up the latest wrapper code, it's in 
//depot/user/rwatson/clock/src/lib/libwrapper in Perforce.

Robert N M Watson



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051127133552.U81764>