OSDN Git Service

posix-timers: Use a callback for cancel synchronization on PREEMPT_RT
authorThomas Gleixner <tglx@linutronix.de>
Fri, 2 Aug 2019 05:35:59 +0000 (07:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 20 Aug 2019 20:05:46 +0000 (22:05 +0200)
commitec8f954a40da8cd3d159713b608e901f0cd909a9
treea6099be5d308424ad07e3332f45cc3b757b28e90
parent5d99b32a009e900a561f6a42ea7afe5b21288b8a
posix-timers: Use a callback for cancel synchronization on PREEMPT_RT

Posix timer delete retry loops are affected by the same priority inversion
and live lock issues as the other timers.

Provide a RT specific synchronization function which keeps a reference to
the timer by holding rcu read lock to prevent the timer from being freed,
dropping the timer lock and invoking the timer specific wait function via a
new callback.

This does not yet cover posix CPU timers because they need more special
treatment on PREEMPT_RT.

[ This is folded into the original attempt which did not use a callback. ]

Originally-by: Anna-Maria Gleixenr <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190819143801.656864506@linutronix.de
kernel/time/alarmtimer.c
kernel/time/posix-timers.c
kernel/time/posix-timers.h