Revert "timekeeping: Fix possible inconsistencies in _COARSE clockids"
authorThomas Gleixner <tglx@linutronix.de>
Fri, 4 Apr 2025 15:10:52 +0000 (17:10 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 4 Apr 2025 17:10:00 +0000 (19:10 +0200)
commit324a2219ba38b00ab0e53bd535782771ba9614b2
tree958650956459a18ace15e0f8232ceb96b1784b26
parente48e99b6edf41c69c5528aa7ffb2daf3c59ee105
Revert "timekeeping: Fix possible inconsistencies in _COARSE clockids"

This reverts commit 757b000f7b936edf79311ab0971fe465bbda75ea.

Miroslav reported that the changes for handling the inconsistencies in the
coarse time getters result in a regression on the adjtimex() side.

There are two issues:

  1) The forwarding of the base time moves the update out of the original
     period and establishes a new one.

  2) The clearing of the accumulated NTP error is changing the behaviour as
     well.

Userspace expects that multiplier/frequency updates are in effect, when the
syscall returns, so delaying the update to the next tick is not solving the
problem either.

Revert the change, so that the established expectations of user space
implementations (ntpd, chronyd) are restored. The re-introduced
inconsistency of the coarse time getters will be addressed in a subsequent
fix.

Fixes: 757b000f7b93 ("timekeeping: Fix possible inconsistencies in _COARSE clockids")
Reported-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/Z-qsg6iDGlcIJulJ@localhost
kernel/time/timekeeping.c