File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -836,10 +836,18 @@ static void common_timer_wait_running(struct k_itimer *timer)
836
836
}
837
837
838
838
/*
839
- * On PREEMPT_RT this prevent priority inversion against softirq kthread in
840
- * case it gets preempted while executing a timer callback. See comments in
841
- * hrtimer_cancel_wait_running. For PREEMPT_RT=n this just results in a
842
- * cpu_relax().
839
+ * On PREEMPT_RT this prevents priority inversion and a potential livelock
840
+ * against the ksoftirqd thread in case that ksoftirqd gets preempted while
841
+ * executing a hrtimer callback.
842
+ *
843
+ * See the comments in hrtimer_cancel_wait_running(). For PREEMPT_RT=n this
844
+ * just results in a cpu_relax().
845
+ *
846
+ * For POSIX CPU timers with CONFIG_POSIX_CPU_TIMERS_TASK_WORK=n this is
847
+ * just a cpu_relax(). With CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y this
848
+ * prevents spinning on an eventually scheduled out task and a livelock
849
+ * when the task which tries to delete or disarm the timer has preempted
850
+ * the task which runs the expiry in task work context.
843
851
*/
844
852
static struct k_itimer * timer_wait_running (struct k_itimer * timer ,
845
853
unsigned long * flags )
You can’t perform that action at this time.
0 commit comments