Re: Clock monotonic a suggestion

From: Joel Becker (Joel.Becker@oracle.com)
Date: Fri Mar 21 2003 - 14:44:17 EST


On Fri, Mar 21, 2003 at 02:17:44PM +0100, Martin Waitz wrote:
> why don't you simply use asm("rdtsc") ?
> (ok, you should make sure that you always ask the same processor and
> stuff, but using the built in TSC seems to do everything you want...)

        It does. That's the point. monotonic_clock() is intended as a
portable and consistent wrapper around such access. Otherwise, any
module that needs such access must do system specific work (TSC on x86,
cyclone on x86-x440, other stuff on S/390, etc). In addition, having
speedstep handling in one place is a good thing.

Joel

-- 

Life's Little Instruction Book #335

"Every so often, push your luck."

Joel Becker Senior Member of Technical Staff Oracle Corporation E-mail: joel.becker@oracle.com Phone: (650) 506-8127 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:38 EST