On Thu, 7 Apr 2016 at 08:57 Nils Goroll <[email protected]> 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
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to