Re: update timer frequencies
From: Peter Zijlstra
Date: Fri Aug 04 2017 - 05:38:30 EST
On Fri, Aug 04, 2017 at 12:28:43PM +0530, Vineet Gupta wrote:
> The hardware is being changed and I had a couple of questions to help do it right:
> 2. I'm not sure if the timer generating interrupts (periodic or oneshot)
> needs to be fed invariant fixed clk or dynamic core clk. Naively it should
> follow the core - but what happens to scheduled timers (say TCP timeouts):
> if this clk changes - they need to be canceled/updated. If it doesn't then
> the notion of timing is broken ? I'm likely not thinking this through
Please keep the timers on the very same clock as your clocksource.
clockevent and clocksource having different (and possibly) drifting
timelines is painful.
Having them on the same clock makes everything so much easier, since you
_know_ what time it is when they fire and won't have to recompute and
possibly rearm the timer.