Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2002 20:09:57 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>, Julian Elischer <julian@elischer.org>, Alfred Perlstein <bright@mu.org>, <arch@FreeBSD.ORG>, <jhb@FreeBSD.ORG>, <peter@wemm.org>, <jake@locore.ca>
Subject:   Re: gettimeofday() and crhold()/crfree() (was Re:  gettimeofday()andcopyout(). Is copyout() MPSAFE on non-i386 archs? )
Message-ID:  <200202180409.g1I49vj10455@apollo.backplane.com>
References:   <20020218144148.F4583-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
:> The benefits to doing this for squid alone, which must
:> make about 5 gettimeofday() calls per transaction in
:> order to do "correct" logging (IMO, logging is eye candy,
:> though some idiots insist on billing based on post
:> processing log files), are more than significant, they
:> are a doubling of the transaction rate.
:
:Apparently they don't actually look at the timestamps and notice
:that they (the timestamps) are often the same for different
:transactions because the timestamps have low resolution.  You
:can fake the increment, but then you can fake the time too.
:...

    Just a note:  The gettimeofday() has an overhead of only 2-3 uS in
    -current.  Squid would have to be doing an aweful lot of transactions
    for it to matter and even if it did, if that actually turned out to be the
    bottleneck I'll eat my hat.  And if I wind up eating my hat the next 
    thing I'll do is spend the necessary 5 seconds writing a little code
    to make squid only call gettimeofday every 5th time.

						-Matt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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