linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* clock_getres() and real resolution
@ 2012-02-08 16:31 Dmitry Antipov
  2012-02-09  5:12 ` Richard Cochran
  2012-02-09 10:12 ` Thomas Gleixner
  0 siblings, 2 replies; 8+ messages in thread
From: Dmitry Antipov @ 2012-02-08 16:31 UTC (permalink / raw)
  To: Thomas Gleixner, John Stultz; +Cc: linux-kernel, linaro-dev

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-11  7:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 16:31 clock_getres() and real resolution Dmitry Antipov
2012-02-09  5:12 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).