The Status of the Preempt-RT Patch Embedded Conference Europe 2017

Sebastian A. Siewior

Linutronix GmbH

October 24, 2017

Sebastian A. Siewior Linutronix GmbH 1/35 1 Overview

2 The patchqueue

3 Summary

Sebastian A. Siewior Linutronix GmbH 2/35 1 Overview

2 The patchqueue

3 Summary

Sebastian A. Siewior Linutronix GmbH 3/35 What is PREEMPT-RT

A patchset provided for certain kernels Provides realtime functionality Preempts softirq, spinlocks, IRQ-off regions “Is super deterministic, not super fast”

Sebastian A. Siewior Linutronix GmbH 4/35 PREEMPT-RT

Project was without funds for a few years LF announced RTL Collaborative Project in October 2015 Documentation https://rt.wiki.kernel.org https://wiki.linuxfoundation.org/realtime/start Testing https://ci-rt.linutronix.de

Sebastian A. Siewior Linutronix GmbH 5/35 1 Overview

2 The patchqueue

3 Summary

Sebastian A. Siewior Linutronix GmbH 6/35 v3.10

450 400 350 300 250 200 150 100 50 0 v3.10.4-rt1 v3.10.6-rt2 v3.10.6-rt3 v3.10.9-rt4 v3.10.9-rt5 v3.10.10-rt6 v3.10.10-rt7 v3.10.14-rt8 v3.10.14-rt9 v3.10.15-rt10 v3.10.15-rt11 v3.10.17-rt12 v3.10.18-rt13 v3.10.18-rt14

all upstream RT only Sebastian A. Siewior Linutronix GmbH 7/35 v3.12

450 400 350 300 250 200 150 100 50 0 v3.12.0-rt1 v3.12.0-rt2 v3.12.1-rt3 v3.12.1-rt4 v3.12.5-rt5 v3.12.5-rt6 v3.12.5-rt7 v3.12.6-rt8 v3.12.6-rt9 v3.12.8-rt10 v3.12.8-rt11 v3.12.9-rt12 v3.12.9-rt13 v3.12.10-rt14 v3.12.10-rt15 v3.12.11-rt16 v3.12.11-rt17 v3.12.12-rt18 v3.12.12-rt19 v3.12.13-rt20 v3.12.13-rt21 v3.12.14-rt22 v3.12.14-rt23 v3.12.15-rt24 v3.12.15-rt25

all upstream RT only Sebastian A. Siewior Linutronix GmbH 8/35 v3.14

450 400 350 300 250 200 150 100 50 0 v3.14.0-rt1 v3.14.2-rt2 v3.14.2-rt3 v3.14.3-rt4 v3.14.3-rt5

all upstream RT only Sebastian A. Siewior Linutronix GmbH 9/35 v3.18

450 400 350 300 250 200 150 100 50 0 v3.18.7-rt1 v3.18.7-rt2 v3.18.9-rt3 v3.18.9-rt4 v3.18.9-rt5 v3.18.11-rt6 v3.18.11-rt7 v3.18.13-rt8 v3.18.13-rt9 v3.18.13-rt10

all upstream RT only Sebastian A. Siewior Linutronix GmbH 10/35 v4.0

450 400 350 300 250 200 150 100 50 0 v4.0.4-rt1 v4.0.5-rt2 v4.0.5-rt3 v4.0.5-rt4 v4.0.8-rt5 v4.0.8-rt6

all upstream RT only Sebastian A. Siewior Linutronix GmbH 11/35 v4.1

450 400 350 300 250 200 150 100 50 0 v4.1.2-rt1 v4.1.3-rt2 v4.1.3-rt3 v4.1.5-rt4 v4.1.5-rt5 v4.1.6-rt6 v4.1.7-rt7 v4.1.7-rt8 v4.1.10-rt10 v4.1.10-rt11 v4.1.12-rt12 v4.1.12-rt13 v4.1.13-rt14 v4.1.13-rt15 v4.1.15-rt16 v4.1.15-rt17

all upstream RT only Sebastian A. Siewior Linutronix GmbH 12/35 v4.1

450 400 350 300 250 200 150 100 TI GPIO rework 50 0 v4.1.2-rt1 v4.1.3-rt2 v4.1.3-rt3 v4.1.5-rt4 v4.1.5-rt5 v4.1.6-rt6 v4.1.7-rt7 v4.1.7-rt8 v4.1.10-rt10 v4.1.10-rt11 v4.1.12-rt12 v4.1.12-rt13 v4.1.13-rt14 v4.1.13-rt15 v4.1.15-rt16 v4.1.15-rt17

all upstream RT only Sebastian A. Siewior Linutronix GmbH 13/35 v4.4

450 400 350 300 250 200 150 100 50 0 v4.4-rc6-rt1 v4.4-rt2 v4.4-rt3 v4.4.1-rt4 v4.4.1-rt5 v4.4.1-rt6 v4.4.2-rt7 v4.4.3-rt8 v4.4.3-rt9 v4.4.4-rt10 v4.4.4-rt11 v4.4.6-rt12 v4.4.6-rt13 v4.4.6-rt14 v4.4.7-rt15 v4.4.7-rt16 v4.4.9-rt17 v4.4.12-rt18 v4.4.12-rt19

all upstream RT only Sebastian A. Siewior Linutronix GmbH 14/35 v4.4

450 400 350 300 250 200 150 100 AT91, SWAIT in TIP 50 0 v4.4-rc6-rt1 v4.4-rt2 v4.4-rt3 v4.4.1-rt4 v4.4.1-rt5 v4.4.1-rt6 v4.4.2-rt7 v4.4.3-rt8 v4.4.3-rt9 v4.4.4-rt10 v4.4.4-rt11 v4.4.6-rt12 v4.4.6-rt13 v4.4.6-rt14 v4.4.7-rt15 v4.4.7-rt16 v4.4.9-rt17 v4.4.12-rt18 v4.4.12-rt19

all upstream RT only Sebastian A. Siewior Linutronix GmbH 15/35 v4.6

450 400 350 300 250 200 150 100 50 0 v4.6-rc7-rt1 v4.6.1-rt2 v4.6.1-rt3 v4.6.2-rt4 v4.6.2-rt5 v4.6.4-rt6 v4.6.4-rt7 v4.6.4-rt8 v4.6.5-rt9 v4.6.5-rt10 v4.6.7-rt11 v4.6.7-rt12 v4.6.7-rt13 v4.6.7-rt14

all upstream RT only Sebastian A. Siewior Linutronix GmbH 16/35 v4.6

450 400 350 300 250 200 150 100 Timer wheel rework TIP 50 0 v4.6-rc7-rt1 v4.6.1-rt2 v4.6.1-rt3 v4.6.2-rt4 v4.6.2-rt5 v4.6.4-rt6 v4.6.4-rt7 v4.6.4-rt8 v4.6.5-rt9 v4.6.5-rt10 v4.6.7-rt11 v4.6.7-rt12 v4.6.7-rt13 v4.6.7-rt14

all upstream RT only Sebastian A. Siewior Linutronix GmbH 17/35 v4.8

450 400 350 300 250 200 150 100 50 0 v4.8-rt1 v4.8.2-rt2 v4.8.2-rt3 v4.8.6-rt4 v4.8.6-rt5 v4.8.11-rt6 v4.8.11-rt7 v4.8.14-rt8 v4.8.14-rt9 v4.8.15-rt10

all upstream RT only Sebastian A. Siewior Linutronix GmbH 18/35 v4.9

450 400 350 300 250 200 150 100 50 0 v4.9-rt1 v4.9.4-rt2 v4.9.6-rt3 v4.9.6-rt4 v4.9.9-rt5 v4.9.9-rt6 v4.9.10-rt7 v4.9.11-rt8 v4.9.11-rt9 v4.9.13-rt10 v4.9.13-rt11 v4.9.13-rt12 v4.9.18-rt13 v4.9.18-rt14 v4.9.20-rt15 v4.9.20-rt16 v4.9.27-rt17 v4.9.27-rt18 v4.9.30-rt19 v4.9.30-rt20 v4.9.30-rt21 v4.9.33-rt22 v4.9.33-rt23

all upstream RT only Sebastian A. Siewior Linutronix GmbH 19/35 v4.9

450 400 350 300 250 200 150 100 FUTEX rework More FUTEX 50 0 v4.9-rt1 v4.9.4-rt2 v4.9.6-rt3 v4.9.6-rt4 v4.9.9-rt5 v4.9.9-rt6 v4.9.10-rt7 v4.9.11-rt8 v4.9.11-rt9 v4.9.13-rt10 v4.9.13-rt11 v4.9.13-rt12 v4.9.18-rt13 v4.9.18-rt14 v4.9.20-rt15 v4.9.20-rt16 v4.9.27-rt17 v4.9.27-rt18 v4.9.30-rt19 v4.9.30-rt20 v4.9.30-rt21 v4.9.33-rt22 v4.9.33-rt23

all upstream RT only Sebastian A. Siewior Linutronix GmbH 20/35 v4.11

450 400 350 300 250 200 150 100 50 0 v4.11.5-rt1 v4.11.7-rt2 v4.11.7-rt3 v4.11.8-rt4 v4.11.8-rt5 v4.11.9-rt6 v4.11.9-rt7 v4.11.12-rt8 v4.11.12-rt9 v4.11.12-rt10 v4.11.12-rt11 v4.11.12-rt12 v4.11.12-rt13 v4.11.12-rt14 v4.11.12-rt15 v4.11.12-rt16

all upstream RT only Sebastian A. Siewior Linutronix GmbH 21/35 v4.11

450 400 350 300 250 200 HR-Timer rework CPU-Hotplug rework 150 Inter-event tracing 100 50 0 v4.11.5-rt1 v4.11.7-rt2 v4.11.7-rt3 v4.11.8-rt4 v4.11.8-rt5 v4.11.9-rt6 v4.11.9-rt7 v4.11.12-rt8 v4.11.12-rt9 v4.11.12-rt10 v4.11.12-rt11 v4.11.12-rt12 v4.11.12-rt13 v4.11.12-rt14 v4.11.12-rt15 v4.11.12-rt16

all upstream RT only Sebastian A. Siewior Linutronix GmbH 22/35 v4.13

450 400 350 300 250 200 150 100 50 0 v4.13.7-rt1 v4.13.7-rt1

all upstream RT only Sebastian A. Siewior Linutronix GmbH 23/35 Summary

450 400 350 300 250 200 150 100 50 0 v3.10.4-rt1 v3.10.18-rt14 v3.12.0-rt1 v3.12.15-rt25 v3.14.0-rt1 v3.14.3-rt5 v3.18.7-rt1 v3.18.13-rt10 v4.0.4-rt1 v4.0.8-rt6 v4.1.2-rt1 v4.1.15-rt17 v4.4-rc6-rt1 v4.4.12-rt19 v4.6-rc7-rt1 v4.6.7-rt14 v4.8-rt1 v4.8.15-rt10 v4.9-rt1 v4.9.33-rt23 v4.11.5-rt1 v4.11.12-rt16 v4.13.7-rt1

all upstream RT only Sebastian A. Siewior Linutronix GmbH 24/35 Summary

450 400 350 300 250 Queue cleanup 200 150 100 50 0 v3.10.4-rt1 v3.10.18-rt14 v3.12.0-rt1 v3.12.15-rt25 v3.14.0-rt1 v3.14.3-rt5 v3.18.7-rt1 v3.18.13-rt10 v4.0.4-rt1 v4.0.8-rt6 v4.1.2-rt1 v4.1.15-rt17 v4.4-rc6-rt1 v4.4.12-rt19 v4.6-rc7-rt1 v4.6.7-rt14 v4.8-rt1 v4.8.15-rt10 v4.9-rt1 v4.9.33-rt23 v4.11.5-rt1 v4.11.12-rt16 v4.13.7-rt1

all upstream RT only Sebastian A. Siewior Linutronix GmbH 25/35 1 Overview

2 The patchqueue

3 Summary

Sebastian A. Siewior Linutronix GmbH 26/35 The focus during development

v4.4 to v4.9 RT was mostly quiet Focus on upstream and CPU hotplug A few attempts were made in v4.9, finally in v4.11 The strategy changed a few times within RT

Sebastian A. Siewior Linutronix GmbH 27/35 What RT version gets released

Starting with v4.4 every other version Once Greg–KH decides to make a different LTS, we follow that So we got RT for v4.8 and v4.9 we continue every other version until Greg–KH … …v4.13 and v4.14

Sebastian A. Siewior Linutronix GmbH 28/35 What RT versions are maintained

Basically every supported upstream kernel Steven Rostedt maintains most of them Julia Cartwright maintains the v4.1 tree ”Features“ are hardly backported, mostly fixes

Sebastian A. Siewior Linutronix GmbH 29/35 Major pieces

Page fault disable by s/390 timer wheel rework, made NO_HZ_FULL work CPU hotplug rework, started around v4.1 hrtimer rework (pending). Tom Zanussi’s ”tracing: Inter-event (e.g. latency) support“ (pending).

Sebastian A. Siewior Linutronix GmbH 30/35 Tiny pieces

FUTEX rework. Closes PI-deboost problems, unbreaks SCHED_DEADLINE RW- rework (unbreaks the radeon driver) RW- rework. Helps CPU hotplug Fix for a bug exploited by GDB A lot driver and subsystem across tree.

Sebastian A. Siewior Linutronix GmbH 31/35 Outstanding pieces

MM bits. Shorter atomic sections in buddy / SLUB migrate disable local lock network bits printk, serial drivers signal delivery bit spinlocks / list_bl RCU

Sebastian A. Siewior Linutronix GmbH 32/35 Outstanding pieces

simple wait queues dcache try loops and cpu_chill() workqueue locking crypto, FPU sections sleeping spinlocks softirq bits various driver patches

Sebastian A. Siewior Linutronix GmbH 33/35 Required patches vs nice to have

Required features • Sleeping spin locks Nice to have • lazy preempt support Should have but… • preempt disabling handling, WARN_ON

Sebastian A. Siewior Linutronix GmbH 34/35 Thank you for your attention

Contact

Linutronix GmbH Sebastian A. Siewior Auf dem Berg 3 88690 Uhldingen Germany eMail [email protected]

Sebastian A. Siewior Linutronix GmbH 35/35