public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: johnstul@us.ibm.com, george@mvista.com, mingo@elte.hu,
	akpm@osdl.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Kyle Moffett <mrmacman_g4@mac.com>,
	ray-gmail@madrabbit.org, Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: [patch 00/43] ktimer reworked
Date: Thu, 01 Dec 2005 21:51:18 -0500	[thread overview]
Message-ID: <1133491878.32583.43.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.61.0512020120180.1609@scrub.home>

On Fri, 2005-12-02 at 01:29 +0100, Roman Zippel wrote:
> Hi,

> > As for portablility, I believe John Stultz has some nice plugins coming
> > to what timer source you want to use, so if there's a better way to get a
> > time, these should make things easy to add.
> 
> These plugins can do no magic, if the hardware timer is slow, the whole 
> thing gets slow.

I was stating that if you have a faster timer, you can switch to it
without suffering much portability problems.  Anyway, you can turn off
HR if you don't need it and you still just get jiffy resolution.  And we
still lose the overhead of the timer wheel having a lot of timers that
will expire.

...

> > And they would be if that is all you need. But coming from an embedded
> > point of view, that is not nearly enough.  I really see HighRes making it
> > into the kernel soon, and any new code in this area really needs to take
> > that into account.
> 
> I'm not against HR timer, I have a problem with using them as timer for 
> everything.

When do we know to use HR or not?  So do you think that adding HR should
be specific to certain areas? 

So now we could have three separate timers :)

expire_timer    -  A timer that is expected to expire
nonexpire_timer -  A timer not expected to expire (timeout)
precision_timer -  A timer that will expire at a specific high
                    resolution time.

This would clear things up a bit, but I don't think Andrew would go for
three different timer interfaces ;)  But it would give you what you and
I both want.  

1) a timer that won't use high resolution timers but is still efficient
for the add->expire case.
2) a timer that will most likely not expire and is efficient for the
add->remove case.
3) a timer that will expire but will use the slower but more precise
hardware timer.

If this didn't cause more confusion for developers not knowing which
timer to use, I would say this would be a good idea.

Actually, we could make a single API for this and the default being the
nonexpire_timer (timeout). Just add a flag field that would tell it to
use the expire or precision timer.  Have the guts of the API be
implemented separately.

Just a suggestion.

> 
> > > - timer life time: if only a short interval is needed (e.g. a fraction of
> > > a second) timer_list is often a lot cheaper.
> > 
> > And again, you are only limited to 1000 choices to go off in that fraction
> > of a second if jiffies is the resolution (with jiffies an 1000HZ).
> 
> The point is still valid, short interval timer are cheaper using normal 
> timer, independent of whether they are removed or they expire.

As long as they don't need to be rehashed.

-- Steve



  parent reply	other threads:[~2005-12-02  2:51 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30 23:56 [patch 00/43] ktimer reworked Thomas Gleixner
2005-12-01  0:41 ` Andrew Morton
2005-12-01  2:19   ` Ingo Molnar
2005-12-01  3:32 ` Roman Zippel
2005-12-01  3:57   ` Kyle Moffett
2005-12-01 15:40     ` Roman Zippel
2005-12-01 16:22       ` Ray Lee
2005-12-01 16:51         ` Russell King
2005-12-01 17:44           ` Roman Zippel
2005-12-01 19:08             ` Steven Rostedt
2005-12-01 21:11               ` Roman Zippel
2005-12-01 22:03                 ` Steven Rostedt
2005-12-02  0:29                   ` Roman Zippel
2005-12-02  0:41                     ` Kyle Moffett
2005-12-02  0:58                       ` john stultz
2005-12-02  1:01                       ` Roman Zippel
2005-12-02  1:09                         ` Kyle Moffett
2005-12-02  1:24                           ` Roman Zippel
2005-12-02  1:47                             ` David Lang
2005-12-02 14:43                               ` Roman Zippel
2005-12-02 15:41                                 ` Kyle Moffett
2005-12-07  9:35                                 ` James Bruce
2005-12-07 12:34                                   ` Roman Zippel
2005-12-07 14:15                                     ` Kyle Moffett
2005-12-07 15:03                                       ` Roman Zippel
2005-12-07 14:17                                     ` Steven Rostedt
2005-12-08 15:43                                     ` James Bruce
2005-12-02  2:51                     ` Steven Rostedt [this message]
2005-12-04  1:28               ` Andrew James Wade
2005-12-05 19:40                 ` Roman Zippel
2005-12-06  2:46                   ` Andrew James Wade
2005-12-01 20:24           ` Andrew Morton
2005-12-01 21:19             ` Ingo Molnar
2005-12-01 21:51               ` Andrew Morton
2005-12-01 22:13                 ` Kyle Moffett
2005-12-01 22:15                   ` Christoph Hellwig
2005-12-02  0:02                     ` Thomas Gleixner
2005-12-02  0:36                       ` Kyle Moffett
2005-12-02  1:06                         ` Andrew Morton
2005-12-02 14:42                         ` John Stoffel
2005-12-02  2:21                       ` Steven Rostedt
2005-12-02  0:46                   ` Roman Zippel
2005-12-01 16:52         ` Roman Zippel

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=1133491878.32583.43.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=akpm@osdl.org \
    --cc=george@mvista.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mrmacman_g4@mac.com \
    --cc=ray-gmail@madrabbit.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    --cc=zippel@linux-m68k.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