Re: [PATCH v1] watchdog: Use a reference cycle counter to avoid scaling issues

From: Andi Kleen
Date: Thu Apr 23 2015 - 16:32:47 EST


On Thu, Apr 23, 2015 at 10:01:04PM +0200, Thomas Gleixner wrote:
> On Thu, 23 Apr 2015, Alexander Shishkin wrote:
>
> > The problem with using cycle counter for NMI watchdog is that its
> > frequency changes with the corresponding core's frequency. This means
> > that, in particular, if the core frequency scales up, watchdog NMI will
> > arrive more frequently than what user requested through watchdog_thresh
> > and also increasing the probability of setting off the hardlockup detector,
> > because the corresponding hrtimer will keep firing at the same intervals
> > regardless of the core frequency. And, if the core can turbo to up to 2.5x
> > its base frequency (and therefore TSC) [1], we'll have the hrtimer and NMI
>
> So you are saying that this M-5Y10 has a non-constant TSC again? You
> really can't be serious about that.

The TSC is constant, but the maximum frequency can be >=2.5TSC, so the
watchdog which uses cycles can have that much error.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only
--
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/