Skip to content

RFC TSC calibration improvements

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 47 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86: TSC: define the PIT latch value separatearch/x86/kernel/tsc.c+9 -50 replies
2/4x86: TSC: separate hpet/pmtimer calculation outarch/x86/kernel/tsc.c+41 -150 replies
3/4x86: TSC: use one set of reference variablesarch/x86/kernel/tsc.c+11 -110 replies
4/4x86: TSC make the calibration loop smarterarch/x86/kernel/tsc.c+58 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC patch 0/4] TSC calibration improvements

This patch series addresses following:

- reduce the calibration time to a useful value
- make decision smarter, when a reference (HPET/PMTIMER) is around

The first patches are cleanups to prepare for the smarter loop handling.

The main change is to reduce the PIT delay value to 10ms, which gives reasonable results on very slow machines as well. To avoid looping several times when the machine has a working reference counter (HPET/pmtimer), we compare the results of the PIT and the reference and break out of the loop when both match inside of a 10% window.

For virtualized environments the PIT calibration fails often and the reference calibration is not reproducible with 10ms. To address this we check whether the PIT failed two times in a row and make the PIT loop longer (50ms) for the last try to get a better result for the reference.

Most of the machines I tested break out of the loop after the first try with a stable reproducible result.

Thanks,

tglx