From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 9 12:06:09 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BDD2106566C for ; Fri, 9 Sep 2011 12:06:09 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id EC3788FC08 for ; Fri, 9 Sep 2011 12:06:08 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p89C64SG011051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Sep 2011 22:06:06 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.5/8.14.4) with ESMTP id p89C63iB065299; Fri, 9 Sep 2011 22:06:03 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id p89C62fW065175; Fri, 9 Sep 2011 22:06:02 +1000 (EST) (envelope-from peter) Date: Fri, 9 Sep 2011 22:06:01 +1000 From: Peter Jeremy To: Manish Vachharajani Message-ID: <20110909120601.GA40207@server.vk2pj.dyndns.org> References: <20110906220115.GA25048@freebsd.org> <20110907061741.GC96277@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: excessive use of gettimeofday(2) and other syscalls X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 12:06:09 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Sep-07 12:41:54 -0600, Manish Vachharajani wrote: >This is great info, thanks. Is it worth having some kind of >environment variable tunable (or even compile time tunable) to have a >"fast" gettimeofday then? Maybe. rwatson@ produced a preloadable .so to do this - see http://www.watson.org/~robert/freebsd/clock/ > Is there a complimentary body of code that >assumes gettimeofday is precise? I'm not aware of any but it's not necessarily trivial to identify such code - it's unlikely to fail outright but instead may deliver results that may not be as accurate as the author intended. I think a better way of looking at the problem is that some code was designed on the assumption that certain operations were cheap and therefore uses those operations more freely than it would have had those operations been more expensive. --=20 Peter Jeremy --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk5qASkACgkQ/opHv/APuIdg7wCePFYfNxkvqHlFoKgEE2PctPCI M/YAoKCLIvPpSPXM5GgitK11RmiC/8SH =mjFy -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--