A couple of TSC questions

From: Paul E. McKenney
Date: Tue Mar 21 2023 - 19:23:35 EST


Hello, Feng!

I hope that things are going well for you and yours!

First, given that the kernel can now kick out HPET instea of TSC in
response to clock skew, does it make sense to permit recalibration of
the still used TSC against the marked-unstable HPET?

Second, we are very occasionally running into console messages like this:

Measured 2 cycles TSC warp between CPUs, turning off TSC clock.

This comes from check_tsc_sync_source() and indicates that one CPU's
TSC read produced a later time than a later read from some other CPU.
I am beginning to suspect that these can be caused by unscheduled delays
in the TSC synchronization code, but figured I should ask you if you have
ever seen these. And of course, if so, what the usual causes might be.

Thoughts?

Thanx, Paul