posix-timers: Initialize cache early and move pointer into __timer_data
authorEric Dumazet <edumazet@google.com>
Wed, 2 Apr 2025 13:31:14 +0000 (13:31 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 9 Apr 2025 19:21:36 +0000 (21:21 +0200)
commit0df6db767a535472a46aeea93c280de067784a9f
tree1d0ed57b67d5deb80975927487f297435649efbb
parent0af2f6be1b4281385b618cb86ad946eded089ac8
posix-timers: Initialize cache early and move pointer into __timer_data

Move posix_timers_cache initialization to posixtimer_init(). At that point
the memory subsystem is already up and running.

Also move the cache pointer to the __timer_data variable to avoid
potential false sharing, since it never was marked as __ro_after_init.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250402133114.253901-1-edumazet@google.com
kernel/time/posix-timers.c