]> www.infradead.org Git - users/jedix/linux-maple.git/commit
timekeeping: Split out timekeeper update of timekeeping_advanced()
authorAnna-Maria Behnsen <anna-maria@linutronix.de>
Wed, 9 Oct 2024 08:29:06 +0000 (10:29 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 25 Oct 2024 17:49:14 +0000 (19:49 +0200)
commit5aa6c43eca21a929ace6a8e31ab3520ddc50dfa9
tree88bd6a6998adfbcc535396c54f24c9e3e48ae29b
parent1d72d7b5fd53592342db9c9d7d0fde14a883c2c4
timekeeping: Split out timekeeper update of timekeeping_advanced()

timekeeping_advance() is the only optimized function which uses
shadow_timekeeper for updating the real timekeeper to keep the sequence
counter protected region as small as possible.

To be able to transform timekeeper updates in other functions to use the
same logic, split out functionality into a separate function
timekeeper_update_staged().

While at it, document the reason why the sequence counter must be write
held over the call to timekeeping_update() and the copying to the real
timekeeper and why using a pointer based update is suboptimal.

No functional change.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20241009-devel-anna-maria-b4-timers-ptp-timekeeping-v2-13-554456a44a15@linutronix.de
kernel/time/timekeeping.c