]> git.baikalelectronics.ru Git - kernel.git/commit
time/sched_clock: Expire timer in hardirq context
authorAhmed S. Darwish <a.darwish@linutronix.de>
Mon, 9 Mar 2020 18:15:29 +0000 (18:15 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 19 Mar 2020 08:45:08 +0000 (09:45 +0100)
commit8b27cb3811f7c235268566be0c1ae0cebfba658b
treef0e9ed7bef60befd8c82eeecb6e8a459b8f980a9
parent2895ffd2b7a1b324e0e61d956d4bf4be9b8f7a4f
time/sched_clock: Expire timer in hardirq context

To minimize latency, PREEMPT_RT kernels expires hrtimers in preemptible
softirq context by default. This can be overriden by marking the timer's
expiry with HRTIMER_MODE_HARD.

sched_clock_timer is missing this annotation: if its callback is preempted
and the duration of the preemption exceeds the wrap around time of the
underlying clocksource, sched clock will get out of sync.

Mark the sched_clock_timer for expiry in hard interrupt context.

Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200309181529.26558-1-a.darwish@linutronix.de
kernel/time/sched_clock.c