From: Dmitry Antipov <dmitry.antipov@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>
Cc: linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org
Subject: clock_getres() and real resolution
Date: Wed, 08 Feb 2012 08:31:03 -0800 [thread overview]
Message-ID: <4F32A347.4090703@linaro.org> (raw)
IIUC, an idea behind clock_getres() is to give a hint about the resolution of
specified clock. This hint may be used by an application programmer to check whether
this clock is suitable for a some purpose. So why clock_getres() always returns
something like {0, 1} (if hrtimers are enabled) regardless of the underlying platform's
real numbers?
For example, OMAP4's real resolution of CLOCK_REALTIME is 30.5us for 32K timer and 26ns
for MPU timer. Such a difference definitely makes sense - but clock_getres(CLOCK_REALTIME,..)
always returns {0, KTIME_HIGH_RES}. Since this behavior causes a confusion like
http://lists.linaro.org/pipermail/linaro-dev/2012-February/010112.html, I'm considering
this as a stupid misfeature.
Dmitry
next reply other threads:[~2012-02-08 16:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 16:31 Dmitry Antipov [this message]
2012-02-09 5:12 ` clock_getres() and real resolution Richard Cochran
2012-02-09 9:25 ` Dmitry Antipov
2012-02-09 18:40 ` Richard Cochran
2012-02-09 19:32 ` Dmitry Antipov
2012-02-11 7:39 ` Richard Cochran
2012-02-09 10:12 ` Thomas Gleixner
2012-02-09 15:26 ` Dmitry Antipov
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=4F32A347.4090703@linaro.org \
--to=dmitry.antipov@linaro.org \
--cc=john.stultz@linaro.org \
--cc=linaro-dev@lists.linaro.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 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.