From: Joe Korty <joe.korty@ccur.com>
To: Roman Zippel <zippel@linux-m68k.org>
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: Thu, 1 Sep 2005 09:48:02 -0400 [thread overview]
Message-ID: <20050901134802.GA1753@tsunami.ccur.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0509011104160.3728@scrub.home>
On Thu, Sep 01, 2005 at 11:19:51AM +0200, Roman Zippel wrote:
> You still didn't explain what's the point in choosing
> different clock sources for a _timeout_.
Well, if CLOCK_REALTIME is set forward by a minute,
timers & timeout specified against that clock will expire
a minute earlier than expected. That doesn't happen with
CLOCK_MONOTONIC. Applications should have the ability
to select what they want to happen in this case (ie,
whether the timeout/timer has to happen at a particular
wall-clock time, say 2pm, or if the interval aspects of
the timer/timeout are more important). Applications
get this if they have the ability to specify the clock
their timer or timeout is specified against.
Also ..... (I am going off the deep end here) .....
The purpose of CLOCK_REALTIME is to track wall clock time.
That means it can be speed up, slowed down, or even be
force-fed a new time to make it match.
The purpose of CLOCK_MONOTONIC is to provide an even,
unchanging progression of advancing time. That is, any two
intervals on this time-line of the same measured length
actually represent, as close as possible, the same length
of time.
CLOCK_MONOTONIC should get adjustments only to bring its
frequency back into line (but currently gets more than this
in Linux). CLOCK_REALTIME should and does get adjustments
for frequency and then gets further, temporary speedups
or slowdown to bring its absolute value back into line.
Note that there is no need for the two clocks to track each
other in any way, as Linux currently goes to lengths to do.
I know Linux does not implement the above definition
of CLOCK_MONOTONIC; however, I would like an interface
where when, if the day comes time is properly handled,
applications can take advantage of it.
Joe
next prev parent reply other threads:[~2005-09-01 13:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-01 0:00 FW: [RFC] A more general timeout specification Perez-Gonzalez, Inaky
2005-09-01 9:19 ` Roman Zippel
2005-09-01 13:48 ` Joe Korty [this message]
2005-09-01 15:18 ` Roman Zippel
2005-09-01 21:20 ` Kyle Moffett
-- strict thread matches above, loose matches on Subject: below --
2005-09-01 11:59 FW: " Perez-Gonzalez, Inaky
2005-09-01 12:55 ` 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-31 20:55 Perez-Gonzalez, Inaky
2005-08-31 21:15 ` Joe Korty
2005-08-31 21:20 ` Christopher Friesen
2005-08-31 21:34 ` Joe Korty
2005-08-31 22:06 ` Christopher Friesen
2005-08-31 22:10 ` Roman Zippel
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=20050901134802.GA1753@tsunami.ccur.com \
--to=joe.korty@ccur.com \
--cc=akpm@osdl.org \
--cc=george@mvista.com \
--cc=inaky.perez-gonzalez@intel.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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