[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-cab46ec655eec1b5dbb0c17a25e19f67c539f00b@git.kernel.org>
Date: Thu, 1 Aug 2019 09:05:41 -0700
From: tip-bot for Anna-Maria Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: bigeasy@...utronix.de, anna-maria@...utronix.de, mingo@...nel.org,
tglx@...utronix.de, linux-kernel@...r.kernel.org,
peterz@...radead.org, hpa@...or.com
Subject: [tip:timers/core] itimers: Prepare for PREEMPT_RT
Commit-ID: cab46ec655eec1b5dbb0c17a25e19f67c539f00b
Gitweb: https://git.kernel.org/tip/cab46ec655eec1b5dbb0c17a25e19f67c539f00b
Author: Anna-Maria Gleixner <anna-maria@...utronix.de>
AuthorDate: Wed, 31 Jul 2019 00:33:51 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 1 Aug 2019 17:46:41 +0200
itimers: Prepare for PREEMPT_RT
Use the hrtimer_cancel_wait_running() synchronization mechanism to prevent
priority inversion and live locks on PREEMPT_RT.
As a benefit the retry loop gains the missing cpu_relax() on !RT.
[ tglx: Split out of combo patch ]
Signed-off-by: Anna-Maria Gleixner <anna-maria@...utronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lkml.kernel.org/r/20190730223828.690771827@linutronix.de
---
kernel/time/itimer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c
index 02068b2d5862..9d26fd4ba4c0 100644
--- a/kernel/time/itimer.c
+++ b/kernel/time/itimer.c
@@ -213,6 +213,7 @@ again:
/* We are sharing ->siglock with it_real_fn() */
if (hrtimer_try_to_cancel(timer) < 0) {
spin_unlock_irq(&tsk->sighand->siglock);
+ hrtimer_cancel_wait_running(timer);
goto again;
}
expires = timeval_to_ktime(value->it_value);
Powered by blists - more mailing lists