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 14:08:17 -0500	[thread overview]
Message-ID: <1133464097.7130.15.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.61.0512011828150.1609@scrub.home>

On Thu, 2005-12-01 at 18:44 +0100, Roman Zippel wrote:
> Hi,
> 
> On Thu, 1 Dec 2005, Russell King wrote:
...
> > Hence, timers have the implication that they are _expected_ to expire.
> > Timeouts have the implication that their expiry is an exceptional
> > condition.
> 
> IOW a timeout uses a timer to implement an exceptional condition after a 
> period of time expires.
> 
> > So can we stop rehashing this stupid discussion?
> 
> The naming isn't actually my primary concern. I want a precise definition 
> of the expected behaviour and usage of the old and new timer system. If I 
> had this, it would be far easier to choose a proper name.
> E.g. I still don't know why ktimeout should be restricted to raise just 
> "error conditions", as the name implies.
> 

ktimeout may not need to be restricted to anything.

It should just be documented simply as: If you need to set some timed
event to happen that you don't expect to occur then use a ktimeout.
Where this timed event is an event that lets you know that another event
hasn't happened in a given time. (I want to know if x didn't happen by
this time).

If a timed event is expected to occur then use ktimer.  Where it is
mostly used for the event itself (I want x to happen at this time).

Now you could use ktimout on something that will always occur, but this
will just be inefficient, since ktimeout is optimized for removal and
not expiration.  Which usually happens when something "times out". 

And you could use ktimer on something that isn't going to occur.  But
again this is just inefficient.

So Roman, please have someone else speak up and let us know that they
are just as confused on these names as you are.  Currently, it seems
that you are the only one that doesn't understand the difference between
a timeout and a timer.  You seem very intelligent and that could be why
you are getting confused.  You're looking too deep into the
implementation of timers and timeouts, where they seem to use each
other.  You just need to take a step back and look at this at a higher
view.  Think about what to use when you need to implement being told
when something has timed out (timeout) or when you just want to do
something that happens a a certain time (timer).

-- Steve


  reply	other threads:[~2005-12-01 19:09 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 [this message]
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
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=1133464097.7130.15.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