public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] linux: Remove supports_time64 () from clock_gettime
@ 2021-06-22 15:11 Adhemerval Zanella
0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2021-06-22 15:11 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4ad8b4645c0869431dba632c3ace0061cc613379
commit 4ad8b4645c0869431dba632c3ace0061cc613379
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Jun 15 22:10:26 2021 -0300
linux: Remove supports_time64 () from clock_gettime
It breaks the usage case of live migration like CRIU or similar.
The performance drawback is it would require an extra syscall
on older kernels without 64-bit time support.
Checked on i686-linux-gnu on a 4.15 kernel and on a 5.11 kernel
(with and without --enable-kernel=5.1) and on x86_64-linux-gnu.
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diff:
---
sysdeps/unix/sysv/linux/clock_gettime.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
index 781d05c2fd..cfe9370455 100644
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
@@ -22,7 +22,6 @@
#include <time.h>
#include "kernel-posix-cpu-timers.h"
#include <sysdep-vdso.h>
-#include <time64-support.h>
#include <shlib-compat.h>
/* Get current value of CLOCK and store it in TP. */
@@ -35,19 +34,14 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
# define __NR_clock_gettime64 __NR_clock_gettime
#endif
- if (supports_time64 ())
- {
#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
- r = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
+ r = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
#else
- r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
+ r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
#endif
- if (r == 0 || errno != ENOSYS)
- return r;
-
- mark_time64_unsupported ();
- }
+ if (r == 0 || errno != ENOSYS)
+ return r;
#ifndef __ASSUME_TIME64_SYSCALLS
/* Fallback code that uses 32-bit support. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-22 15:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 15:11 [glibc] linux: Remove supports_time64 () from clock_gettime Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).