Skip to content

(hr)timers: Prepare for PREEMPT_RT support

Thomas Gleixner lkml 1 version Applied

Status from this message: The following commit has been merged into the timers/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 15 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/12hrtimer: Remove task argument from hrtimer_init_sleeper()block/blk-mq.c drivers/staging/android/vsoc.c include/linux/hrtimer.h +4 more+10 -112 replies
2/12hrtimer: Consolidate hrtimer_init() + hrtimer_init_sleeper() callsblock/blk-mq.c drivers/staging/android/vsoc.c include/linux/hrtimer.h +4 more+55 -300 replies
3/12hrtimer: Introduce HARD expiry modeinclude/linux/hrtimer.h+6 -00 replies
4/12sched: Mark hrtimers to expire in hard interrupt contextkernel/sched/core.c kernel/sched/deadline.c kernel/sched/fair.c +1 more+8 -60 replies
5/12perf/core: Mark hrtimers to expire in hard interrupt contextkernel/events/core.c+2 -20 replies
6/12watchdog: Mark watchdog_hrtimer to expire in hard interrupt contextkernel/watchdog.c+1 -10 replies
7/12KVM: LAPIC: Mark hrtimer to expire in hard interrupt contextarch/x86/kvm/lapic.c+1 -11 reply
8/12tick: Mark tick related hrtimers to expiry in hard interrupt contextkernel/time/tick-broadcast-hrtimer.c kernel/time/tick-sched.c+2 -20 replies
9/12hrtimer: Move unmarked hrtimers to soft interrupt expiry on RTkernel/time/hrtimer.c+10 -10 replies
10/12hrtimer: Determine hard/soft expiry mode for hrtimer sleepers on RTkernel/time/hrtimer.c+24 -06 replies
11/12hrtimer: Prepare support for PREEMPT_RTinclude/linux/hrtimer.h kernel/time/hrtimer.c+98 -65 replies
12/12timers: Prepare support for PREEMPT_RTinclude/linux/timer.h kernel/time/timer.c+96 -90 replies

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPaolo BonziniSteven Rostedt (VMware)Peter Zijlstra (Intel)
SeriesA-b
1/12R-b
2/12
3/12
4/12
5/12
6/12
7/12A-b
8/12
9/12
10/12R-b
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [patch 00/12] (hr)timers: Prepare for PREEMPT_RT support

The following series brings the bulk of PREEMPT_RT specific changes for the (hr)timer code:

- Handle timer deletion correctly under RT to avoid priority inversion and life locks

This mechanism might be useful for VMs as well when a vCPU executing a timer callback gets scheduled out and on another vCPU del_timer_sync() or hrtimer_cancel() is invoked.

The mitigation would only work when paravirt spinlocks are enabled. I've not implemented that, as I don't know whether this is a real world issue. I just noticed that it is basically the same problem. Adding it would be trivial.

- Prepare for moving most hrtimer callbacks into softirq context and mark timers which need to expire in hard interrupt context even on RT so they don't get moved.

The timerwheel still needs some special handling for IRQSAFE timers (grrrr) which I'm still working on to find a less fugly solution.

Thanks,

tglx