VTIM_real vs VTIM_mono / double vs uint64_t

Martin Blix Grydeland martin at varnish-software.com
Thu Apr 7 11:33:49 CEST 2016


On Thu, 7 Apr 2016 at 08:57 Nils Goroll <slink at schokola.de> wrote:

> In particular, glibc doesn't syscall (!), which I was complete unware of.
>

Linux uses a mechanism called VDSO(7) (Virtual Dynamic Shared Object) for
it's gettimeofday() implementation. It utilizes a shared read-only page
that holds the kernels current time. So the gettimeofday becomes much less
expensive, as you avoid the context switch to read it. Will still be some
memory reads though, so something based around the Intel in-chip clock
would still be faster, though I'd guess not so much faster that it warrants
the added complexity for Varnish' use cases. We do have more platforms to
cater for than Linux though.

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160407/530fd357/attachment.html>


More information about the varnish-dev mailing list