public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
Cc: jim.houston@ccur.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] High-res-timers part 2 (x86 platform code) take 5.1
Date: Tue, 15 Oct 2002 15:03:48 -0700	[thread overview]
Message-ID: <3DAC90C4.823D87DF@mvista.com> (raw)
In-Reply-To: 3DAA8571.5439.26F0B5@localhost

Ulrich Windl wrote:
> 
> On 12 Oct 2002, at 18:03, Jim Houston wrote:
> 
> >
> > >> This patch, in conjunction with the "core" high-res-timers
> > >> patch implements high resolution timers on the i386
> > >> platforms.
> > >
> > > I really don't get the notion of partial ticks, and quite frankly, this
> > > isn't going into my tree until some major distribution kicks me in the
> > > head and explains to me why the hell we have partial ticks instead of just
> > > making the ticks shorter.
> > >
> > >                Linus
> >
> > Hi Linus,
> >
> > Concurrent has been using previous versions of the Posix timers patch
> > in our 2.4.18 based kernel.  I like this interface and would like to
> > see it included in your kernel.
> 
> Hi,
> 
> I think nobody objects seeing the interface implemented. Maybe just how
> it's implemented. I did not have a close look, but the concept seems
> odd at first sight.
> 
> Using a individial timer as interrupt source may be a different idea
> (if avaliable for the particular hardware), but the there must be a
> balance between busy looping in the kernel and setting up of such an
> individual interrupt.
> 
> The other thing is how to correlate it with the wall clock.

Ah, yes, that is it in a nut shell.  If you try to put the
high res timers in a "special" list and not in the same list
as the low res stuff, you have ordering issues.  It becomes
real easy to have the timers expire in the incorrect order. 

As to interrupt source and time, the biggest issue is that
we don't really have timers that interrupt in "nice" units
of time.  The PIT, for example, has a tick time (i.e. each
count) of 0.838095239 micro seconds.  So how are we to
figure time from such a tick if we want to use an integer
value for HZ.

What my patch suggests is that we use the higher resolution
TSC or pm timer (or what ever is available) and just use the
PIT to remind us to look at the clock, AND that we keep time
in units of that clock.  In some ways we already do this,
but we are not consistent.  For example we advance the time
by less than 1 ms each tick, but we still assume that a tick
is 1 ms when we set up timers.  This leads to standards
failures such as that illustrated by:

time sleep 60

which on a 2.5 system will sleep for less than 60 seconds
because of this.  

-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml

  reply	other threads:[~2002-10-15 21:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-12 22:03 [PATCH 2/3] High-res-timers part 2 (x86 platform code) take 5.1 Jim Houston
2002-10-14  6:50 ` Ulrich Windl
2002-10-15 22:03   ` george anzinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-19  1:02 Brad Bozarth
2002-10-10  0:50 Dan Kegel
2002-10-10  1:33 ` Ben Greear
2002-10-10  3:55 ` Jeff Dike
2002-10-10  3:32   ` Dan Kegel
2002-10-10 12:34 ` mbs
2002-10-09 22:47 george anzinger
2002-10-09 23:14 ` Linus Torvalds
2002-10-09 23:42   ` george anzinger
2002-10-10 15:03     ` Eric W. Biederman
2002-10-10 15:45       ` george anzinger
2002-10-10 15:54     ` Oliver Xymoron
2002-10-10 16:24       ` george anzinger
2002-10-10 17:04         ` Oliver Xymoron
2002-10-10 17:47           ` george anzinger
2002-10-13 10:46   ` Ingo Adlung
2002-10-14  7:18     ` Vojtech Pavlik
2002-10-14 22:17       ` Pavel Machek
2002-10-15  7:13         ` Vojtech Pavlik
2002-10-15 21:45           ` george anzinger
2002-10-17 21:54   ` Randy.Dunlap
2002-10-17 22:11     ` Robert Love
2002-10-18 13:11     ` mbs

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=3DAC90C4.823D87DF@mvista.com \
    --to=george@mvista.com \
    --cc=Ulrich.Windl@rz.uni-regensburg.de \
    --cc=jim.houston@ccur.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