mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Paul Eggert <eggert@cs.ucla.edu>, bug-gnulib <bug-gnulib@gnu.org>
Subject: Re: nanosleep truncated on 64 bit Linux by 292 billion years
Date: Tue, 28 Oct 2014 16:45:00 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1410281644070.5308@nanos> (raw)
In-Reply-To: <544DC3A8.1060103@draigBrady.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 775 bytes --]

On Mon, 27 Oct 2014, Pádraig Brady wrote:
> I noticed that nanosleep() on 64 bit, "only" supports 292 years,
> rather than the full potential 292 billion years with 64 bit time_t, due to:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/time.h?id=refs/tags/v3.16#n87
> 
> Attached is a program from Paul Eggert that illustrates the bug.
> Running this program on a buggy host outputs something like this:
> 
>   Setting alarm for 1 second from now ...
>   Sleeping for 9223372036854775807.999999999 seconds...
>   After alarm sent off, remaining time is 9223357678.462306617 seconds;
>   i.e., nanosleep claimed that it slept for about 293079448610.606445 years.

I'm aware of the issue. It's on my ever growing todo list.

Thanks,

	tglx

      reply	other threads:[~2014-10-28 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53E0FF15.4090808@draigBrady.com>
     [not found] ` <53E13F04.70609@cs.ucla.edu>
     [not found]   ` <alpine.DEB.2.10.1408060017090.3323@nanos>
2014-10-27  4:01     ` Pádraig Brady
2014-10-28 15:45       ` Thomas Gleixner [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=alpine.DEB.2.11.1410281644070.5308@nanos \
    --to=tglx@linutronix.de \
    --cc=P@draigBrady.com \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®