[PATCH] Linux: Use 32-bit vDSO for clock_gettime, gettimeofday, time (bug 28071)
Florian Weimer
fweimer@redhat.com
Mon Jul 12 10:40:05 GMT 2021
* Adhemerval Zanella:
> Using the test (a slight modified one from the bug report):
>
> --
> #include <time.h>
> #include <stdio.h>
> #include <errno.h>
>
> int
> main (void)
> {
> struct timespec ts;
> errno = 0;
> clock_gettime (CLOCK_REALTIME, &ts);
> printf ("errno = %m (%d)\n", errno);
> errno = 0;
> clock_gettime (CLOCK_MONOTONIC, &ts);
> printf ("errno = %m (%d)\n", errno);
> }
> --
>
> I see no syscall on 5.11 kernel, only a clock_gettime (CLOCK_MONOTONIC)
> on the 4.4 and a clock_gettime_time64 plus a clock_gettime on the 3.10.
This still introduces a severe performance regression on older kernels.
It may well make some exsting 32-bit applications unusable until the
kernel is upgraded. I'm not sure if this is a good idea.
At least I can see that the clobbering of errno is gone.
Thanks,
Florian
More information about the Libc-alpha
mailing list