public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: john stultz <johnstul@us.ibm.com>
Cc: Tim Schmielau <tim@physik3.uni-rostock.de>,
	Jerome Borsboom <j.borsboom@erasmusmc.nl>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: process start time set wrongly at boot for kernel 2.6.9
Date: Wed, 20 Oct 2004 16:52:09 -0700	[thread overview]
Message-ID: <4176FA29.2030208@mvista.com> (raw)
In-Reply-To: <1098294178.20778.117.camel@cog.beaverton.ibm.com>

john stultz wrote:
> On Wed, 2004-10-20 at 07:51, George Anzinger wrote:
> 
>>john stultz wrote:
>>
>>>I've begun to agree with you about this issue. It seems that until we
>>>can catch every use of jiffies for time, doing one by one is going to
>>>cause consistency problems.  So I'd support the full backout of the
>>>do_posix_clock_monotonic_gettime changes to the proc interface. 
>>>
>>>George, would you protest this?
>>
>>It seems to me that if we do that we will stop making any changes at all.  I.e. 
>>we will not see the rest of the "jiffies for time" code, as it will not "hurt" 
>>any more.
> 
> 
> Sorry, not sure I followed that. Could you explain further?

If we rip out the code folks will stop sending in bug reports on it.  Simple as 
that.
> 
> 
>>Also, the orgional change was made for a reason...
> 
> 
> Right, but I thought it was you who made the original change, and I
> don't recall you answering what that reason was? I wouldn't want the
> code ripped out if it was fixing an actual problem, so that's why I'm
> asking.

As I recall the problem was that uptime was not matching the elapsed wall clock. 
  This was because it was jiffies based and the 1/HZ assumption was made about 
what a jiffie is.  When jiffies became ~1/HZ instead of =1/HZ we started all the 
"good times".  And, this was done because 1/HZ could not be obtained with the 
PIT interrupt source with enought accuracy to satisfy ntp code.
> 
> At the moment, I'd like the idea I think Tim is suggesting. Where we fix
> time so we have a stable base, then we decouple xtime and jiffies from
> the timer interrupt and instead emulate them from the time code. 

The can of worms here is decoupling jiffies from the timer interrupt.  Jiffies 
is (like it or not) the unit of measure used for timers and these _require_ and 
interrupt AND it should be consistantly within a few 10s of usec of when the 
jiffie changes.
> 
> So rather then every tick incrementing jiffies, instead jiffies is set
> equal to (monotonic_clock()*HZ)/NSEC_PER_SEC. 

As mention by me (a long time ago), this assumes you have a better source for 
the clock than the interrupt.  I would argue that on the x86 (which I admit is 
really deficient) the best long term clock is, in fact, the PIT interrupt.  The 
_best_ clock on the x86, IMHO, is one that used the PIT interrupt as the gold 
standard.  Then one smooths this to eliminate interrupt latency issues and lost 
ticks using the TSC.   The pm_timer is as good as the PIT but suffers from 
access time issues.


-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/


  reply	other threads:[~2004-10-20 23:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-19 18:21 process start time set wrongly at boot for kernel 2.6.9 Jerome Borsboom
2004-10-19 20:11 ` john stultz
2004-10-20  0:42   ` Tim Schmielau
2004-10-20  0:59     ` john stultz
2004-10-20  3:05       ` gradual timeofday overhaul Tim Schmielau
2004-10-20  7:47         ` Len Brown
2004-10-20 15:09           ` George Anzinger
2004-10-20 15:59             ` Richard B. Johnson
2004-10-20 15:17           ` George Anzinger
2004-10-20 17:09           ` Lee Revell
2004-10-20 21:42             ` Len Brown
2004-10-20 18:13         ` john stultz
2004-10-20 14:51       ` process start time set wrongly at boot for kernel 2.6.9 George Anzinger
2004-10-20 17:42         ` john stultz
2004-10-20 23:52           ` George Anzinger [this message]
2004-10-21  0:25             ` john stultz
2004-10-21  1:04               ` George Anzinger
2004-10-27  7:55   ` Tim Schmielau
  -- strict thread matches above, loose matches on Subject: below --
2004-10-19 21:03 Jerome Borsboom

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=4176FA29.2030208@mvista.com \
    --to=george@mvista.com \
    --cc=j.borsboom@erasmusmc.nl \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@physik3.uni-rostock.de \
    /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