public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Reppert <repp0017@tc.umn.edu>
To: Ludootje <ludootje@linux.be>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Uptime counter
Date: Sun, 01 Feb 2004 15:20:18 -0600	[thread overview]
Message-ID: <1075670417.14322.9.camel@minerva> (raw)
In-Reply-To: <1075673274.4047.8.camel@gax.mynet>

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On Sun, 2004-02-01 at 16:07, Ludootje wrote:
> On Sun, 2004-02-01 at 20:51, Matti Aarnio wrote:
> > On Sun, Feb 01, 2004 at 10:41:41PM +0200, Markus Hästbacka wrote:
> > > Hi list,
> > > I wonder does any kernel branch have a uptime counter that doesn't stop
> > > counting at 497 days? Or is a patch needed for the job to
> > > 2.{0,2,4,6} kernel?
> > 
> > Any 64 bit machine since day 1,  but also 2.6 at i386 does work.
> > 
> > > 	Markus
> > 
> > /Matti Aarnio
> 
> It's the first time I hear about the uptime being resetted after 497 days,
> why is this? Is this a mistake or are their reasons for it?

On 32-bit architectures, the uptime counter is only 32 bits wide. Each
"tick" of the counter is worth 1/HZ seconds (IIRC). So, you can get the
number of seconds this will hold with simple math (2^32 * 1/HZ, HZ
being 100 on i386). This is about 497.1 days.

Of course, on 64-bit architectures, the counter will hold 4 billion
times that, which is about as long as the Earth has existed. Apparently
2.6 has come up with a way to deal with this on 32-bit architectures.

Matt

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-02-01 21:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-01 20:41 Uptime counter Markus Hästbacka
2004-02-01 20:51 ` Matti Aarnio
2004-02-01 22:07   ` Ludootje
2004-02-01 21:20     ` Matthew Reppert [this message]
2004-02-01 20:52 ` Måns Rullgård
2004-02-01 21:02 ` Christian Borntraeger
2004-02-01 21:16   ` Markus Hästbacka
2004-02-01 21:27     ` David Weinehall
2004-02-01 21:34       ` Markus Hästbacka
2004-02-01 21:44         ` David Weinehall
2004-02-01 22:07           ` Markus Hästbacka
2004-02-01 22:19             ` David Weinehall
2004-02-01 22:42               ` Markus Hästbacka
2004-02-01 21:56     ` Guillermo Menguez Alvarez
2004-02-01 22:36     ` Paul Jakma
2004-02-01 22:59       ` Markus Hästbacka
2004-02-01 23:04         ` David Weinehall
2004-02-02  7:20           ` Markus Hästbacka
2004-02-02  7:24             ` David Weinehall
2004-02-02  8:59               ` Markus Hästbacka
2004-02-01 23:47       ` Wakko Warner
2004-02-01 21:33   ` Tomasz Torcz
2004-02-01 22:10   ` Ludootje
2004-02-02 17:54   ` Valdis.Kletnieks
2004-02-02 18:37     ` Mike Fedyk
2004-02-04 16:24   ` Bill Davidsen

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=1075670417.14322.9.camel@minerva \
    --to=repp0017@tc.umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludootje@linux.be \
    /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