SlideShare a Scribd company logo
Ā©2019 VMware, Inc.
RT is about to make it
into mainline!
Now what?
Steven Rostedt
Open Source Engineer
rostedt@goodmis.org / srostedt@vmware.com
2Ā©2019 VMware, Inc.
PREEMPT_RT (aka The RT Patch)
ā—
Started in 2004
ā—
Responsible for (in current mainline)
ā€“ Mutexes
ā€“ Lockdep
ā€“ ftrace
ā€“ high resolution timers
ā€“ NO HZ
ā€“ NO HZ FULL
ā€“ SCHED_DEADLINE
ā€“ Generic interrupts
ā€“ Interrupt threads
ā€“ Real Time Scheduler
3Ā©2019 VMware, Inc.
Goal of PREEMPT_RT
ā—
Making Linux into a hard real-time designed system
ā€“ Too complex to prove it is a true hard real-time system
ā—
Modeling work is helping us in this regard (See Daniel Bristot de Oliveiraā€™s KR talk)
ā€“ All critical sections have a max execution time
ā—
Knowing what that time is, Iā€™ll leave as an academic exercise for you
ā€“ No unbounded latency
ā—
There will always be a bounded latency
ā—
This allows the system to be deterministic
4Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
5Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
https://lwn.net/Articles/263129/
6Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
https://lwn.net/Articles/311258/
7Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
https://lwn.net/Articles/313615/
8Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
https://lwn.net/Articles/367638/
9Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
https://lwn.net/Articles/368120/
10Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
commit a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Wed Jul 17 22:01:49 2019 +0200
sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
Add a new entry to the preemption menu which enables the real-time support
for the kernel. The choice is only enabled when an architecture supports
it.
It selects PREEMPT as the RT features depend on it. To achieve that the
existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as
well.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.ibm.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Clark Williams <williams@redhat.com>
Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Daniel Wagner <wagi@monom.org>
Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Acked-by: Julia Cartwright <julia@ni.com>
Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Acked-by: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Andrew Morton <akpm@linuxfoundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
commit a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Wed Jul 17 22:01:49 2019 +0200
sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
Add a new entry to the preemption menu which enables the real-time support
for the kernel. The choice is only enabled when an architecture supports
it.
It selects PREEMPT as the RT features depend on it. To achieve that the
existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as
well.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.ibm.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Clark Williams <williams@redhat.com>
Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Daniel Wagner <wagi@monom.org>
Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Acked-by: Julia Cartwright <julia@ni.com>
Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Acked-by: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Andrew Morton <akpm@linuxfoundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
12Ā©2019 VMware, Inc.
Huh?
13Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
+config PREEMPT_RT
+ bool "Fully Preemptible Kernel (Real-Time)"
+ depends on EXPERT && ARCH_SUPPORTS_RT
+ select PREEMPT
+ help
+ This option turns the kernel into a real-time kernel by replacing
+ various locking primitives (spinlocks, rwlocks, etc.) with
+ preemptible priority-inheritance aware variants, enforcing
+ interrupt threading and introducing mechanisms to break up long
+ non-preemptible sections. This makes the kernel, except for very
+ low level and critical code pathes (entry code, scheduler, low
+ level interrupt handling) fully preemptible and brings most
+ execution contexts under scheduler control.
+
+ Select this if you are building a kernel for systems which
+ require real-time guarantees.
+
endchoice
14Ā©2019 VMware, Inc.
When will PREEMPT_RT (The Realtime Patch) be merged?
+config PREEMPT_RT
+ bool "Fully Preemptible Kernel (Real-Time)"
+ depends on EXPERT && ARCH_SUPPORTS_RT
+ select PREEMPT
+ help
+ This option turns the kernel into a real-time kernel by replacing
+ various locking primitives (spinlocks, rwlocks, etc.) with
+ preemptible priority-inheritance aware variants, enforcing
+ interrupt threading and introducing mechanisms to break up long
+ non-preemptible sections. This makes the kernel, except for very
+ low level and critical code pathes (entry code, scheduler, low
+ level interrupt handling) fully preemptible and brings most
+ execution contexts under scheduler control.
+
+ Select this if you are building a kernel for systems which
+ require real-time guarantees.
+
endchoice
15Ā©2019 VMware, Inc.
Itā€™s almost there (2020 should have it?)
Now what?
ī€ˆ
What to do with the PREEMPT_RT kernel
ī€ˆ
First, need to get the configs right
16Ā©2019 VMware, Inc.
Select CONFIG_PREEMPT_RT
In the -rt patch itā€™s still CONFIG_PREEMPT_RT_FULL
17Ā©2019 VMware, Inc.
Select CONFIG_NO_HZ_FULL (optional)
Plan on running an RT task is polling mode? - Adds performance
overhead
18Ā©2019 VMware, Inc.
Select CONFIG_HIGH_RES_TIMERS
You do care about precision, right?
19Ā©2019 VMware, Inc.
Select CONFIG_HWLAT_TRACER
Test your system for SMIs and such
20Ā©2019 VMware, Inc.
Select CONFIG_SCHED_TRACER
May want to see scheduling latency (doesnā€™t hurt)
21Ā©2019 VMware, Inc.
Preempt / IRQs Off Latency Tracers
Good to have, but adds significant performance overhead!
22Ā©2019 VMware, Inc.
CONFIG_HIST_TRIGGERS
Can be used to define your own latency measurements
23Ā©2019 VMware, Inc.
Basic RT application coding
mlockall()
ī€ˆ
Avoid unexpected latency due to page faults
CPU affinity
ī€ˆ
Avoid unexpected latency due to migration
ī€ˆ
The more you control, the more deterministic it is
ī€ˆ
Pin tasks to CPUs when possible (keep variables to a minimum)
Priority inheritance Mutex
ī€ˆ
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)
24Ā©2019 VMware, Inc.
Priority Inversion
preempted preempted
A
B
C
blocked
25Ā©2019 VMware, Inc.
Priority Inversion prevented with Priority Inheritance
preempted releases lock
A
B
C
wakes up
blocked sleeps
26Ā©2019 VMware, Inc.
Setting up your machine
Configure your system
ī€ˆ
Know what you need to use
ī€ˆ
What interrupts are important (what devices does your RT task use?)
ī€ˆ
RT gives you the power to destroy yourself
27Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq
root 9 1.6 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/0]
root 21 1.9 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/1]
root 28 2.2 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/2]
root 35 1.3 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/3]
root 148 0.0 0.0 0 0 ? S 17:37 0:00 [irq/9-acpi]
root 163 0.0 0.0 0 0 ? S 17:37 0:00 [irq/14-ata_piix]
root 164 0.0 0.0 0 0 ? S 17:37 0:00 [irq/15-ata_piix]
root 170 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-ehci_hcd]
root 171 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-uhci_hcd]
root 172 0.0 0.0 0 0 ? S 17:37 0:00 [irq/11-uhci_hcd]
root 173 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-uhci_hcd]
root 175 0.0 0.0 0 0 ? S 17:38 0:00 [irq/12-i8042]
root 176 0.0 0.0 0 0 ? S 17:38 0:00 [irq/1-i8042]
root 178 0.0 0.0 0 0 ? S 17:38 0:00 [irq/8-rtc0]
root 422 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-qxl]
root 429 0.0 0.0 0 0 ? S 17:38 0:00 [irq/24-virtio0-]
root 430 0.0 0.0 0 0 ? S 17:38 0:00 [irq/25-virtio0-]
root 431 0.0 0.0 0 0 ? S 17:38 0:00 [irq/26-virtio1-]
root 432 0.2 0.0 0 0 ? S 17:38 0:00 [irq/27-virtio1-]
root 673 0.0 0.0 0 0 ? R 17:38 0:00 [irq/10-virtio2]
root 753 0.0 0.0 0 0 ? S 17:38 0:00 [irq/28-snd_hda_]
root 877 0.0 0.0 0 0 ? S 17:38 0:00 [irq/10-ens9]
root 1267 0.0 0.0 0 0 ? S 17:39 0:00 [irq/4-ttyS0]
28Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq
root 9 1.6 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/0]
root 21 1.9 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/1]
root 28 2.2 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/2]
root 35 1.3 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/3]
root 148 0.0 0.0 0 0 ? S 17:37 0:00 [irq/9-acpi]
root 163 0.0 0.0 0 0 ? S 17:37 0:00 [irq/14-ata_piix]
root 164 0.0 0.0 0 0 ? S 17:37 0:00 [irq/15-ata_piix]
root 170 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-ehci_hcd]
root 171 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-uhci_hcd]
root 172 0.0 0.0 0 0 ? S 17:37 0:00 [irq/11-uhci_hcd]
root 173 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-uhci_hcd]
root 175 0.0 0.0 0 0 ? S 17:38 0:00 [irq/12-i8042]
root 176 0.0 0.0 0 0 ? S 17:38 0:00 [irq/1-i8042]
root 178 0.0 0.0 0 0 ? S 17:38 0:00 [irq/8-rtc0]
root 422 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-qxl]
root 429 0.0 0.0 0 0 ? S 17:38 0:00 [irq/24-virtio0-]
root 430 0.0 0.0 0 0 ? S 17:38 0:00 [irq/25-virtio0-]
root 431 0.0 0.0 0 0 ? S 17:38 0:00 [irq/26-virtio1-]
root 432 0.2 0.0 0 0 ? S 17:38 0:00 [irq/27-virtio1-]
root 673 0.0 0.0 0 0 ? R 17:38 0:00 [irq/10-virtio2]
root 753 0.0 0.0 0 0 ? S 17:38 0:00 [irq/28-snd_hda_]
root 877 0.0 0.0 0 0 ? S 17:38 0:00 [irq/10-ens9]
root 1267 0.0 0.0 0 0 ? S 17:39 0:00 [irq/4-ttyS0]
29Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq
root 9 1.6 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/0]
root 21 1.9 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/1]
root 28 2.2 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/2]
root 35 1.3 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/3]
root 148 0.0 0.0 0 0 ? S 17:37 0:00 [irq/9-acpi]
root 163 0.0 0.0 0 0 ? S 17:37 0:00 [irq/14-ata_piix]
root 164 0.0 0.0 0 0 ? S 17:37 0:00 [irq/15-ata_piix]
root 170 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-ehci_hcd]
root 171 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-uhci_hcd]
root 172 0.0 0.0 0 0 ? S 17:37 0:00 [irq/11-uhci_hcd]
root 173 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-uhci_hcd]
root 175 0.0 0.0 0 0 ? S 17:38 0:00 [irq/12-i8042]
root 176 0.0 0.0 0 0 ? S 17:38 0:00 [irq/1-i8042]
root 178 0.0 0.0 0 0 ? S 17:38 0:00 [irq/8-rtc0]
root 422 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-qxl]
root 429 0.0 0.0 0 0 ? S 17:38 0:00 [irq/24-virtio0-]
root 430 0.0 0.0 0 0 ? S 17:38 0:00 [irq/25-virtio0-]
root 431 0.0 0.0 0 0 ? S 17:38 0:00 [irq/26-virtio1-]
root 432 0.2 0.0 0 0 ? S 17:38 0:00 [irq/27-virtio1-]
root 673 0.0 0.0 0 0 ? R 17:38 0:00 [irq/10-virtio2]
root 753 0.0 0.0 0 0 ? S 17:38 0:00 [irq/28-snd_hda_]
root 877 0.0 0.0 0 0 ? S 17:38 0:00 [irq/10-ens9]
root 1267 0.0 0.0 0 0 ? S 17:39 0:00 [irq/4-ttyS0]
30Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a ; do chrt -p $a; done
pid 9's current scheduling policy: SCHED_OTHER
pid 9's current scheduling priority: 0
pid 21's current scheduling policy: SCHED_OTHER
pid 21's current scheduling priority: 0
pid 28's current scheduling policy: SCHED_OTHER
pid 28's current scheduling priority: 0
pid 35's current scheduling policy: SCHED_OTHER
pid 35's current scheduling priority: 0
pid 148's current scheduling policy: SCHED_FIFO
pid 148's current scheduling priority: 50
pid 163's current scheduling policy: SCHED_FIFO
pid 163's current scheduling priority: 50
pid 164's current scheduling policy: SCHED_FIFO
pid 164's current scheduling priority: 50
pid 170's current scheduling policy: SCHED_FIFO
pid 170's current scheduling priority: 50
pid 171's current scheduling policy: SCHED_FIFO
pid 171's current scheduling priority: 50
pid 172's current scheduling policy: SCHED_FIFO
pid 172's current scheduling priority: 50
pid 173's current scheduling policy: SCHED_FIFO
pid 173's current scheduling priority: 50
pid 175's current scheduling policy: SCHED_FIFO
31Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a ; do chrt -p $a; done
pid 9's current scheduling policy: SCHED_OTHER
pid 9's current scheduling priority: 0
pid 21's current scheduling policy: SCHED_OTHER
pid 21's current scheduling priority: 0
pid 28's current scheduling policy: SCHED_OTHER
pid 28's current scheduling priority: 0
pid 35's current scheduling policy: SCHED_OTHER
pid 35's current scheduling priority: 0
pid 148's current scheduling policy: SCHED_FIFO
pid 148's current scheduling priority: 50
pid 163's current scheduling policy: SCHED_FIFO
pid 163's current scheduling priority: 50
pid 164's current scheduling policy: SCHED_FIFO
pid 164's current scheduling priority: 50
pid 170's current scheduling policy: SCHED_FIFO
pid 170's current scheduling priority: 50
pid 171's current scheduling policy: SCHED_FIFO
pid 171's current scheduling priority: 50
pid 172's current scheduling policy: SCHED_FIFO
pid 172's current scheduling priority: 50
pid 173's current scheduling policy: SCHED_FIFO
pid 173's current scheduling priority: 50
pid 175's current scheduling policy: SCHED_FIFO
32Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a ; do chrt -p $a; done
pid 9's current scheduling policy: SCHED_OTHER
pid 9's current scheduling priority: 0
pid 21's current scheduling policy: SCHED_OTHER
pid 21's current scheduling priority: 0
pid 28's current scheduling policy: SCHED_OTHER
pid 28's current scheduling priority: 0
pid 35's current scheduling policy: SCHED_OTHER
pid 35's current scheduling priority: 0
pid 148's current scheduling policy: SCHED_FIFO
pid 148's current scheduling priority: 50
pid 163's current scheduling policy: SCHED_FIFO
pid 163's current scheduling priority: 50
pid 164's current scheduling policy: SCHED_FIFO
pid 164's current scheduling priority: 50
pid 170's current scheduling policy: SCHED_FIFO
pid 170's current scheduling priority: 50
pid 171's current scheduling policy: SCHED_FIFO
pid 171's current scheduling priority: 50
pid 172's current scheduling policy: SCHED_FIFO
pid 172's current scheduling priority: 50
pid 173's current scheduling policy: SCHED_FIFO
pid 173's current scheduling priority: 50
pid 175's current scheduling policy: SCHED_FIFO
33Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done
pid 9's current affinity mask: 1
pid 21's current affinity mask: 2
pid 28's current affinity mask: 4
pid 35's current affinity mask: 8
pid 148's current affinity mask: 2
pid 163's current affinity mask: 4
pid 164's current affinity mask: 8
pid 170's current affinity mask: 1
pid 171's current affinity mask: 1
pid 172's current affinity mask: 2
pid 173's current affinity mask: 2
pid 175's current affinity mask: 4
pid 176's current affinity mask: 8
pid 178's current affinity mask: 1
pid 422's current affinity mask: 2
pid 429's current affinity mask: 4
pid 430's current affinity mask: 8
pid 431's current affinity mask: 1
pid 432's current affinity mask: 8
pid 673's current affinity mask: 1
pid 753's current affinity mask: 2
pid 877's current affinity mask: 1
pid 1267's current affinity mask: 2
34Ā©2019 VMware, Inc.
Threaded Interrupts
# cat /proc/irq/*/smp_affinity
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
35Ā©2019 VMware, Inc.
Threaded Interrupts
# ls /proc/irq/*/smp_affinity| while read a ; do echo 1 > $a ;done
# cat /proc/irq/*/smp_affinity
f
1
1
1
1
1
1
1
1
1
1
f
1
f
1
1
1
1
1
1
1
36Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done
pid 9's current affinity mask: 1
pid 21's current affinity mask: 2
pid 28's current affinity mask: 4
pid 35's current affinity mask: 8
pid 148's current affinity mask: 2
pid 163's current affinity mask: 4
pid 164's current affinity mask: 8
pid 170's current affinity mask: 1
pid 171's current affinity mask: 1
pid 172's current affinity mask: 1
pid 173's current affinity mask: 1
pid 175's current affinity mask: 4
pid 176's current affinity mask: 8
pid 178's current affinity mask: 1
pid 422's current affinity mask: 1
pid 429's current affinity mask: 4
pid 430's current affinity mask: 8
pid 431's current affinity mask: 1
pid 432's current affinity mask: 8
pid 673's current affinity mask: 1
pid 753's current affinity mask: 2
pid 877's current affinity mask: 1
pid 1267's current affinity mask: 2
37Ā©2019 VMware, Inc.
Threaded Interrupts
# ls /proc/irq/*/smp_affinity| while read a ; do echo 2 > $a ;done
# cat /proc/irq/*/smp_affinity
f
2
2
2
2
2
2
2
2
2
2
f
2
f
2
2
2
2
2
2
2
38Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done
pid 9's current affinity mask: 1
pid 21's current affinity mask: 2
pid 28's current affinity mask: 4
pid 35's current affinity mask: 8
pid 148's current affinity mask: 2
pid 163's current affinity mask: 4
pid 164's current affinity mask: 8
pid 170's current affinity mask: 2
pid 171's current affinity mask: 2
pid 172's current affinity mask: 2
pid 173's current affinity mask: 2
pid 175's current affinity mask: 4
pid 176's current affinity mask: 8
pid 178's current affinity mask: 1
pid 422's current affinity mask: 2
pid 429's current affinity mask: 4
pid 430's current affinity mask: 8
pid 431's current affinity mask: 1
pid 432's current affinity mask: 8
pid 673's current affinity mask: 2
pid 753's current affinity mask: 2
pid 877's current affinity mask: 2
pid 1267's current affinity mask: 2
39Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done
pid 9's current affinity mask: 1
pid 21's current affinity mask: 2
pid 28's current affinity mask: 4
pid 35's current affinity mask: 8
pid 148's current affinity mask: 2
pid 163's current affinity mask: 4
pid 164's current affinity mask: 8
pid 170's current affinity mask: 1
pid 171's current affinity mask: 1
pid 172's current affinity mask: 1
pid 173's current affinity mask: 1
pid 175's current affinity mask: 4
pid 176's current affinity mask: 8
pid 178's current affinity mask: 1
pid 422's current affinity mask: 1
pid 429's current affinity mask: 4
pid 430's current affinity mask: 8
pid 431's current affinity mask: 1
pid 432's current affinity mask: 8
pid 673's current affinity mask: 1
pid 753's current affinity mask: 2
pid 877's current affinity mask: 1
pid 1267's current affinity mask: 2
40Ā©2019 VMware, Inc.
Threaded Interrupts
# ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done
pid 9's current affinity mask: 1
pid 21's current affinity mask: 2
pid 28's current affinity mask: 4
pid 35's current affinity mask: 8
pid 148's current affinity mask: 2
pid 163's current affinity mask: 4
pid 164's current affinity mask: 8
pid 170's current affinity mask: 2
pid 171's current affinity mask: 2
pid 172's current affinity mask: 2
pid 173's current affinity mask: 2
pid 175's current affinity mask: 4
pid 176's current affinity mask: 8
pid 178's current affinity mask: 1
pid 422's current affinity mask: 2
pid 429's current affinity mask: 4
pid 430's current affinity mask: 8
pid 431's current affinity mask: 1
pid 432's current affinity mask: 8
pid 673's current affinity mask: 2
pid 753's current affinity mask: 2
pid 877's current affinity mask: 2
pid 1267's current affinity mask: 2
41Ā©2019 VMware, Inc.
Check your system
Real-time is more than just a kernel
The hardware must not induce latency
ī€ˆ
Your OS is only as good as the hardware it runs on
Need to worry about System Management Interrupts (SMI)
ī€ˆ
Triggered by the BIOS
ī€ˆ
The OS (Linux) has no control over them
ī€ˆ
Can be used to monitor thermal (fans) and memory (ECC)
Use the hwlat tracer to detect this
42Ā©2019 VMware, Inc.
hwlat tracer
# trace-cmd start -p hwlat
# trace-cmd show
# tracer: hwlat
#
# entries-in-buffer/entries-written: 39/39 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _----=> need-resched
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# ||||/ delay
# TASK-PID CPU# ||||| TIMESTAMP FUNCTION
# | | | ||||| | |
<...>-1981 [001] d.L.... 17454.195055: #1 inner/outer(us): 631/321 ts:1569119307.978708067
<...>-1981 [002] d.L.... 17455.314708: #2 inner/outer(us): 311/244 ts:1569119308.988240898
<...>-1981 [003] d.L.... 17456.220180: #3 inner/outer(us): 699/672 ts:1569119309.996060780
<...>-1981 [000] d...... 17457.264116: #4 inner/outer(us): 165/219 ts:1569119311.003999819
<...>-1981 [001] d...... 17458.344601: #5 inner/outer(us): 32/44 ts:1569119312.012000302
<...>-1981 [002] d.L.... 17459.239703: #6 inner/outer(us): 326/496 ts:1569119313.020149009
<...>-1981 [000] d...... 17461.156198: #8 inner/outer(us): 117/548 ts:1569119315.036214857
<...>-1981 [001] d...... 17462.344629: #9 inner/outer(us): 908/82 ts:1569119316.044070049
<...>-1981 [003] d...... 17463.909470: #11 inner/outer(us): 172/860 ts:1569119318.060040701
<...>-1981 [000] d...... 17465.196280: #12 inner/outer(us): 876/783 ts:1569119319.068065360
<...>-1981 [001] d...... 17466.118113: #13 inner/outer(us): 29/25 ts:1569119320.076075661
<...>-1981 [002] d...... 17466.933660: #14 inner/outer(us): 251/29 ts:1569119321.084216130
<...>-1981 [003] d...... 17467.941405: #15 inner/outer(us): 177/632 ts:1569119322.091966450
<...>-1981 [000] d...... 17469.196170: #16 inner/outer(us): 656/711 ts:1569119323.099677972
<...>-1981 [001] d...... 17470.158097: #17 inner/outer(us): 162/29 ts:1569119324.107980626
<...>-1981 [002] d...... 17470.965666: #18 inner/outer(us): 211/975 ts:1569119325.116225970
<...>-1981 [003] d.L.... 17472.334110: #19 inner/outer(us): 656/845 ts:1569119326.124090524
<...>-1981 [000] d...... 17473.196171: #20 inner/outer(us): 197/64 ts:1569119327.132047281
<...>-1981 [001] d...... 17473.989240: #21 inner/outer(us): 2282/80 ts:1569119328.139772360
<...>-1981 [002] d...... 17475.003012: #22 inner/outer(us): 219/9624 ts:1569119329.153625986
43Ā©2019 VMware, Inc.
hwlat tracer
# trace-cmd start -p hwlat
# trace-cmd show
# tracer: hwlat
#
# entries-in-buffer/entries-written: 39/39 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _----=> need-resched
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# ||||/ delay
# TASK-PID CPU# ||||| TIMESTAMP FUNCTION
# | | | ||||| | |
<...>-1981 [001] d.L.... 17454.195055: #1 inner/outer(us): 631/321 ts:1569119307.978708067
<...>-1981 [002] d.L.... 17455.314708: #2 inner/outer(us): 311/244 ts:1569119308.988240898
<...>-1981 [003] d.L.... 17456.220180: #3 inner/outer(us): 699/672 ts:1569119309.996060780
<...>-1981 [000] d...... 17457.264116: #4 inner/outer(us): 165/219 ts:1569119311.003999819
<...>-1981 [001] d...... 17458.344601: #5 inner/outer(us): 32/44 ts:1569119312.012000302
<...>-1981 [002] d.L.... 17459.239703: #6 inner/outer(us): 326/496 ts:1569119313.020149009
<...>-1981 [000] d...... 17461.156198: #8 inner/outer(us): 117/548 ts:1569119315.036214857
<...>-1981 [001] d...... 17462.344629: #9 inner/outer(us): 908/82 ts:1569119316.044070049
<...>-1981 [003] d...... 17463.909470: #11 inner/outer(us): 172/860 ts:1569119318.060040701
<...>-1981 [000] d...... 17465.196280: #12 inner/outer(us): 876/783 ts:1569119319.068065360
<...>-1981 [001] d...... 17466.118113: #13 inner/outer(us): 29/25 ts:1569119320.076075661
<...>-1981 [002] d...... 17466.933660: #14 inner/outer(us): 251/29 ts:1569119321.084216130
<...>-1981 [003] d...... 17467.941405: #15 inner/outer(us): 177/632 ts:1569119322.091966450
<...>-1981 [000] d...... 17469.196170: #16 inner/outer(us): 656/711 ts:1569119323.099677972
<...>-1981 [001] d...... 17470.158097: #17 inner/outer(us): 162/29 ts:1569119324.107980626
<...>-1981 [002] d...... 17470.965666: #18 inner/outer(us): 211/975 ts:1569119325.116225970
<...>-1981 [003] d.L.... 17472.334110: #19 inner/outer(us): 656/845 ts:1569119326.124090524
<...>-1981 [000] d...... 17473.196171: #20 inner/outer(us): 197/64 ts:1569119327.132047281
<...>-1981 [001] d...... 17473.989240: #21 inner/outer(us): 2282/80 ts:1569119328.139772360
<...>-1981 [002] d...... 17475.003012: #22 inner/outer(us): 219/9624 ts:1569119329.153625986
44Ā©2019 VMware, Inc.
9624 microsecond latency?
45Ā©2019 VMware, Inc.
9624 microsecond latency?
# cat /proc/cpuinfo | head
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Common KVM processor
stepping : 1
microcode : 0x1
cpu MHz : 1896.000
cache size : 16384 KB
physical id : 0
46Ā©2019 VMware, Inc.
NO_HZ_FULL
Good example of seeing how the system is behaving
Command line: isolcpus=2,3 rcu_nocbs=2,3
ī€ˆ
Isolating CPUs 2 and 3
ī€ˆ
Have RCU callbacks for CPU 2 and 3 run on other CPUs
Test with a user spinner program
ī€ˆ
Does nothing but spins (tests to see if we stay in userspace)
ī€ˆ
Use KernelShark to see if it gets interrupted
47Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
48Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
49Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
50Ā©2019 VMware, Inc.
NO_HZ_FULL
# ls /proc/irq/*/smp_affinity| while read a ; do echo f3 > $a ;done
# cat /proc/irq/*/smp_affinity
ff
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
f3
ff
f3
f3
f3
f3
f3
51Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
52Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
53Ā©2019 VMware, Inc.
NO_HZ_FULL
Command line: isolcpus=2,3 rcu_nocbs=2,3 nowatchdog
ī€ˆ
Isolating CPUs 2 and 3
ī€ˆ
Have RCU callbacks for CPU 2 and 3 run on other CPUs
ī€ˆ
Turn off watchdogs
ā€“ Will not detect hard lockups!
54Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
55Ā©2019 VMware, Inc.
NO_HZ_FULL
__visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
{
ipi_entering_ack_irq();
trace_call_function_entry(CALL_FUNCTION_VECTOR);
inc_irq_stat(irq_call_count);
generic_smp_call_function_interrupt();
trace_call_function_exit(CALL_FUNCTION_VECTOR);
exiting_irq();
}
56Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph -g 'generic_smp_call_function_*'-M 4 
taskset -c 2 /work/c/userspin 30
57Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph -g 'generic_smp_call_function_*' 
-l 'tick_nohz_full*:stacktrace' -M ff taskset -c 2 /work/c/userspin 30
# trace-cmd report
[..]
ksoftirqd/1-20 [001] 1758.326782: timer_start: timer=0xffffffff828fb640 function=clocksource_watchdog
expires=4296424801 [timeout=497] cpu=2 idx=109 flags=D|P|I
ksoftirqd/1-20 [001] 1758.326792: kernel_stack: <stack trace >
=> ftrace_call (ffffffff81a01811)
=> tick_nohz_full_kick_cpu (ffffffff8116d995)
=> add_timer_on (ffffffff81158d71)
=> clocksource_watchdog (ffffffff811614b4)
=> run_timer_softirq (ffffffff811595a0)
=> __do_softirq (ffffffff81c000e6)
=> run_ksoftirqd (ffffffff810d938b)
=> smpboot_thread_fn (ffffffff810fc161)
=> kthread (ffffffff810f7c3d)
=> ret_from_fork (ffffffff81a00215)
58Ā©2019 VMware, Inc.
NO_HZ_FULL
Command line: isolcpus=2,3 rcu_nocbs=2,3 nowatchdog tsc=reliable
ī€ˆ
Isolating CPUs 2 and 3
ī€ˆ
Have RCU callbacks for CPU 2 and 3 run on other CPUs
ī€ˆ
Turn off watchdogs
ā€“ Will not detect hard lockups!
ī€ˆ
Tell the kernel the TSC is reliable
ā€“ In other words, lie about it!
59Ā©2019 VMware, Inc.
NO_HZ_FULL
# trace-cmd record -e all -p function_graph -g 'generic_smp_call_function_*'-M ff 
taskset -c 2 /work/c/userspin 30
Thank You

More Related Content

What's hot

Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
Macpaul Lin
Ā 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
Anne Nicolas
Ā 
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
Min-Yih Hsu
Ā 
Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...
SZ Lin
Ā 
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Shinya Takamaeda-Y
Ā 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
RISC-V International
Ā 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Anne Nicolas
Ā 
Hardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux conHardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux con
sprdd
Ā 
Using Qt under LGPLv3
Using Qt under LGPLv3Using Qt under LGPLv3
Using Qt under LGPLv3
Burkhard Stubert
Ā 
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
The Linux Foundation
Ā 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
SZ Lin
Ā 
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
雄也 ę—„äø‹éƒØ
Ā 
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an exampleHow to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
Andrei Kholodnyi
Ā 
Devconf2017 - Can VMs networking benefit from DPDK
Devconf2017 - Can VMs networking benefit from DPDKDevconf2017 - Can VMs networking benefit from DPDK
Devconf2017 - Can VMs networking benefit from DPDK
Maxime Coquelin
Ā 
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edgeTSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
Andrei Kholodnyi
Ā 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Anne Nicolas
Ā 
SGX Trusted Execution Environment
SGX Trusted Execution EnvironmentSGX Trusted Execution Environment
SGX Trusted Execution Environment
Kernel TLV
Ā 
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on HypervisorTurtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
Andrei Kholodnyi
Ā 
LF_OVS_17_Red Hat's perspective on OVS HW Offload Status
LF_OVS_17_Red Hat's perspective on OVS HW Offload StatusLF_OVS_17_Red Hat's perspective on OVS HW Offload Status
LF_OVS_17_Red Hat's perspective on OVS HW Offload Status
LF_OpenvSwitch
Ā 

What's hot (20)

Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
Ā 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
Ā 
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
Ā 
Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...
Ā 
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Ā 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
Ā 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Ā 
Hardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux conHardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux con
Ā 
Using Qt under LGPLv3
Using Qt under LGPLv3Using Qt under LGPLv3
Using Qt under LGPLv3
Ā 
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
Ā 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
Ā 
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
Ā 
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an exampleHow to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
Ā 
Devconf2017 - Can VMs networking benefit from DPDK
Devconf2017 - Can VMs networking benefit from DPDKDevconf2017 - Can VMs networking benefit from DPDK
Devconf2017 - Can VMs networking benefit from DPDK
Ā 
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edgeTSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
Ā 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on Zedboard
Ā 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Ā 
SGX Trusted Execution Environment
SGX Trusted Execution EnvironmentSGX Trusted Execution Environment
SGX Trusted Execution Environment
Ā 
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on HypervisorTurtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
Ā 
LF_OVS_17_Red Hat's perspective on OVS HW Offload Status
LF_OVS_17_Red Hat's perspective on OVS HW Offload StatusLF_OVS_17_Red Hat's perspective on OVS HW Offload Status
LF_OVS_17_Red Hat's perspective on OVS HW Offload Status
Ā 

Similar to Embedded Recipes 2019 - RT is about to make it to mainline. Now what?

Oracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdfOracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdf
Alex446314
Ā 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
Rajan Kumar
Ā 
Vx works RTOS
Vx works RTOSVx works RTOS
Vx works RTOS
Sai Malleswar
Ā 
Apache cassandra v4.0
Apache cassandra v4.0Apache cassandra v4.0
Apache cassandra v4.0
Yuki Morishita
Ā 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
Freddy BuenaƱo
Ā 
Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018
The Linux Foundation
Ā 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
Altinity Ltd
Ā 
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch ProtectionsNSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections
NoSuchCon
Ā 
Beginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresBeginners Guide to High Availability for Postgres
Beginners Guide to High Availability for Postgres
EDB
Ā 
The Container Security Checklist
The Container Security Checklist The Container Security Checklist
The Container Security Checklist
LibbySchulze
Ā 
Linux scheduler
Linux schedulerLinux scheduler
Linux scheduler
Liran Ben Haim
Ā 
Trends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient PerformanceTrends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient Performance
inside-BigData.com
Ā 
NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...
NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...
NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...
VirtualTech Japan Inc.
Ā 
Where Did All These Cycles Go?
Where Did All These Cycles Go?Where Did All These Cycles Go?
Where Did All These Cycles Go?
ScyllaDB
Ā 
Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018
Ashley Roach
Ā 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
Tamas K Lengyel
Ā 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
InfluxData
Ā 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
coolmirza143
Ā 
RTDroid_Presentation
RTDroid_PresentationRTDroid_Presentation
RTDroid_Presentation
Aswin Bharadwaj
Ā 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
InfluxData
Ā 

Similar to Embedded Recipes 2019 - RT is about to make it to mainline. Now what? (20)

Oracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdfOracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdf
Ā 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
Ā 
Vx works RTOS
Vx works RTOSVx works RTOS
Vx works RTOS
Ā 
Apache cassandra v4.0
Apache cassandra v4.0Apache cassandra v4.0
Apache cassandra v4.0
Ā 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
Ā 
Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018
Ā 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
Ā 
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch ProtectionsNSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections
Ā 
Beginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresBeginners Guide to High Availability for Postgres
Beginners Guide to High Availability for Postgres
Ā 
The Container Security Checklist
The Container Security Checklist The Container Security Checklist
The Container Security Checklist
Ā 
Linux scheduler
Linux schedulerLinux scheduler
Linux scheduler
Ā 
Trends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient PerformanceTrends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient Performance
Ā 
NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...
NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...
NTTćƒ‰ć‚³ćƒ¢ę§˜ å°Žå…„äŗ‹ä¾‹ OpenStack Summit 2015 Tokyo č¬›ę¼”ć€ŒAfter One year of OpenStack Cloud...
Ā 
Where Did All These Cycles Go?
Where Did All These Cycles Go?Where Did All These Cycles Go?
Where Did All These Cycles Go?
Ā 
Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018
Ā 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
Ā 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Ā 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
Ā 
RTDroid_Presentation
RTDroid_PresentationRTDroid_Presentation
RTDroid_Presentation
Ā 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
Ā 

More from Anne Nicolas

Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Anne Nicolas
Ā 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
Anne Nicolas
Ā 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Anne Nicolas
Ā 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Anne Nicolas
Ā 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Anne Nicolas
Ā 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
Anne Nicolas
Ā 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
Anne Nicolas
Ā 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Anne Nicolas
Ā 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Anne Nicolas
Ā 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
Anne Nicolas
Ā 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Anne Nicolas
Ā 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
Anne Nicolas
Ā 
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Anne Nicolas
Ā 
Kernel Recipes 2019 - XDP closer integration with network stack
Kernel Recipes 2019 -  XDP closer integration with network stackKernel Recipes 2019 -  XDP closer integration with network stack
Kernel Recipes 2019 - XDP closer integration with network stack
Anne Nicolas
Ā 
Kernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doorsKernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doors
Anne Nicolas
Ā 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
Anne Nicolas
Ā 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Anne Nicolas
Ā 
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on LinuxKernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
Anne Nicolas
Ā 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at Facebook
Anne Nicolas
Ā 
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Anne Nicolas
Ā 

More from Anne Nicolas (20)

Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Ā 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
Ā 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Ā 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Ā 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Ā 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
Ā 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
Ā 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Ā 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Ā 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
Ā 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Ā 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
Ā 
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Ā 
Kernel Recipes 2019 - XDP closer integration with network stack
Kernel Recipes 2019 -  XDP closer integration with network stackKernel Recipes 2019 -  XDP closer integration with network stack
Kernel Recipes 2019 - XDP closer integration with network stack
Ā 
Kernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doorsKernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doors
Ā 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
Ā 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Ā 
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on LinuxKernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
Ā 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at Facebook
Ā 
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Ā 

Recently uploaded

GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
Ā 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
Ā 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
Ā 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
Ā 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
Ā 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
Ā 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
Ā 
Need for Speed: Removing speed bumps from your Symfony projects āš”ļø
Need for Speed: Removing speed bumps from your Symfony projects āš”ļøNeed for Speed: Removing speed bumps from your Symfony projects āš”ļø
Need for Speed: Removing speed bumps from your Symfony projects āš”ļø
Łukasz Chruściel
Ā 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
Ā 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
Ā 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
Ā 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
Ā 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
Ā 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
Ā 
KuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CD
KuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CDKuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CD
KuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CD
rodomar2
Ā 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
Ā 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
Ā 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
Ā 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
Ā 
UI5con 2024 - Keynote: Latest News about UI5 and itā€™s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and itā€™s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and itā€™s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and itā€™s Ecosystem
Peter Muessig
Ā 

Recently uploaded (20)

GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Ā 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Ā 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Ā 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Ā 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
Ā 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Ā 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Ā 
Need for Speed: Removing speed bumps from your Symfony projects āš”ļø
Need for Speed: Removing speed bumps from your Symfony projects āš”ļøNeed for Speed: Removing speed bumps from your Symfony projects āš”ļø
Need for Speed: Removing speed bumps from your Symfony projects āš”ļø
Ā 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Ā 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Ā 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Ā 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ā 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Ā 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
Ā 
KuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CD
KuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CDKuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CD
KuberTENes Birthday Bash Guadalajara - IntroducciĆ³n a Argo CD
Ā 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Ā 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
Ā 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Ā 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
Ā 
UI5con 2024 - Keynote: Latest News about UI5 and itā€™s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and itā€™s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and itā€™s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and itā€™s Ecosystem
Ā 

Embedded Recipes 2019 - RT is about to make it to mainline. Now what?

  • 1. Ā©2019 VMware, Inc. RT is about to make it into mainline! Now what? Steven Rostedt Open Source Engineer rostedt@goodmis.org / srostedt@vmware.com
  • 2. 2Ā©2019 VMware, Inc. PREEMPT_RT (aka The RT Patch) ā— Started in 2004 ā— Responsible for (in current mainline) ā€“ Mutexes ā€“ Lockdep ā€“ ftrace ā€“ high resolution timers ā€“ NO HZ ā€“ NO HZ FULL ā€“ SCHED_DEADLINE ā€“ Generic interrupts ā€“ Interrupt threads ā€“ Real Time Scheduler
  • 3. 3Ā©2019 VMware, Inc. Goal of PREEMPT_RT ā— Making Linux into a hard real-time designed system ā€“ Too complex to prove it is a true hard real-time system ā— Modeling work is helping us in this regard (See Daniel Bristot de Oliveiraā€™s KR talk) ā€“ All critical sections have a max execution time ā— Knowing what that time is, Iā€™ll leave as an academic exercise for you ā€“ No unbounded latency ā— There will always be a bounded latency ā— This allows the system to be deterministic
  • 4. 4Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged?
  • 5. 5Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? https://lwn.net/Articles/263129/
  • 6. 6Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? https://lwn.net/Articles/311258/
  • 7. 7Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? https://lwn.net/Articles/313615/
  • 8. 8Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? https://lwn.net/Articles/367638/
  • 9. 9Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? https://lwn.net/Articles/368120/
  • 10. 10Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? commit a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Author: Thomas Gleixner <tglx@linutronix.de> Date: Wed Jul 17 22:01:49 2019 +0200 sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT Add a new entry to the preemption menu which enables the real-time support for the kernel. The choice is only enabled when an architecture supports it. It selects PREEMPT as the RT features depend on it. To achieve that the existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as well. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.ibm.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Clark Williams <williams@redhat.com> Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com> Acked-by: Frederic Weisbecker <frederic@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Daniel Wagner <wagi@monom.org> Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Acked-by: Julia Cartwright <julia@ni.com> Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Acked-by: Sebastian Siewior <bigeasy@linutronix.de> Cc: Andrew Morton <akpm@linuxfoundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • 11. 11Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? commit a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Author: Thomas Gleixner <tglx@linutronix.de> Date: Wed Jul 17 22:01:49 2019 +0200 sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT Add a new entry to the preemption menu which enables the real-time support for the kernel. The choice is only enabled when an architecture supports it. It selects PREEMPT as the RT features depend on it. To achieve that the existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as well. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.ibm.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Clark Williams <williams@redhat.com> Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com> Acked-by: Frederic Weisbecker <frederic@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Daniel Wagner <wagi@monom.org> Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Acked-by: Julia Cartwright <julia@ni.com> Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Acked-by: Sebastian Siewior <bigeasy@linutronix.de> Cc: Andrew Morton <akpm@linuxfoundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • 13. 13Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice
  • 14. 14Ā©2019 VMware, Inc. When will PREEMPT_RT (The Realtime Patch) be merged? +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice
  • 15. 15Ā©2019 VMware, Inc. Itā€™s almost there (2020 should have it?) Now what? ī€ˆ What to do with the PREEMPT_RT kernel ī€ˆ First, need to get the configs right
  • 16. 16Ā©2019 VMware, Inc. Select CONFIG_PREEMPT_RT In the -rt patch itā€™s still CONFIG_PREEMPT_RT_FULL
  • 17. 17Ā©2019 VMware, Inc. Select CONFIG_NO_HZ_FULL (optional) Plan on running an RT task is polling mode? - Adds performance overhead
  • 18. 18Ā©2019 VMware, Inc. Select CONFIG_HIGH_RES_TIMERS You do care about precision, right?
  • 19. 19Ā©2019 VMware, Inc. Select CONFIG_HWLAT_TRACER Test your system for SMIs and such
  • 20. 20Ā©2019 VMware, Inc. Select CONFIG_SCHED_TRACER May want to see scheduling latency (doesnā€™t hurt)
  • 21. 21Ā©2019 VMware, Inc. Preempt / IRQs Off Latency Tracers Good to have, but adds significant performance overhead!
  • 22. 22Ā©2019 VMware, Inc. CONFIG_HIST_TRIGGERS Can be used to define your own latency measurements
  • 23. 23Ā©2019 VMware, Inc. Basic RT application coding mlockall() ī€ˆ Avoid unexpected latency due to page faults CPU affinity ī€ˆ Avoid unexpected latency due to migration ī€ˆ The more you control, the more deterministic it is ī€ˆ Pin tasks to CPUs when possible (keep variables to a minimum) Priority inheritance Mutex ī€ˆ pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)
  • 24. 24Ā©2019 VMware, Inc. Priority Inversion preempted preempted A B C blocked
  • 25. 25Ā©2019 VMware, Inc. Priority Inversion prevented with Priority Inheritance preempted releases lock A B C wakes up blocked sleeps
  • 26. 26Ā©2019 VMware, Inc. Setting up your machine Configure your system ī€ˆ Know what you need to use ī€ˆ What interrupts are important (what devices does your RT task use?) ī€ˆ RT gives you the power to destroy yourself
  • 27. 27Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq root 9 1.6 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/0] root 21 1.9 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/1] root 28 2.2 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/2] root 35 1.3 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/3] root 148 0.0 0.0 0 0 ? S 17:37 0:00 [irq/9-acpi] root 163 0.0 0.0 0 0 ? S 17:37 0:00 [irq/14-ata_piix] root 164 0.0 0.0 0 0 ? S 17:37 0:00 [irq/15-ata_piix] root 170 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-ehci_hcd] root 171 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-uhci_hcd] root 172 0.0 0.0 0 0 ? S 17:37 0:00 [irq/11-uhci_hcd] root 173 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-uhci_hcd] root 175 0.0 0.0 0 0 ? S 17:38 0:00 [irq/12-i8042] root 176 0.0 0.0 0 0 ? S 17:38 0:00 [irq/1-i8042] root 178 0.0 0.0 0 0 ? S 17:38 0:00 [irq/8-rtc0] root 422 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-qxl] root 429 0.0 0.0 0 0 ? S 17:38 0:00 [irq/24-virtio0-] root 430 0.0 0.0 0 0 ? S 17:38 0:00 [irq/25-virtio0-] root 431 0.0 0.0 0 0 ? S 17:38 0:00 [irq/26-virtio1-] root 432 0.2 0.0 0 0 ? S 17:38 0:00 [irq/27-virtio1-] root 673 0.0 0.0 0 0 ? R 17:38 0:00 [irq/10-virtio2] root 753 0.0 0.0 0 0 ? S 17:38 0:00 [irq/28-snd_hda_] root 877 0.0 0.0 0 0 ? S 17:38 0:00 [irq/10-ens9] root 1267 0.0 0.0 0 0 ? S 17:39 0:00 [irq/4-ttyS0]
  • 28. 28Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq root 9 1.6 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/0] root 21 1.9 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/1] root 28 2.2 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/2] root 35 1.3 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/3] root 148 0.0 0.0 0 0 ? S 17:37 0:00 [irq/9-acpi] root 163 0.0 0.0 0 0 ? S 17:37 0:00 [irq/14-ata_piix] root 164 0.0 0.0 0 0 ? S 17:37 0:00 [irq/15-ata_piix] root 170 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-ehci_hcd] root 171 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-uhci_hcd] root 172 0.0 0.0 0 0 ? S 17:37 0:00 [irq/11-uhci_hcd] root 173 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-uhci_hcd] root 175 0.0 0.0 0 0 ? S 17:38 0:00 [irq/12-i8042] root 176 0.0 0.0 0 0 ? S 17:38 0:00 [irq/1-i8042] root 178 0.0 0.0 0 0 ? S 17:38 0:00 [irq/8-rtc0] root 422 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-qxl] root 429 0.0 0.0 0 0 ? S 17:38 0:00 [irq/24-virtio0-] root 430 0.0 0.0 0 0 ? S 17:38 0:00 [irq/25-virtio0-] root 431 0.0 0.0 0 0 ? S 17:38 0:00 [irq/26-virtio1-] root 432 0.2 0.0 0 0 ? S 17:38 0:00 [irq/27-virtio1-] root 673 0.0 0.0 0 0 ? R 17:38 0:00 [irq/10-virtio2] root 753 0.0 0.0 0 0 ? S 17:38 0:00 [irq/28-snd_hda_] root 877 0.0 0.0 0 0 ? S 17:38 0:00 [irq/10-ens9] root 1267 0.0 0.0 0 0 ? S 17:39 0:00 [irq/4-ttyS0]
  • 29. 29Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq root 9 1.6 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/0] root 21 1.9 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/1] root 28 2.2 0.0 0 0 ? S 17:37 0:03 [ksoftirqd/2] root 35 1.3 0.0 0 0 ? S 17:37 0:02 [ksoftirqd/3] root 148 0.0 0.0 0 0 ? S 17:37 0:00 [irq/9-acpi] root 163 0.0 0.0 0 0 ? S 17:37 0:00 [irq/14-ata_piix] root 164 0.0 0.0 0 0 ? S 17:37 0:00 [irq/15-ata_piix] root 170 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-ehci_hcd] root 171 0.0 0.0 0 0 ? S 17:37 0:00 [irq/10-uhci_hcd] root 172 0.0 0.0 0 0 ? S 17:37 0:00 [irq/11-uhci_hcd] root 173 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-uhci_hcd] root 175 0.0 0.0 0 0 ? S 17:38 0:00 [irq/12-i8042] root 176 0.0 0.0 0 0 ? S 17:38 0:00 [irq/1-i8042] root 178 0.0 0.0 0 0 ? S 17:38 0:00 [irq/8-rtc0] root 422 0.0 0.0 0 0 ? S 17:38 0:00 [irq/11-qxl] root 429 0.0 0.0 0 0 ? S 17:38 0:00 [irq/24-virtio0-] root 430 0.0 0.0 0 0 ? S 17:38 0:00 [irq/25-virtio0-] root 431 0.0 0.0 0 0 ? S 17:38 0:00 [irq/26-virtio1-] root 432 0.2 0.0 0 0 ? S 17:38 0:00 [irq/27-virtio1-] root 673 0.0 0.0 0 0 ? R 17:38 0:00 [irq/10-virtio2] root 753 0.0 0.0 0 0 ? S 17:38 0:00 [irq/28-snd_hda_] root 877 0.0 0.0 0 0 ? S 17:38 0:00 [irq/10-ens9] root 1267 0.0 0.0 0 0 ? S 17:39 0:00 [irq/4-ttyS0]
  • 30. 30Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a ; do chrt -p $a; done pid 9's current scheduling policy: SCHED_OTHER pid 9's current scheduling priority: 0 pid 21's current scheduling policy: SCHED_OTHER pid 21's current scheduling priority: 0 pid 28's current scheduling policy: SCHED_OTHER pid 28's current scheduling priority: 0 pid 35's current scheduling policy: SCHED_OTHER pid 35's current scheduling priority: 0 pid 148's current scheduling policy: SCHED_FIFO pid 148's current scheduling priority: 50 pid 163's current scheduling policy: SCHED_FIFO pid 163's current scheduling priority: 50 pid 164's current scheduling policy: SCHED_FIFO pid 164's current scheduling priority: 50 pid 170's current scheduling policy: SCHED_FIFO pid 170's current scheduling priority: 50 pid 171's current scheduling policy: SCHED_FIFO pid 171's current scheduling priority: 50 pid 172's current scheduling policy: SCHED_FIFO pid 172's current scheduling priority: 50 pid 173's current scheduling policy: SCHED_FIFO pid 173's current scheduling priority: 50 pid 175's current scheduling policy: SCHED_FIFO
  • 31. 31Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a ; do chrt -p $a; done pid 9's current scheduling policy: SCHED_OTHER pid 9's current scheduling priority: 0 pid 21's current scheduling policy: SCHED_OTHER pid 21's current scheduling priority: 0 pid 28's current scheduling policy: SCHED_OTHER pid 28's current scheduling priority: 0 pid 35's current scheduling policy: SCHED_OTHER pid 35's current scheduling priority: 0 pid 148's current scheduling policy: SCHED_FIFO pid 148's current scheduling priority: 50 pid 163's current scheduling policy: SCHED_FIFO pid 163's current scheduling priority: 50 pid 164's current scheduling policy: SCHED_FIFO pid 164's current scheduling priority: 50 pid 170's current scheduling policy: SCHED_FIFO pid 170's current scheduling priority: 50 pid 171's current scheduling policy: SCHED_FIFO pid 171's current scheduling priority: 50 pid 172's current scheduling policy: SCHED_FIFO pid 172's current scheduling priority: 50 pid 173's current scheduling policy: SCHED_FIFO pid 173's current scheduling priority: 50 pid 175's current scheduling policy: SCHED_FIFO
  • 32. 32Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a ; do chrt -p $a; done pid 9's current scheduling policy: SCHED_OTHER pid 9's current scheduling priority: 0 pid 21's current scheduling policy: SCHED_OTHER pid 21's current scheduling priority: 0 pid 28's current scheduling policy: SCHED_OTHER pid 28's current scheduling priority: 0 pid 35's current scheduling policy: SCHED_OTHER pid 35's current scheduling priority: 0 pid 148's current scheduling policy: SCHED_FIFO pid 148's current scheduling priority: 50 pid 163's current scheduling policy: SCHED_FIFO pid 163's current scheduling priority: 50 pid 164's current scheduling policy: SCHED_FIFO pid 164's current scheduling priority: 50 pid 170's current scheduling policy: SCHED_FIFO pid 170's current scheduling priority: 50 pid 171's current scheduling policy: SCHED_FIFO pid 171's current scheduling priority: 50 pid 172's current scheduling policy: SCHED_FIFO pid 172's current scheduling priority: 50 pid 173's current scheduling policy: SCHED_FIFO pid 173's current scheduling priority: 50 pid 175's current scheduling policy: SCHED_FIFO
  • 33. 33Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done pid 9's current affinity mask: 1 pid 21's current affinity mask: 2 pid 28's current affinity mask: 4 pid 35's current affinity mask: 8 pid 148's current affinity mask: 2 pid 163's current affinity mask: 4 pid 164's current affinity mask: 8 pid 170's current affinity mask: 1 pid 171's current affinity mask: 1 pid 172's current affinity mask: 2 pid 173's current affinity mask: 2 pid 175's current affinity mask: 4 pid 176's current affinity mask: 8 pid 178's current affinity mask: 1 pid 422's current affinity mask: 2 pid 429's current affinity mask: 4 pid 430's current affinity mask: 8 pid 431's current affinity mask: 1 pid 432's current affinity mask: 8 pid 673's current affinity mask: 1 pid 753's current affinity mask: 2 pid 877's current affinity mask: 1 pid 1267's current affinity mask: 2
  • 34. 34Ā©2019 VMware, Inc. Threaded Interrupts # cat /proc/irq/*/smp_affinity f f f f f f f f f f f f f f f f f f f f f
  • 35. 35Ā©2019 VMware, Inc. Threaded Interrupts # ls /proc/irq/*/smp_affinity| while read a ; do echo 1 > $a ;done # cat /proc/irq/*/smp_affinity f 1 1 1 1 1 1 1 1 1 1 f 1 f 1 1 1 1 1 1 1
  • 36. 36Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done pid 9's current affinity mask: 1 pid 21's current affinity mask: 2 pid 28's current affinity mask: 4 pid 35's current affinity mask: 8 pid 148's current affinity mask: 2 pid 163's current affinity mask: 4 pid 164's current affinity mask: 8 pid 170's current affinity mask: 1 pid 171's current affinity mask: 1 pid 172's current affinity mask: 1 pid 173's current affinity mask: 1 pid 175's current affinity mask: 4 pid 176's current affinity mask: 8 pid 178's current affinity mask: 1 pid 422's current affinity mask: 1 pid 429's current affinity mask: 4 pid 430's current affinity mask: 8 pid 431's current affinity mask: 1 pid 432's current affinity mask: 8 pid 673's current affinity mask: 1 pid 753's current affinity mask: 2 pid 877's current affinity mask: 1 pid 1267's current affinity mask: 2
  • 37. 37Ā©2019 VMware, Inc. Threaded Interrupts # ls /proc/irq/*/smp_affinity| while read a ; do echo 2 > $a ;done # cat /proc/irq/*/smp_affinity f 2 2 2 2 2 2 2 2 2 2 f 2 f 2 2 2 2 2 2 2
  • 38. 38Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done pid 9's current affinity mask: 1 pid 21's current affinity mask: 2 pid 28's current affinity mask: 4 pid 35's current affinity mask: 8 pid 148's current affinity mask: 2 pid 163's current affinity mask: 4 pid 164's current affinity mask: 8 pid 170's current affinity mask: 2 pid 171's current affinity mask: 2 pid 172's current affinity mask: 2 pid 173's current affinity mask: 2 pid 175's current affinity mask: 4 pid 176's current affinity mask: 8 pid 178's current affinity mask: 1 pid 422's current affinity mask: 2 pid 429's current affinity mask: 4 pid 430's current affinity mask: 8 pid 431's current affinity mask: 1 pid 432's current affinity mask: 8 pid 673's current affinity mask: 2 pid 753's current affinity mask: 2 pid 877's current affinity mask: 2 pid 1267's current affinity mask: 2
  • 39. 39Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done pid 9's current affinity mask: 1 pid 21's current affinity mask: 2 pid 28's current affinity mask: 4 pid 35's current affinity mask: 8 pid 148's current affinity mask: 2 pid 163's current affinity mask: 4 pid 164's current affinity mask: 8 pid 170's current affinity mask: 1 pid 171's current affinity mask: 1 pid 172's current affinity mask: 1 pid 173's current affinity mask: 1 pid 175's current affinity mask: 4 pid 176's current affinity mask: 8 pid 178's current affinity mask: 1 pid 422's current affinity mask: 1 pid 429's current affinity mask: 4 pid 430's current affinity mask: 8 pid 431's current affinity mask: 1 pid 432's current affinity mask: 8 pid 673's current affinity mask: 1 pid 753's current affinity mask: 2 pid 877's current affinity mask: 1 pid 1267's current affinity mask: 2
  • 40. 40Ā©2019 VMware, Inc. Threaded Interrupts # ps aux |grep irq | awk '{print $2}' | while read a; do taskset -p $a; done pid 9's current affinity mask: 1 pid 21's current affinity mask: 2 pid 28's current affinity mask: 4 pid 35's current affinity mask: 8 pid 148's current affinity mask: 2 pid 163's current affinity mask: 4 pid 164's current affinity mask: 8 pid 170's current affinity mask: 2 pid 171's current affinity mask: 2 pid 172's current affinity mask: 2 pid 173's current affinity mask: 2 pid 175's current affinity mask: 4 pid 176's current affinity mask: 8 pid 178's current affinity mask: 1 pid 422's current affinity mask: 2 pid 429's current affinity mask: 4 pid 430's current affinity mask: 8 pid 431's current affinity mask: 1 pid 432's current affinity mask: 8 pid 673's current affinity mask: 2 pid 753's current affinity mask: 2 pid 877's current affinity mask: 2 pid 1267's current affinity mask: 2
  • 41. 41Ā©2019 VMware, Inc. Check your system Real-time is more than just a kernel The hardware must not induce latency ī€ˆ Your OS is only as good as the hardware it runs on Need to worry about System Management Interrupts (SMI) ī€ˆ Triggered by the BIOS ī€ˆ The OS (Linux) has no control over them ī€ˆ Can be used to monitor thermal (fans) and memory (ECC) Use the hwlat tracer to detect this
  • 42. 42Ā©2019 VMware, Inc. hwlat tracer # trace-cmd start -p hwlat # trace-cmd show # tracer: hwlat # # entries-in-buffer/entries-written: 39/39 #P:4 # # _-----=> irqs-off # / _----=> need-resched # | / _----=> need-resched # || / _---=> hardirq/softirq # ||| / _--=> preempt-depth # ||||/ delay # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | <...>-1981 [001] d.L.... 17454.195055: #1 inner/outer(us): 631/321 ts:1569119307.978708067 <...>-1981 [002] d.L.... 17455.314708: #2 inner/outer(us): 311/244 ts:1569119308.988240898 <...>-1981 [003] d.L.... 17456.220180: #3 inner/outer(us): 699/672 ts:1569119309.996060780 <...>-1981 [000] d...... 17457.264116: #4 inner/outer(us): 165/219 ts:1569119311.003999819 <...>-1981 [001] d...... 17458.344601: #5 inner/outer(us): 32/44 ts:1569119312.012000302 <...>-1981 [002] d.L.... 17459.239703: #6 inner/outer(us): 326/496 ts:1569119313.020149009 <...>-1981 [000] d...... 17461.156198: #8 inner/outer(us): 117/548 ts:1569119315.036214857 <...>-1981 [001] d...... 17462.344629: #9 inner/outer(us): 908/82 ts:1569119316.044070049 <...>-1981 [003] d...... 17463.909470: #11 inner/outer(us): 172/860 ts:1569119318.060040701 <...>-1981 [000] d...... 17465.196280: #12 inner/outer(us): 876/783 ts:1569119319.068065360 <...>-1981 [001] d...... 17466.118113: #13 inner/outer(us): 29/25 ts:1569119320.076075661 <...>-1981 [002] d...... 17466.933660: #14 inner/outer(us): 251/29 ts:1569119321.084216130 <...>-1981 [003] d...... 17467.941405: #15 inner/outer(us): 177/632 ts:1569119322.091966450 <...>-1981 [000] d...... 17469.196170: #16 inner/outer(us): 656/711 ts:1569119323.099677972 <...>-1981 [001] d...... 17470.158097: #17 inner/outer(us): 162/29 ts:1569119324.107980626 <...>-1981 [002] d...... 17470.965666: #18 inner/outer(us): 211/975 ts:1569119325.116225970 <...>-1981 [003] d.L.... 17472.334110: #19 inner/outer(us): 656/845 ts:1569119326.124090524 <...>-1981 [000] d...... 17473.196171: #20 inner/outer(us): 197/64 ts:1569119327.132047281 <...>-1981 [001] d...... 17473.989240: #21 inner/outer(us): 2282/80 ts:1569119328.139772360 <...>-1981 [002] d...... 17475.003012: #22 inner/outer(us): 219/9624 ts:1569119329.153625986
  • 43. 43Ā©2019 VMware, Inc. hwlat tracer # trace-cmd start -p hwlat # trace-cmd show # tracer: hwlat # # entries-in-buffer/entries-written: 39/39 #P:4 # # _-----=> irqs-off # / _----=> need-resched # | / _----=> need-resched # || / _---=> hardirq/softirq # ||| / _--=> preempt-depth # ||||/ delay # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | <...>-1981 [001] d.L.... 17454.195055: #1 inner/outer(us): 631/321 ts:1569119307.978708067 <...>-1981 [002] d.L.... 17455.314708: #2 inner/outer(us): 311/244 ts:1569119308.988240898 <...>-1981 [003] d.L.... 17456.220180: #3 inner/outer(us): 699/672 ts:1569119309.996060780 <...>-1981 [000] d...... 17457.264116: #4 inner/outer(us): 165/219 ts:1569119311.003999819 <...>-1981 [001] d...... 17458.344601: #5 inner/outer(us): 32/44 ts:1569119312.012000302 <...>-1981 [002] d.L.... 17459.239703: #6 inner/outer(us): 326/496 ts:1569119313.020149009 <...>-1981 [000] d...... 17461.156198: #8 inner/outer(us): 117/548 ts:1569119315.036214857 <...>-1981 [001] d...... 17462.344629: #9 inner/outer(us): 908/82 ts:1569119316.044070049 <...>-1981 [003] d...... 17463.909470: #11 inner/outer(us): 172/860 ts:1569119318.060040701 <...>-1981 [000] d...... 17465.196280: #12 inner/outer(us): 876/783 ts:1569119319.068065360 <...>-1981 [001] d...... 17466.118113: #13 inner/outer(us): 29/25 ts:1569119320.076075661 <...>-1981 [002] d...... 17466.933660: #14 inner/outer(us): 251/29 ts:1569119321.084216130 <...>-1981 [003] d...... 17467.941405: #15 inner/outer(us): 177/632 ts:1569119322.091966450 <...>-1981 [000] d...... 17469.196170: #16 inner/outer(us): 656/711 ts:1569119323.099677972 <...>-1981 [001] d...... 17470.158097: #17 inner/outer(us): 162/29 ts:1569119324.107980626 <...>-1981 [002] d...... 17470.965666: #18 inner/outer(us): 211/975 ts:1569119325.116225970 <...>-1981 [003] d.L.... 17472.334110: #19 inner/outer(us): 656/845 ts:1569119326.124090524 <...>-1981 [000] d...... 17473.196171: #20 inner/outer(us): 197/64 ts:1569119327.132047281 <...>-1981 [001] d...... 17473.989240: #21 inner/outer(us): 2282/80 ts:1569119328.139772360 <...>-1981 [002] d...... 17475.003012: #22 inner/outer(us): 219/9624 ts:1569119329.153625986
  • 44. 44Ā©2019 VMware, Inc. 9624 microsecond latency?
  • 45. 45Ā©2019 VMware, Inc. 9624 microsecond latency? # cat /proc/cpuinfo | head processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Common KVM processor stepping : 1 microcode : 0x1 cpu MHz : 1896.000 cache size : 16384 KB physical id : 0
  • 46. 46Ā©2019 VMware, Inc. NO_HZ_FULL Good example of seeing how the system is behaving Command line: isolcpus=2,3 rcu_nocbs=2,3 ī€ˆ Isolating CPUs 2 and 3 ī€ˆ Have RCU callbacks for CPU 2 and 3 run on other CPUs Test with a user spinner program ī€ˆ Does nothing but spins (tests to see if we stay in userspace) ī€ˆ Use KernelShark to see if it gets interrupted
  • 47. 47Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
  • 48. 48Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
  • 49. 49Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
  • 50. 50Ā©2019 VMware, Inc. NO_HZ_FULL # ls /proc/irq/*/smp_affinity| while read a ; do echo f3 > $a ;done # cat /proc/irq/*/smp_affinity ff f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 ff f3 f3 f3 f3 f3
  • 51. 51Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
  • 52. 52Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
  • 53. 53Ā©2019 VMware, Inc. NO_HZ_FULL Command line: isolcpus=2,3 rcu_nocbs=2,3 nowatchdog ī€ˆ Isolating CPUs 2 and 3 ī€ˆ Have RCU callbacks for CPU 2 and 3 run on other CPUs ī€ˆ Turn off watchdogs ā€“ Will not detect hard lockups!
  • 54. 54Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph --max-graph-depth 1 -M 4 taskset -c 2 /work/c/userspin 30
  • 55. 55Ā©2019 VMware, Inc. NO_HZ_FULL __visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs) { ipi_entering_ack_irq(); trace_call_function_entry(CALL_FUNCTION_VECTOR); inc_irq_stat(irq_call_count); generic_smp_call_function_interrupt(); trace_call_function_exit(CALL_FUNCTION_VECTOR); exiting_irq(); }
  • 56. 56Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph -g 'generic_smp_call_function_*'-M 4 taskset -c 2 /work/c/userspin 30
  • 57. 57Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph -g 'generic_smp_call_function_*' -l 'tick_nohz_full*:stacktrace' -M ff taskset -c 2 /work/c/userspin 30 # trace-cmd report [..] ksoftirqd/1-20 [001] 1758.326782: timer_start: timer=0xffffffff828fb640 function=clocksource_watchdog expires=4296424801 [timeout=497] cpu=2 idx=109 flags=D|P|I ksoftirqd/1-20 [001] 1758.326792: kernel_stack: <stack trace > => ftrace_call (ffffffff81a01811) => tick_nohz_full_kick_cpu (ffffffff8116d995) => add_timer_on (ffffffff81158d71) => clocksource_watchdog (ffffffff811614b4) => run_timer_softirq (ffffffff811595a0) => __do_softirq (ffffffff81c000e6) => run_ksoftirqd (ffffffff810d938b) => smpboot_thread_fn (ffffffff810fc161) => kthread (ffffffff810f7c3d) => ret_from_fork (ffffffff81a00215)
  • 58. 58Ā©2019 VMware, Inc. NO_HZ_FULL Command line: isolcpus=2,3 rcu_nocbs=2,3 nowatchdog tsc=reliable ī€ˆ Isolating CPUs 2 and 3 ī€ˆ Have RCU callbacks for CPU 2 and 3 run on other CPUs ī€ˆ Turn off watchdogs ā€“ Will not detect hard lockups! ī€ˆ Tell the kernel the TSC is reliable ā€“ In other words, lie about it!
  • 59. 59Ā©2019 VMware, Inc. NO_HZ_FULL # trace-cmd record -e all -p function_graph -g 'generic_smp_call_function_*'-M ff taskset -c 2 /work/c/userspin 30