Files
linux/include/linux
Thomas Gleixner 6860d28ccb timekeeping: Reorder struct timekeeper
struct timekeeper is ordered suboptimal vs. cachelines. The layout,
including the preceding seqcount (see struct tk_core in timekeeper.c) is:

 cacheline 0:   seqcount, tkr_mono
 cacheline 1:   tkr_raw, xtime_sec
 cacheline 2:   ktime_sec ... tai_offset, internal variables
 cacheline 3:	next_leap_ktime, raw_sec, internal variables
 cacheline 4:	internal variables

So any access to via ktime_get*() except for access to CLOCK_MONOTONIC_RAW
will use either cachelines 0 + 1 or cachelines 0 + 2. Access to
CLOCK_MONOTONIC_RAW uses cachelines 0 + 1 + 3.

Reorder the members so that the result is more efficient:

 cacheline 0:   seqcount, tkr_mono
 cacheline 1:   xtime_sec, ktime_sec ... tai_offset
 cacheline 2:	tkr_raw, raw_sec
 cacheline 3:	internal variables
 cacheline 4:	internal variables

That means ktime_get*() will access cacheline 0 + 1 and CLOCK_MONOTONIC_RAW
access will use cachelines 0 + 2.

Update kernel-doc and fix formatting issues while at it. Also fix a typo
in struct tk_read_base kernel-doc.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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/20241015100839.12702-1-anna-maria@linutronix.de
2024-10-25 19:49:13 +02:00
..
2024-08-27 09:28:48 +02:00
2024-09-01 10:04:56 -04:00
2024-09-09 16:39:18 -07:00
2024-08-29 04:32:32 -06:00
2024-08-28 06:53:58 -07:00
2024-07-08 01:51:05 -06:00
2024-09-03 21:15:36 -07:00
2024-08-02 15:56:38 +02:00
2024-08-26 09:37:23 -07:00
2024-09-12 12:20:41 +02:00
2024-09-27 08:18:43 -07:00
2024-09-09 16:39:05 -07:00
2024-08-29 10:39:37 +02:00
2024-08-23 20:50:19 +02:00
2024-07-31 13:49:48 +01:00
2024-08-08 17:15:02 +02:00
2024-08-27 14:12:51 +02:00
2024-09-03 21:15:46 -07:00
2024-09-20 18:28:26 +03:00
2024-09-01 20:26:03 -07:00
2024-09-09 16:39:04 -07:00
2024-07-03 19:30:23 -07:00
2024-07-10 12:14:54 -07:00
2024-08-11 17:04:29 +01:00
2024-07-31 09:57:18 -07:00
2024-09-03 21:15:44 -07:00
2024-07-28 16:47:51 -06:00
2024-09-23 15:03:30 -04:00
2024-09-23 15:03:30 -04:00
2024-09-23 15:03:30 -04:00
2024-08-30 08:22:38 +02:00
2024-09-19 14:25:32 -05:00
2024-09-19 14:25:34 -05:00
2024-09-01 20:26:04 -07:00
2024-09-17 01:06:59 -07:00
2024-09-05 11:14:14 +02:00
2024-09-11 20:44:31 -07:00
2024-09-11 20:44:32 -07:00
2024-08-12 23:50:58 +05:30
2024-07-10 07:59:03 +02:00
2024-10-02 16:53:38 +02:00
2024-09-22 11:19:35 -07:00
2024-08-06 13:42:40 +02:00
2024-09-12 12:20:39 +02:00
2024-09-09 16:39:04 -07:00
2024-09-01 20:25:43 -07:00