[patch V3 00/18] posix-timers: Rework the global hash table and provide a sane mechanism for CRIU
From: Thomas Gleixner
Date: Sat Mar 08 2025 - 11:48:19 EST
This is a follow up on V2 of this work, which can be found here:
https://lore.kernel.org/all/20250224095736.145530367@xxxxxxxxxxxxx
It addresses the scalability problem of the posix timer hash and provides a
performant mechanism to restore Posix timers with a given ID along with a
couple of preperatory cleanups and enhancements. More details about
implementation choices are in the change logs and the cover letter of V1:
https://lore.kernel.org/all/20250302185753.311903554@xxxxxxxxxxxxx
Changes vs. V2:
- Ensure consistency on timer_create() (new patch) - Frederic
- Pick up the lock_timer() conditional unlock fix (was V2a)
- Use proper defines in selftests
- Pick up review/ack tags
The series survives all posix timer tests and did not show any regressions
so far.
The series is based on:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip timers/core
and is also available from git:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git timers/posix
Thanks,
tglx
---
Eric Dumazet (3):
posix-timers: Initialise timer before adding it to the hash table
posix-timers: Add cond_resched() to posix_timer_add() search loop
posix-timers: Make signal_struct:: Next_posix_timer_id an atomic_t
Peter Zijlstra (1):
posix-timers: Make lock_timer() use guard()
Thomas Gleixner (14):
posix-timers: Ensure that timer initialization is fully visible
posix-timers: Cleanup includes
posix-timers: Remove a few paranoid warnings
posix-timers: Remove SLAB_PANIC from kmem cache
posix-timers: Use guards in a few places
posix-timers: Simplify lock/unlock_timer()
posix-timers: Rework timer removal
posix-timers: Improve hash table performance
posix-timers: Switch to jhash32()
posix-timers: Avoid false cacheline sharing
posix-timers: Make per process list RCU safe
posix-timers: Dont iterate /proc/$PID/timers with sighand:: Siglock held
posix-timers: Provide a mechanism to allocate a given timer ID
selftests/timers/posix-timers: Add a test for exact allocation mode
fs/proc/base.c | 48 --
include/linux/cleanup.h | 22 -
include/linux/posix-timers.h | 30 +
include/linux/sched/signal.h | 3
include/uapi/linux/prctl.h | 10
kernel/signal.c | 2
kernel/sys.c | 5
kernel/time/posix-timers.c | 540 +++++++++++++-------------
tools/testing/selftests/timers/posix_timers.c | 66 +++
9 files changed, 418 insertions(+), 308 deletions(-)