From: Steven Rostedt <rostedt@goodmis.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: CLOCK_REALTIME_RES and nanosecond resolution
Date: Mon, 07 Nov 2005 23:16:42 -0500 [thread overview]
Message-ID: <1131423402.14381.166.camel@localhost.localdomain> (raw)
In-Reply-To: <1131418511.4652.88.camel@gaston>
On Tue, 2005-11-08 at 13:55 +1100, Benjamin Herrenschmidt wrote:
> Hi !
>
> I noticed that we set
>
> #define CLOCK_REALTIME_RES TICK_NSEC /* In nano seconds. */
>
> Unconditionally in kernel/posix-timer.c
>
> Doesn't that mean that we'll advertise to userland (via clock_getres) a
> resolution that is basically HZ ? We do get at lenght to get more
> precise (up to ns) resolution in practice on many architectures but we
> don't expose that to userland at all. Is this normal ?
Yes.
Until ktimers/high-res or another variant gets incorporated into the
kernel, the only resolution you will get for user applications is HZ.
So even though we may have timers that are much faster than HZ (which
there are a lot of them), the kernel only will work with timers on a
jiffy basis.
On a 2.6.13 I get a response of 0.004000250 seconds from clock_getres
with a HZ of 250.
On 2.6.14-rc5-kthrt7 (Thomas Gleixner's ktimers+high-res) I get from
clock_getres: 0.000001000 seconds. And this seems to be accurate.
-- Steve
next prev parent reply other threads:[~2005-11-08 4:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 2:55 CLOCK_REALTIME_RES and nanosecond resolution Benjamin Herrenschmidt
2005-11-08 4:16 ` Steven Rostedt [this message]
2005-11-08 9:34 ` Thomas Gleixner
2005-11-08 9:45 ` Benjamin Herrenschmidt
2005-11-08 12:56 ` 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=1131423402.14381.166.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=benh@kernel.crashing.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.