mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Kingsley Cheung <kingsley@aurema.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [Bug 764] New: btime in /proc/stat wobbles (even over 30 seconds)
Date: 20 Jun 2003 17:34:39 -0700	[thread overview]
Message-ID: <1056155679.1028.22.camel@w-jstultz2.beaverton.ibm.com> (raw)
In-Reply-To: <20030612112011.C29095@aurema.com>

On Wed, 2003-06-11 at 18:20, Kingsley Cheung wrote:

> I see that there has been a fix made for this since 2.5.70-bk13 or
> 2.5.70-bk14 that solves this problem by using the seqlock to ensure
> that the jiffies and time of day are atomically read.

And further then that, we loose less precision in some of the math so we
don't have the single second wobbles that were initially seen. 


> However, wouldn't it be better to have the boottime calculated only
> once so that it is independent of changes in the system time that may
> occur later?  Even with the fix with seqlock, the boottime can still
> change back or forwards whenever the system time is set back or
> forwards.  IMHO an unchanging boottime that is independent of the time
> of day is the best approach.  Maybe something like the patch against
> 2.5.70-bk14 that I've attached.
> 
> What do people think?

Really, I'm fine with the current semantics. At boot time the system
clock may not have been correct, and was corrected only after NTP
started up later in the boot sequence. So you could have some very funky
btimes. 

Even the current definition of btime = now - uptime has its own quirks
(when systems are suspended uptime doesn't increment, etc) but I think
its more likely to be correct then any other method (assuming the time
now is more accurate then time at boot thanks to ntp or whatnot). 

I'm curious, how are people using the btime value? I'd think uptime and
gettimeofday would be more useful bits of info, so I'd like to hear
more.

thanks
-john



  reply	other threads:[~2003-06-21  0:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-02 15:02 Martin J. Bligh
2003-06-02 15:08 ` Mike Dresser
2003-06-05  7:19   ` Kingsley Cheung
2003-06-06  2:26     ` Kingsley Cheung
2003-06-06  8:32       ` Herbert Xu
2003-06-06 12:08         ` Kingsley Cheung
2003-06-12  1:20 ` Kingsley Cheung
2003-06-21  0:34   ` john stultz [this message]
2003-06-25 23:47     ` Kingsley Cheung

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=1056155679.1028.22.camel@w-jstultz2.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=kingsley@aurema.com \
    --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®