[Varnish] #609: use more efficient implementation for TIM_mono on Solaris (if gethrtime() exists)
Varnish
varnish-bugs at projects.linpro.no
Sun Dec 27 15:19:50 CET 2009
#609: use more efficient implementation for TIM_mono on Solaris (if gethrtime()
exists)
-------------------------+--------------------------------------------------
Reporter: slink | Owner: phk
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
I noticed that on (Open)Solaris, clock_gettime(CLOCK_MONOTONIC, ..) falls
into a syscall, while neither clock_gettime(CLOCK_REALTIME, ..) nor
gethrtime() need one.
References:
* http://cvs.opensolaris.org/source/xref/onnv/onnv-
gate/usr/src/lib/libc/amd64/sys/__clock_gettime.s#33
* http://cvs.opensolaris.org/source/s?defs=__clock_gettime&project=/onnv
So, for the time being (until this is changed in (Open)Solaris), we save a
systemcall by using gethrtime() for TIM_mono.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/609>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list