]> git.ipfire.org Git - thirdparty/linux.git/commit
timekeeping: Add percpu counter for tracking floor swap events
authorJeff Layton <jlayton@kernel.org>
Wed, 2 Oct 2024 21:27:17 +0000 (17:27 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 6 Oct 2024 18:56:07 +0000 (20:56 +0200)
commit96f9a366ec8abe027326d7aab84d64370019f0f1
tree4e5942795348ab2a7af967c4f9a5625e703f6063
parent70c8fd00a9bd0509bbf7bccd9baea8bbd5ddc756
timekeeping: Add percpu counter for tracking floor swap events

The mgtime_floor value is a global variable for tracking the latest
fine-grained timestamp handed out. Because it's a global, track the
number of times that a new floor value is assigned.

Add a new percpu counter to the timekeeping code to track the number of
floor swap events that have occurred. A later patch will add a debugfs
file to display this counter alongside other stats involving multigrain
timestamps.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # documentation bits
Link: https://lore.kernel.org/all/20241002-mgtime-v10-2-d1c4717f5284@kernel.org
include/linux/timekeeping.h
kernel/time/timekeeping.c
kernel/time/timekeeping_debug.c
kernel/time/timekeeping_internal.h