clock_gettime_mono in the VFS.
Ralph Boehme
rb at sernet.de
Fri Mar 4 20:52:35 UTC 2016
On Fri, Mar 04, 2016 at 11:28:15AM -0800, Jeremy Allison wrote:
> On Fri, Mar 04, 2016 at 01:18:20PM -0500, Ira Cooper wrote:
> > I'm sorry that I'm coming in late on this one. I've been a bit head down
> > recently.
> >
> > On some platforms clock_gettime_mono has a real measurable cost, alas. I
> > discovered this on Solaris/Illumos when I compiled in the timing code in
> > the samba 3.6 profiling framework.
>
> Just to follow up, I was OK with this in the review as at least on x86-64-linux, the
> gettime calls aren't even real system calls - just a memcpy. It's
> different on ARM I know.
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/1.3/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-General_System_Tuning-gettimeofday_speedup.html
>
> > I can understand why you'd want this on Linux, getting this data is pretty
> > painful, especially on older kernels.
> >
> > But it should be a compile time option, so we don't impose a cost on
> > platforms where it has real cost, and on people who don't want it.
> >
> > Hopefully this is something we can add. :)
> >
> > Note: I expect over-time, this type of profiling will go down in
> > usefulness. Linux tools to do this type of measurement are improving
> > quickly, and dtrace can do it fairly well on other platforms.
> >
> > But today.... I totally get it, I just don't want us to regress on other
> > platforms.
>
> Fair enough - if you want to add something that allows this
> as a configure-time option I'm happy to review. I'd suggest
> it's on by default - that allows vendors who really
> don't want it to disable. Ralph, do you agree ?
yes.
Not sure, but one way to do it could be to make it part of
--with-profiling-data, which would mean it'd be disabled by
default. That would do it for my use case.
Fwiw, it seems on Solaris one would use gethrtime for this kind of
task:
<http://docs.oracle.com/cd/E23824_01/html/821-1465/gethrtime-3c.html>
<https://www.varnish-cache.org/trac/ticket/609>
-Ralph
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
More information about the samba-technical
mailing list