Date: Tue, 24 Apr 2007 13:25:06 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: David G Lawrence <dg@dglawrence.com> Cc: Tim Kientzle <kientzle@freebsd.org>, current@freebsd.org, "Jesper B. Rosenkilde" <jbr@humppa.dk> Subject: Re: Suggestions on Avoiding syscall Overhead Message-ID: <20070424132155.T39145@fledge.watson.org> In-Reply-To: <20070424042102.GI38475@tnn.dglawrence.com> References: <f126fae00704221639l68095de1ye7ce9ba3d921bf20@mail.gmail.com> <20070423113400.GC28587@gw.humppa.dk> <462CD251.9060105@freebsd.org> <20070423161711.GV39474@elvis.mu.org> <462D821F.6030707@freebsd.org> <20070424042102.GI38475@tnn.dglawrence.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 23 Apr 2007, David G Lawrence wrote: > gettimeofday(2) returns microsecond precision, so I don't see how this > could be made accelerated via a mapped global page. time(3) [which is > currently a wrapper for gettimeofday(2)], on the other had, could be put > into such a page since it only updates once a second. If we do this, we will need to be careful, perhaps just in documentation, as it leads to non-monotonicity if multiple time sources are queried sequentially. On systems with reliable hardware characteristics, such as in Mac OS X, precision time querying is supported by providing a kernel-exported estimate of the TSC->realtime rate and offset. This allows zero-system call querying of quite accurate time information. I believe in Mac OS X, this information is exported using a shared memory page so that the cost of getting that information is also low. Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070424132155.T39145>