unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Linux: Use 32-bit vDSO for clock_gettime, gettimeofday, time (bug 28071)
Date: Mon, 12 Jul 2021 08:55:33 -0300	[thread overview]
Message-ID: <d41ca0ba-1808-157f-39aa-57a3712270ae@linaro.org> (raw)
In-Reply-To: <878s2bdddm.fsf@oldenburg.str.redhat.com>



On 12/07/2021 07:40, Florian Weimer wrote:
> * 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.

Yes and this how we initially decided to provide 64-bit time_t support,
where 32-bit implementations are done on top of 64-bit ones.  I am not
very fond of starting to adding 32-bit specific implementations, the
complexity to fix some specific cases do not really pay in the long
term imho.  

We might also add back the global time64 internal variable that indicates
if the kernel supports 64-bit (removed by 9465c3a9fb557), but it also has
its ow issues (live migration like CRIU).

  reply	other threads:[~2021-07-12 11:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 17:15 [PATCH] Linux: Use 32-bit vDSO for clock_gettime, gettimeofday, time (bug 28071) Florian Weimer via Libc-alpha
2021-07-10 18:22 ` Adhemerval Zanella via Libc-alpha
2021-07-10 18:54   ` Florian Weimer via Libc-alpha
2021-07-10 19:57     ` Adhemerval Zanella via Libc-alpha
2021-07-10 20:00       ` Florian Weimer via Libc-alpha
2021-07-10 20:03         ` Adhemerval Zanella via Libc-alpha
2021-07-10 20:30         ` Adhemerval Zanella via Libc-alpha
2021-07-12 10:40           ` Florian Weimer via Libc-alpha
2021-07-12 11:55             ` Adhemerval Zanella via Libc-alpha [this message]
2021-07-12 13:15               ` Florian Weimer via Libc-alpha
2021-07-12 14:20                 ` Adhemerval Zanella via Libc-alpha
2021-07-12 14:29                   ` Florian Weimer via Libc-alpha
2021-07-12 15:46                     ` Adhemerval Zanella via Libc-alpha
2021-07-12 17:55                       ` Florian Weimer via Libc-alpha
2021-07-12 18:00                         ` Adhemerval Zanella via Libc-alpha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d41ca0ba-1808-157f-39aa-57a3712270ae@linaro.org \
    --to=libc-alpha@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).