Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Sep 2011 22:06:01 +1000
From:      Peter Jeremy <peterjeremy@acm.org>
To:        Manish Vachharajani <manishv@lineratesystems.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: excessive use of gettimeofday(2) and other syscalls
Message-ID:  <20110909120601.GA40207@server.vk2pj.dyndns.org>
In-Reply-To: <CAHRgBhSxiN=KBvN=Ve5cmXY_PtCuivQY1jC87O-D7QRE9qiOqA@mail.gmail.com>
References:  <20110906220115.GA25048@freebsd.org> <CAHRgBhRe8n%2BV3nSzRn4_fctHB1nie2ACk7oRVOPJqqKaMUgKrg@mail.gmail.com> <CAF6rxg=kzHP4zr_=LGnJDUQu-xEwgpy6QN=Lk4jqXa6hs=epKg@mail.gmail.com> <CAHRgBhT%2BKi%2BYPiK%2Bhn=fJ91eA=31tOaTPe_5xLSHQawa=%2BFD0Q@mail.gmail.com> <CAHwLALMwOu8wc5W03dar5fhkWkjN6f7eDGAT4a1u%2BK4eHHSsng@mail.gmail.com> <20110907061741.GC96277@server.vk2pj.dyndns.org> <CAHRgBhSxiN=KBvN=Ve5cmXY_PtCuivQY1jC87O-D7QRE9qiOqA@mail.gmail.com>

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

--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 <manishv@lineratesystems=
=2Ecom> 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--



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