Re: sched_clock() uses are broken

Andi Kleen
2006-05-07T16:03:54Z

On Sunday 07 May 2006 16:04, Nick Piggin wrote:
> Russell King wrote:
>
> > Also, any comments on update_cpu_clock() and current_sched_time() both
> > appearing to be buggy, or am I barking up the wrong tree with those?
>
> Can't remember off the top of my head who put those in, sorry.
>
> Aside from the fact that they appear to be fundamentally buggy anyway
> because we don't require exact ns intervals from sched_clock() at the
> best of times, I think your wrapping fix for them looks correct.

I must say I always hated them because adding code to the context
switch for such an obscure POSIX bu^w"feature" is just a bad idea.
Maybe it would be best to remove it again instead of adding the
scaling needed to make it actually work

(since we got along with such a broken implementation for so long I
would guess that nobody uses these timers anyways)

-Andi