> > odp_sched_latency currently uses clock_gettime. It is my understanding
> > that clock_gettime does not have the over head of the system call. Can
> > you elaborate more on the 'improved significantly' part?
> >
> 
> clock_gettime() uses the same TSC, but when you profile it with perf you can 
> see tens of
> kernel functions including system call entry, RCU maintenance, etc.

clock_gettime() does not use the vdso implementation without syscall overhead
on x86 if clock id is CLOCK_MONOTONIC_RAW as it seems to be in ODP. I think
new enough kernels do support CLOCK_MONOTONIC_RAW in vsdo for arm64 though.

CLOCK_MONOTONIC is supported in vdso in x86 and would not cause syscall
overhead provided that the kernel time source is tsc (which it often is,
but not always (e.g. in some VMs)).

        Janne


Reply via email to