From owner-freebsd-current@FreeBSD.ORG Sat Apr 28 10:39:25 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0872616A410; Sat, 28 Apr 2007 10:39:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id C3CE413C46E; Sat, 28 Apr 2007 10:39:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 29ACF47268; Sat, 28 Apr 2007 06:39:24 -0400 (EDT) Date: Sat, 28 Apr 2007 11:39:24 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <86veflholn.fsf@dwp.des.no> Message-ID: <20070428113752.A28395@fledge.watson.org> References: <20070423113400.GC28587@gw.humppa.dk> <462CD251.9060105@freebsd.org> <20070423161711.GV39474@elvis.mu.org> <462D821F.6030707@freebsd.org> <20070424042102.GI38475@tnn.dglawrence.com> <86veflholn.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1788945292-1177756764=:28395" Cc: Tim Kientzle , David G Lawrence , "Jesper B. Rosenkilde" , current@freebsd.org Subject: Re: Suggestions on Avoiding syscall Overhead X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2007 10:39:25 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1788945292-1177756764=:28395 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 24 Apr 2007, Dag-Erling Sm=F8rgrav wrote: > David G Lawrence writes: >> gettimeofday(2) returns microsecond precision, so I don't see how this= =20 >> could be made accelerated via a mapped global page. time(3) [which is=20 >> currently a wrapper for gettimeofday(2)], on the other had, could be put= =20 >> into such a page since it only updates once a second. > > gettimeofday(2) returns a value in microseconds, but this does not=20 > necessarily mean that it has microsecond precision. Updating it once per= =20 > scheduler tick or once per context switch (in userret(), for instance) is= =20 > probably enough. We have an overall issue with the cost vs prevision of time measurement in= =20 FreeBSD. We err on the side of precision; other systems err on the side of= =20 cost. I'm not sure that gettimeofday() is best optimized in the way you=20 describe, since if we're going to sacrifice precision, we could sacrifice a= =20 lot less precision and still get massively better performance. Robert N M Watson Computer Laboratory University of Cambridge --0-1788945292-1177756764=:28395--