From: Roman Zippel <zippel@linux-m68k.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: tglx@linutronix.de, Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: CLOCK_REALTIME_RES and nanosecond resolution
Date: Tue, 8 Nov 2005 13:56:23 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.61.0511081332080.1387@scrub.home> (raw)
In-Reply-To: <1131443137.4652.101.camel@gaston>
Hi,
On Tue, 8 Nov 2005, Benjamin Herrenschmidt wrote:
> > This is the resolution which you can expect for timers (nanosleep and
> > interval timers) as the timers depend on the jiffy tick.
> >
> > The resolution of the readout functions is not affected by this.
>
> Ok, thanks, POSIX spec wasn't very clear about that
Actually the spec is a bit more clear than that:
"This volume of IEEE Std 1003.1-2001 defines functions that allow an
application to determine the implementation-supported resolution for the
clocks and requires an implementation to document the resolution supported
for timers and nanosleep() if they differ from the supported clock
resolution."
Historically the clock and timer resolution was equal and e.g.
clock_gettime() returned a msec value. To get usec resolution one had to
enable the MICRO_TIME, but this didn't change the clock_getres() value, as
at that time higher clock_gettime() resolution was interpolated from a
second time source and the actual clock tick remained unchanged.
Subsequent UNIX generations have preserved this behaviour.
Thomas' expectation is not generally true, non-UNIX implementations return
different values here and his expectation is not required by POSIX, it's
more a traditional UNIX behaviour.
bye, Roman
prev parent reply other threads:[~2005-11-08 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 2:55 Benjamin Herrenschmidt
2005-11-08 4:16 ` Steven Rostedt
2005-11-08 9:34 ` Thomas Gleixner
2005-11-08 9:45 ` Benjamin Herrenschmidt
2005-11-08 12:56 ` Roman Zippel [this message]
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=Pine.LNX.4.61.0511081332080.1387@scrub.home \
--to=zippel@linux-m68k.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®