Re: [Patch 3/6] statistics infrastructure - prerequisite: timestamp

From: Thomas Gleixner
Date: Wed May 24 2006 - 18:44:11 EST


On Wed, 2006-05-24 at 15:08 -0700, Andrew Morton wrote:
> do_div() is actually defined in terms of u64, not unsigned long long.
> Although afaict this will all work OK and all the usual type promotions
> will dtrt.
>
> Which begs the question: how _does_ the kernel represent nanoseconds? The
> time-management code is a bit undecided (search for long long in
> posix-cpu-timers.c, and for u64 in hrtimers.c). All a bit confused.

posix-cpu-timers.c needs some caring hand !

During the ktimers/hrtimers discussion we agreed on u64 resp. ktime_t to
hold the kernel internal values.

ktime_t is the preferred way as it is optimized for 32/64 bit archs and
all the conversion functions are available out of the box.

tglx


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/