This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21305] clock_gettime(CLOCK_MONOTONIC_RAW) can and should use rdtsc instructions instead of entering kernel through VDSO


https://sourceware.org/bugzilla/show_bug.cgi?id=21305

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Jason Vas Dias from comment #2)
> I am using the unmodified Linux 4.10.0 (latest stable git tag).
> 
> 
> In arch/x86/entry/vdso/vclock_gettime.c, 
> clock_gettime(CLOCK_MONOTONIC_RAW,&ts) 
> is handled by :
> 
> notrace static int __always_inline do_monotonic(struct timespec *ts)

Why do you think the code ends up there?  CLOCK_MONOTONIC is not
CLOCK_MONOTONIC_RAW.  Profiling matches that—there is no fast path in the vDSO
for CLOCK_MONOTONIC_RAW.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]