[RFC v3 04/23] sysdeps/clock_gettime: Use clock_gettime64 if avaliable

Florian Weimer fweimer@redhat.com
Thu Jul 18 08:19:00 GMT 2019


* Arnd Bergmann:

> I have two ideas for how that could be done:
>
> - When building for a minimum kernel version of 5.1, don't
>   fall back to __vdso_clock_gettime() or syscall(__NR_clock_gettime)
>   but use the slow path for __clock_gettime64() if the vdso doesn't
>   work.

Assuming that clock_gettime64 support is available, yes.

> - if __vdso_clock_gettime64() is unavailable and __vdso_clock_gettime()
>   returns negative seconds, fall back to syscall(__NR_clock_gettime).

I don't want to do anything like this.  I expect that some of us will
eventually use time namespaces to keep programs running (with incorrect
time).  If we make glibc itself time-sensitive, then things will get
horribly complex.

> Would either of those meet your requirements?

I don't have requirements.  I just want something that has limited
impact on 64-bit architectures.  I don't think probing at startup is too
bad, actually.

Thanks,
Florian



More information about the Libc-alpha mailing list