public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Bruno Haible <bruno@clisp.org>,
	Florian Weimer <fweimer@redhat.com>,
	Paul Eggert <eggert@cs.ucla.edu>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] time: Use CLOCK_REALTIME for time (BZ #30200)
Date: Wed, 8 Mar 2023 14:50:02 -0300	[thread overview]
Message-ID: <f4cd389b-dcb7-afc3-6e62-a4e4c339d376@linaro.org> (raw)
In-Reply-To: <5788439.tzSfqdup6V@nimes>



On 08/03/23 14:44, Bruno Haible wrote:
> Adhemerval Zanella Netto wrote:
>> ... all the trouble gnulib is pushing?
> 
> The trouble does not originate in gnulib; it originate through the
> use of inconsistent time APIs.

Yes I understand it and I agree with that this inconsistency is not
desirable, that exactly why I have sent this patch.  The 'trouble'
I meant all this boilerplate wrapper code you are adding on gnulib
to 'fix' this glibc optimization.

> 
> On a typical system, there are
>   - hundreds of programs that call gettimeofday() or timespec_get(),
>   - hundreds of programs that call time().
> Find attached the lists of programs in /usr/bin on my machine:
>   - 425 programs that call gettimeofday() or timespec_get(),
>   - 730 programs that call time().
> 
> Each time a program calls gettimeofday() or timespec_get(), and then,
> within 1 to 3 milliseconds, a program (the same or a different one)
> calls time(), there is the potential for trouble because the time
> appears to go backwards. This trouble can occur with probability
> between 0.1% and 0.3%, according to the data in
> https://sourceware.org/bugzilla/show_bug.cgi?id=30200 .
> 
> Gnulib attempts to reduce the trouble for specific programs, by
> moving them from the "call time()" camp to the "call gettimeofday() or
> timespec_get()" camp.
> 
> Bruno
> 

      reply	other threads:[~2023-03-08 17:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 16:03 Adhemerval Zanella
2023-03-07 11:11 ` Florian Weimer
2023-03-07 11:45   ` Adhemerval Zanella Netto
2023-03-07 11:51     ` Florian Weimer
2023-03-07 11:57       ` Adhemerval Zanella Netto
2023-03-07 12:07         ` Florian Weimer
2023-03-08  5:51           ` Paul Eggert
2023-03-08  8:59             ` Florian Weimer
2023-03-08 23:08               ` Paul Eggert
2023-03-08 16:23             ` Bruno Haible
2023-03-08 16:57               ` Adhemerval Zanella Netto
2023-03-08 17:09                 ` Florian Weimer
2023-03-08 17:46                   ` Adhemerval Zanella Netto
2023-03-08 17:44                 ` Bruno Haible
2023-03-08 17:50                   ` Adhemerval Zanella Netto [this message]

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

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

  git send-email \
    --in-reply-to=f4cd389b-dcb7-afc3-6e62-a4e4c339d376@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=bruno@clisp.org \
    --cc=eggert@cs.ucla.edu \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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).