Re: [PATCH v4] x86/hpet: Reduce HPET counter read contention

From: Peter Zijlstra
Date: Wed Apr 13 2016 - 20:25:30 EST


On Wed, Apr 13, 2016 at 11:37:21AM -0400, Waiman Long wrote:
> The TSC clocksource, on the other hand, is per cpu. So there won't be much
> contention in accessing it. Normally TSC will be used the default clock
> source. However, if there is too much variation in the actual clock speeds
> of the individual CPUs,

Does the system actually have a clock rate skew? Not an offset?

> it will cause the TSC calibration to fail and revert
> to use hpet as the clock source. During bootup, hpet will usually be
> selected as the default clock source first. After a short time, the TSC will
> take over as the default clock source. Problem can happen during that short
> period of transition time too. In fact, we have 16-socket Broadwell-EX
> systems that has this soft lockup problem once in a few reboot cycles which
> prompted me to find a solution to fix it.

This 16 socket system is a completely broken trainwreck. Trying to use
HPET with _that_ many CPUs is absolutely insane.

Please tell your hardware engineers to fix the TSC clock domain.