Re: CONFIG_PRINTK_TIME woes

Nick Piggin
2005-08-23T17:38:47Z

David S. Miller wrote:

> This is a useful feature, please do not labotomize it just because
> it's difficult to implement on ia64. Just make a
> "printk_get_timestamp_because_ia64_sucks()" interface or something
> like that :-)

I was a bit unclear when I raised this issue. It is not just an
ia64 problem.

The sched_clock() interface is allowed to return wildly different
values depending on which CPU it is called from, and currently
has fundamental problems at least on i386 where it can go fowards
and backwards arbitrary amounts of time (due to frequency scaling,
if I understand correctly), and also needn't be exactly nanoseconds
at the best of times.

The interface is like this so it can be per-cpu and lockless and
as fast as possible for the scheduler heuristics (which aren't too
picky).

I just don't want its usage spreading outside kernel/sched.c if we
can help it. Pragmatically it sounds like the best thing we have
for printk at this time, however I hope we can come up with
something slightly more appropriate even if it ends up being slower.

Send instant messages to your online friends http://au.messenger.yahoo.com