mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edgar Toernig <froese@gmx.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Chris Friesen <cfriesen@nortel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	jdavis@accessline.com, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bad rounding in timeval_to_jiffies [was: Re: Odd Timer behavior in 2.6 vs 2.4  (1 extra tick)]
Date: Fri, 22 Apr 2005 04:54:59 +0200	[thread overview]
Message-ID: <20050422045459.37fb6c41.froese@gmx.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0504210904450.2344@ppc970.osdl.org>

On Thu, 21 Apr 2005, Chris Friesen wrote:
>
> Does mainline have a high precision monotonic wallclock that is not 
> affected by time-of-day changes?  Something like "nano/mico seconds 
> since boot"?

On newer kernels with the posix timers (I think 2.6 - not sure though)
there's clock_gettime(CLOCK_MONOTONIC, ...).

Linus Torvalds wrote:
>
> Getting "approximate uptime" really really _really_ fast
> might be useful for some things, but I don't know how many.

I bet most users of gettimeofday actually want a strictly monotonic
increasing clock where the actual base time is irrelevant.  Just strace
some apps - those issuing hundreds and thousands of gettimeofday calls
are most likely in this class.  Those who only call gettimeofday once
or twice or the ones that really want the wall clock time.

How often does the kernel use jiffies (the monotonic clock) and how often
xtime (the wall clock)?

Ciao, ET.

  reply	other threads:[~2005-04-22  2:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-08 17:39 Odd Timer behavior in 2.6 vs 2.4 (1 extra tick) jdavis
2005-04-08 22:19 ` Steven Rostedt
2005-04-21  2:58 ` [PATCH] Bad rounding in timeval_to_jiffies [was: Re: Odd Timer behavior in 2.6 vs 2.4 (1 extra tick)] Steven Rostedt
2005-04-21  3:40   ` Steven Rostedt
2005-04-21  8:51     ` Russell King
2005-04-21 10:51       ` Steven Rostedt
2005-04-21 14:58         ` Linus Torvalds
2005-04-21 15:34           ` Steven Rostedt
2005-04-21 15:53           ` Chris Friesen
2005-04-21 16:13             ` Linus Torvalds
2005-04-22  2:54               ` Edgar Toernig [this message]
2005-04-29 21:28 ` Odd Timer behavior in 2.6 vs 2.4 (1 extra tick) Nish Aravamudan

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=20050422045459.37fb6c41.froese@gmx.de \
    --to=froese@gmx.de \
    --cc=akpm@osdl.org \
    --cc=cfriesen@nortel.com \
    --cc=jdavis@accessline.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@osdl.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

Powered by JetHome