public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: vatsa@in.ibm.com
Cc: Con Kolivas <kernel@kolivas.org>, Adrian Bunk <bunk@stusta.de>,
	linux-kernel@vger.kernel.org, ck@vds.kolivas.org,
	tony@atomide.com, tuukka.tikkanen@elektrobit.com,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 5
Date: Wed, 10 Aug 2005 15:37:45 -0700	[thread overview]
Message-ID: <42FA81B9.9020801@mvista.com> (raw)
In-Reply-To: <20050810140528.GA20893@in.ibm.com>

Srivatsa Vaddagiri wrote:
> On Tue, Aug 09, 2005 at 12:36:58PM -0700, George Anzinger wrote:
> 
>>IMNOHO, this is the ONLY way to keep proper time.  As soon as you 
>>reprogram the PIT you have lost track of the time.
> 
> 
> George,
> 	Can't TSC (or equivalent) serve as a backup while PIT is disabled,
> especially considering that we disable PIT only for short duration 
> in practice (few seconds maybe) _and_ that we don't have HRT support yet?
> 
I think it really depends on what you want.  If you really want to keep 
good time, the only rock in town is the one connected to the PIT (and 
the pmtimer).  The problem is, if you want the jiffie edge to be stable, 
there is just now way to reprogram the PIT to get it back to where it was.

In an old version of HRT I did a trick of loading a short count (based 
on reading the TSC or pmtimer) and then put the LATCH count on top of 
it.  In a correctly performing PIT, it should count down the short 
count, interrupt, load the long count and continue from there.  Aside 
from the machines that had BAD PITs (they reset on the load instead of 
the expiry of the current count) there were other problems that, in the 
end, cause loss of time (too fast, too slow, take your pick).  I also 
found PITs that signaled that they had loaded the count (they set a 
status bit) prior to actually loading it.  All in all, I find the PIT is 
just an ugly beast to try to program.  On the other hand, if you want 
regular interrupts at some fixed period, it will do this forever (give 
or take a epoch or two;) with out touching anything after the initial 
program set up.

In the end, I concluded that, for the community kernel, it is really 
best to just interrupt the irq line and leave the PIT run.  Then you use 
the TSC or pmtimer to figure the gross loss of interrupts and leave the 
PIT interrupt again to define the jiffie edge.  If you have other, more 
pressing, concerns I suppose you can program the PIT, but don't expect 
your wall clock to be as stable as it is now.

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

  reply	other threads:[~2005-08-10 22:40 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-03  5:59 [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3 Con Kolivas
2005-08-03 11:54 ` Jan De Luyck
2005-08-03 12:14   ` Con Kolivas
2005-08-03 14:23     ` Jan De Luyck
2005-08-04 15:03       ` Vojtech Pavlik
2005-08-05  5:12         ` Con Kolivas
2005-08-03 19:20 ` Jim MacBaine
2005-08-03 21:16   ` Con Kolivas
2005-08-03 22:22     ` Jim MacBaine
2005-08-03 22:52       ` Con Kolivas
2005-08-04  5:34         ` Jim MacBaine
2005-08-04  6:59           ` Jim MacBaine
2005-08-04  7:04             ` Con Kolivas
2005-08-04  7:12               ` Con Kolivas
2005-08-04  7:29                 ` Tony Lindgren
2005-08-10 20:04             ` Bill Davidsen
2005-08-14 19:47         ` Pavel Machek
2005-08-15  1:43           ` Zwane Mwaikambo
2005-08-15 12:52             ` Con Kolivas
2005-08-15 15:39               ` Zwane Mwaikambo
2005-08-03 19:54 ` Jeffrey Hundstad
2005-08-03 20:07   ` Valdis.Kletnieks
2005-08-03 21:13   ` Con Kolivas
2005-08-03 23:22 ` Christian Leber
2005-08-04 16:25   ` Marc Ballarin
2005-08-04  5:09 ` Jan De Luyck
2005-08-04  5:07   ` Con Kolivas
2005-08-04  5:34     ` Jan De Luyck
2005-08-04 21:15 ` [PATCH] Timer Top was: " Daniel Petrini
2005-08-05  4:05   ` [PATCH] Timer Top tweaks Con Kolivas
2005-08-05  6:46   ` [ck] [PATCH] Timer Top was: i386 No-Idle-Hz aka Dynamic-Ticks 3 Jens Axboe
2005-08-05 12:39     ` Daniel Petrini
2005-08-05 13:55       ` Daniel Petrini
2005-08-04 21:44 ` [PATCH] " Adrian Bunk
2005-08-04 22:12 ` Marc Ballarin
2005-08-05  0:31   ` Con Kolivas
2005-08-05  1:30 ` Paul
2005-08-05  3:25   ` Con Kolivas
2005-08-05 12:37 ` Srivatsa Vaddagiri
2005-08-05 13:08   ` Con Kolivas
2005-08-05 16:39     ` [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 4 Con Kolivas
2005-08-06 17:47       ` Adrian Bunk
2005-08-07  5:12         ` [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 5 Con Kolivas
2005-08-07 16:58           ` Srivatsa Vaddagiri
2005-08-07 23:51             ` Con Kolivas
2005-08-08  1:20               ` Kyle Moffett
2005-08-08  1:30                 ` Con Kolivas
2005-08-08  1:45                   ` [ck] " Gabriel Devenyi
2005-08-08  2:44                   ` Srivatsa Vaddagiri
2005-08-08  7:05                     ` Nigel Cunningham
2005-08-08  7:38             ` Tony Lindgren
2005-08-08 15:06               ` Srivatsa Vaddagiri
2005-08-09 19:36             ` George Anzinger
2005-08-10 14:05               ` Srivatsa Vaddagiri
2005-08-10 22:37                 ` George Anzinger [this message]
2005-08-11 21:33                   ` Bill Davidsen
2005-08-12 15:13                     ` George Anzinger
2005-08-08 15:08           ` Folkert van Heusden
2005-08-08 15:16             ` Daniel Petrini
2005-08-08  7:26   ` [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3 Tony Lindgren
2005-08-08 14:54     ` Srivatsa Vaddagiri
2005-08-08 15:20       ` Tony Lindgren
2005-08-09 14:22         ` Zwane Mwaikambo
2005-08-10  7:46           ` Tony Lindgren
2005-08-09 20:05     ` George Anzinger
2005-08-09 20:22       ` Daniel Petrini
2005-08-10  8:02       ` Tony Lindgren
2005-08-10 22:40         ` George Anzinger

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=42FA81B9.9020801@mvista.com \
    --to=george@mvista.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=ck@vds.kolivas.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=tuukka.tikkanen@elektrobit.com \
    --cc=vatsa@in.ibm.com \
    /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