[BUG] 2.6.37-rc3 massive interactivity regression on ARM

Peter Zijlstra a.p.zijlstra at chello.nl
Wed Dec 8 09:44:19 EST 2010


On Wed, 2010-12-08 at 14:28 +0000, Russell King - ARM Linux wrote:
> So, what I'm saying is that if wrapping in 4 seconds is a problem,
> then maybe we shouldn't be providing sched_clock() at all.

4 seconds should be perfectly fine, we call it at least every scheduler
tick (HZ) and NO_HZ will either have to limit the max sleep period or
provide its own sleep duration (using a more expensive clock) so we can
recover (much like GTOD already requires).

> Also, if wrapping below 64-bits is also a problem, again, maybe we
> shouldn't be providing it there either.  Eg:

That's mostly due to hysterical raisins and we should just fix that, the
simplest way is to use something like kernel/sched_clock.c to use
sched_clock() deltas to make a running u64 value.

Like said, John Stultz was already looking at doing something like that
because there's a number of architectures suffering this same problem
and they're all already using part of the clocksource infrastructure to
implement the sched_clock() interface simply because they only have a
single hardware resource.

One of the problems is I think the cycles2ns multiplication of the raw
clock, that makes dealing with wrap-around lots harder, so I guess we
should deal with the wrap on the raw clock values and then apply
cycles2ns on the delta or somesuch. But I expect the clocksource
infrastructure already has something like that, John?



More information about the linux-arm-kernel mailing list