4.4.131-rt148-rc1
cover 4.4.131-rt148-rc1
Dear RT Folks,
This is the RT stable review cycle of patch 4.4.131-rt148-rc1.
Here are couple of patches from Sebiastian which didn't make into 4.4.126-rt142 cycle. I haven't included Julia's "seqlock: provide the same ordering semantics as mainline" patch, because I don't know it needs a review or not.
The pre-releases will not be pushed to the git repository, only the final release is.
If all goes well, this patch will be converted to the next main release on 09.05.2017.
Enjoy,
-- Daniel
Daniel Wagner (1):
Linux 4.4.131-rt148-rc1
Sebastian Andrzej Siewior (2):
alarmtimer: Prevent live lock in alarm_cancel()
posix-timers: move the rcu head out of the union
include/linux/posix-timers.h | 2 +- kernel/time/alarmtimer.c | 2 +- kernel/time/posix-timers.c | 4 ++-- localversion-rt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/3 alarmtimer: Prevent live lock in alarm_cancel()
From: Sebastian Andrzej Siewior <[email protected]>
If alarm_try_to_cancel() requires a retry, then depending on the priority setting the retry loop might prevent timer callback completion on RT. Prevent that by waiting for completion on RT, no change for a non RT kernel.
--- kernel/time/alarmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/alarmtimer.c +1 -1
@@ -392,7 +392,7 @@ int alarm_cancel(struct alarm *alarm)int ret =alarm_try_to_cancel (alarm);if (ret >=0 )return ret; -cpu_relax (); +hrtimer_wait_for_timer (&alarm->timer); } }EXPORT_SYMBOL_GPL (alarm_cancel);
Signature · 1 line
2.14.3
PATCH 2/3 posix-timers: move the rcu head out of the union
In reply to Daniel WagnerFrom: Sebastian Andrzej Siewior <[email protected]>
On RT the timer can be preempted while running and therefore we wait with timer_wait_for_callback() for the timer to complete (instead of busy looping). The RCU-readlock is held to ensure that this posix timer is not removed while we wait on it.
If the timer is removed then it invokes call_rcu() with a pointer that is shared with the hrtimer because it is part of the same union. In order to avoid any possible side effects I am moving the rcu pointer out of the union.
--- include/linux/posix-timers.h | 2 +- kernel/time/posix-timers.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/posix-timers.h +1 -1
@@ -92,8 +92,8 @@ struct k_itimer {struct alarm alarmtimer;ktime_t interval; } alarm; -struct rcu_head rcu; } it; +struct rcu_head rcu; };struct k_clock {
kernel/time/posix-timers.c +2 -2
@@ -567,7 +567,7 @@ static struct k_itimer * alloc_posix_timer(void)static void k_itimer_rcu_free (struct rcu_head *head) { - struct k_itimer *tmr = container_of(head, struct k_itimer, it.rcu); + struct k_itimer *tmr = container_of(head, struct k_itimer, rcu);kmem_cache_free (posix_timers_cache, tmr); }
@@ -584,7 +584,7 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set) }put_pid (tmr->it_pid);sigqueue_free (tmr->sigq); -call_rcu (&tmr->it.rcu, k_itimer_rcu_free); +call_rcu (&tmr->rcu, k_itimer_rcu_free); }static struct k_clock *clockid_to_kclock (const clockid_t id)
Signature · 1 line
2.14.3
PATCH 3/3 Linux 4.4.131-rt148-rc1
In reply to Daniel Wagner--- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
localversion-rt +1 -1
@@ -1 +1 @@ --rt147 +-rt148-rc1
Signature · 1 line
2.14.3