public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Korty <joe.korty@ccur.com>
To: Christopher Friesen <cfriesen@nortel.com>
Cc: "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>,
	akpm@osdl.org, george@mvista.com, johnstul@us.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: FW: [RFC] A more general timeout specification
Date: Wed, 31 Aug 2005 17:34:30 -0400	[thread overview]
Message-ID: <20050831213430.GA11858@tsunami.ccur.com> (raw)
In-Reply-To: <43161F03.5090604@nortel.com>

On Wed, Aug 31, 2005 at 03:20:03PM -0600, Christopher Friesen wrote:
> Perez-Gonzalez, Inaky wrote:
> >In this structure,
> >the user specifies:
> >    whether the time is absolute, or relative to 'now'.
> 
> 
> >Timeout_sleep has a return argument, endtime, which is also in
> >'struct timeout' format.  If the input time was relative, then
> >it is converted to absolute and returned through this argument.
> 
> Wouldn't it make more sense for the endtime to be returned in the same 
> format (relative/absolute) as the original timer was specified?  That 
> way an application can set a new timer for "timeout + SLEEPTIME" and on 
> average it will be reasonably accurate.
> 
> In the proposed method, for endtime to be useful the app needs to check 
> the current time, compare with the endtime, and figure out the delta. 
> If you're going to force the app to do all that work anyway, the app may 
> as well use absolute times.
> 
> Chris

The returned timeout struct has a bit used to mark the value as absolute.  Thus
the caller treats the returned timeout as a opaque cookie that can be
reapplied to the next (or more likely, the to-be restarted) timeout.

A general principle is, once a time has been converted to absolute, it
should never be converted back to relative time.  To do so means the
end-time starts to drift from the original end-time.

Regards,
Joe
--
"Money can buy bandwidth, but latency is forever" -- John Mashey

  reply	other threads:[~2005-08-31 21:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-31 20:55 FW: [RFC] A more general timeout specification Perez-Gonzalez, Inaky
2005-08-31 21:15 ` Joe Korty
2005-08-31 21:20 ` Christopher Friesen
2005-08-31 21:34   ` Joe Korty [this message]
2005-08-31 22:06     ` Christopher Friesen
2005-08-31 22:10 ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2005-09-01 11:59 Perez-Gonzalez, Inaky
2005-09-01 12:55 ` Roman Zippel
2005-09-01  0:00 Perez-Gonzalez, Inaky
2005-09-01  9:19 ` Roman Zippel
2005-09-01 13:48   ` Joe Korty
2005-09-01 15:18     ` Roman Zippel
2005-08-31 23:24 Perez-Gonzalez, Inaky
2005-08-31 23:50 ` Roman Zippel
2005-09-01  0:08   ` Daniel Walker
2005-09-01  9:22     ` Roman Zippel
2005-09-01 13:53       ` Joe Korty
2005-09-01 13:50   ` Joe Korty
2005-09-01 14:32     ` Roman Zippel
2005-09-01 15:10       ` Daniel Walker
2005-09-01 15:11       ` Daniel Walker
2005-09-01 15:47       ` Joe Korty
2005-08-31 23:17 Perez-Gonzalez, Inaky
2005-08-31 22:15 Perez-Gonzalez, Inaky
2005-08-31 23:01 ` Roman Zippel
2005-08-31 22:11 Perez-Gonzalez, Inaky
2005-08-31 23:06 ` Christopher Friesen
2005-08-23  1:13 Perez-Gonzalez, Inaky
2005-05-18 20:15 Joe Korty
2005-07-29  1:52 ` FW: " Inaky Perez-Gonzalez
2005-08-22 22:56   ` john stultz

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=20050831213430.GA11858@tsunami.ccur.com \
    --to=joe.korty@ccur.com \
    --cc=akpm@osdl.org \
    --cc=cfriesen@nortel.com \
    --cc=george@mvista.com \
    --cc=inaky.perez-gonzalez@intel.com \
    --cc=johnstul@us.ibm.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