SlideShare a Scribd company logo
3
Most read
5
Most read
14
Most read
2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D
Andrei Kholodnyi
https://github.com/razr
https://discourse.ros.org/u/razr
https://www.linkedin.com/in/akholodnyi/
T
e
c
h
n
o
l
o
g
y
O
f
f
i
c
e
TSN apps running on VxWorks RTOS
as a KVM guest at the intelligent edge
Agenda
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
Why a separation of control
from sensor and actuation
functionality is important for the
intelligent edge solution
1
Why TSN and RTOS are
essential parts of the
intelligent edge story.
2
How to properly configure
TSN, Linux and VxWorks
KVM guest to run a OPC/UA
TSN example
3
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
EDGE – WHY DO WE NEED TSN AND REAL-TIME?
Edge Cloud
Devices Customer premises Access
network
~2 ms <5 ms 1-3 ms
Edge compute
~5-20 ms
0-25 km 25-100 km
Centralized Data Center
100s-1000s km
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
Edge use case : decoupling control from sensing and
actuation
VM
Real-time Control
VxWorks
OPC/UA
Sensing Control Actuation
Edge Real-time Control
VxWorks
TSN
OPC/UA
VM
Linux
OPC/UA
ML MW
Edge Virtualization
VxWorks
OPC/UA
Sensing Actuation
TSN
Control ML Apps
Real-time device
TSN
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
Demo Configuration: Edge real time control
QEMU VM
Core 0
OpenIL Linux RT KVM
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Core 0
OPC/UA
TSN
OpenIL Linux
PubSub Rx
Core 1
LS1028ARDB
eno0
TSN
Linux Apps
https://github.com/open62541/open62541/tree/master/examples/pubsub_realtime/vxworks
Edge Node
Edge Device
PCI passthrough
192.168.10.46 192.168.10.28
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
• Virtualization
• Linux host
• QEMU
• Real-time guest OS
• PCI pass-through
• i210 card passed through to
the guest
DEMO – Virtualization
QEMU VM
Core 0
OpenIL Linux RT KVM
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Linux Apps
Edge Node
dev=0001:01:00.0
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
echo vfio-pci > /sys/bus/pci/devices/$dev/driver_override echo $dev >
/sys/bus/pci/drivers/vfio-pci/bind
~# lspci -k 0001:01:00.0 Ethernet controller: Intel Corporation I210
Gigabit Network Connection (rev 03) Subsystem: Intel Corporation
Ethernet Server Adapter I210-T1 Kernel driver in use: vfio-pci
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
• VxWorks kernel library
• librsl.a
• UP mode
• Real-time kernel application
• tsnperf
DEMO – Real-time unikernel
Core 0
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Linux Apps
Edge Node
$ cat ~/stash/projects/TO/rsl_apps/tsnperf/Makefile
APP = tsnPerf
all: $(APP)
$(APP): $(APP).o main.o Makefile
$(RSL_SDK)/krnl/librsl.a
rsl build $(APP).o main.o -o $(APP)
What is VxWorks?
• it is a proprietary hard real-time OS, POSIX PSE52
• 64 bits on ARM, Intel, MIPS, PowerPC, and RISC-V
• Kernel and user space separation, user space optional
• C/C++17, possible to develop kernel C++ modules and user apps, and
recently Rust and Python
• Safety certifiable: DO-178, ISO 26262, IEC 61508
• Toolchain LLVM 11, Dinkumware C/C++ libs
• Proprietary build system. CMake, autotools support for apps, e.g.
ROS2
• Kernel shell
• Eclipse, and Visual Studio Code - modern IDEs, Windows/Linux hosts
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
▪ Isolate CPU 2 and 3 to run QEMU
rcu_nocbs=2,3 nohz_full=2,3
isolcpus=2,3 irqaffinity=0,1
audit=0 watchdog=0 skew_tick=1
▪ No CPU frequency scaling
▪ Other settings
DEMO – RT_PREEMPT
QEMU VM
Core 0
OpenIL Linux RT KVM
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Linux Apps
Edge Node
CONFIG_NO_HZ_FULL=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT_RT=y
CONFIG_HZ_1000=y
# CONFIG_CPU_FREQ is not set
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
▪ taskset -c 2 /* run on CPU2 */
▪ -enable-kvm /* no emulation */
▪ -smp 1 /* one CPU only */
▪ -nic none /* no nic */
▪ -name debug-threads=on /* name threads */
▪ -device vfio-pci,host=$dev /* passthrough */
DEMO – QEMU
QEMU VM
Core 0
OpenIL Linux RT KVM
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Edge Node
taskset -c 2 /work/qemu/installArm/bin/qemu-system-aarch64 -cpu host
-enable-kvm -smp 1 -name debug-threads=on -nic none -machine
type=virt,gic-version=host -nographic -m 256 -overcommit mem-
lock=on -append "fs(0,0)host:vxWorks h=192.168.10.28
e=192.168.10.46 u=user pw=invalid f=0x01 o=gei0" -kernel
/root/tsnPerf -device vfio-pci,host=$dev
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
▪ Move vCore process to the CPU 3
▪ Let other QEMU threads on the CPU 2
DEMO – pin vCore to pCore
QEMU VM
Core 0
OpenIL Linux RT KVM
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Edge Node
QEMU_PID=`pidof qemu-system-aarch64`
user@LS1046ARDB-Ubuntu:~$ pstree -t $QEMU_PID
qemu-system-aar─┬─{CPU 0/KVM}
├─{qemu-system-aar}
└─{signalfd_compat}
VCPU_PID=`ps -aL |grep -E "(kvm-vcpu|CPU.*KVM)"|awk '{print $2}’
VCPU_CORE=3
taskset -c -p $VCPU_CORE $VCPU_PID
QEMU
thread #1
QEMU
thread #n
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
-> ptpdAdd "gei0", 2, 2, 1, 0, 254, 0, 1
-> ptpdStart
-> ptpdStatusShow "gei0"
Interface name : gei0
Now in state : PTP_SLAVE
Demo Configuration: PTP
QEMU VM
Core 0
OpenIL Linux RT KVM
PTP slave
VxWorks
Unikernel
Core 1 Core 2 Core 3
LS1046ARDB
i210
Core 0
PTP master
OpenIL Linux
Core 1
LS1028ARDB
eno0
PTP
https://github.com/open62541/open62541/tree/master/examples/pubsub_realtime/vxworks
Edge Node
PCI passthrough
192.168.10.46 192.168.10.28
Edge Device
sudo daemonize -E BUILD_ID=dontKillMe -o /var/log/ptp4l.log -e
/var/log/ptp4l.err.log /usr/bin/taskset -c 1 chrt 90 /usr/sbin/ptp4l -i eno0 -2
-mq -f /etc/ptp4l_cfg/gPTP.cfg --step_threshold=1 --fault_reset_interval=0
--announceReceiptTimeout=10 --transportSpecific=1
root@LS1028ARDB-Ubuntu:~# tail -f /var/log/ptp.log
ptp4l[186906.248]: selected local clock 5ecf89.fffe.ebf722 as best master
ptp4l[186906.248]: port 1: assuming the grand master role
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
Demo Configuration: TSN (finally)
QEMU VM
Core 0
OpenIL Linux RT KVM
OPC/UA
TSN
VxWorks
Unikernel
PubSub
Tx
Core 1 Core 2 Core 3
LS1046ARDB
i210
Core 0
OPC/UA
TSN
OpenIL Linux
PubSub Rx
Core 1
LS1028ARDB
eno0
TSN
https://github.com/open62541/open62541/tree/master/examples/pubsub_realtime/vxworks
Edge Node
Edge Device
PCI passthrough
192.168.10.46 192.168.10.28
QEMU
thread #1
QEMU
thread #n
-> tsnConfig("gei", 4, 0, 0, "/romfs/62541.json")
value = 0 = 0x0
-> open62541PubTSNStart("gei", 4, 0, 0, 1)
./tsnPerfLxRx -o "01:00:5E:00:00:01" -I "eno0" -v 3000 -n 1 2>&1 | tee
tsnPerfLxRx.log
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
DEMO – Results
2
0
2
1
W
I
N
D
R
I
V
E
R
,
A
L
L
R
I
G
H
T
S
R
E
S
E
R
V
E
D
▪ The Edge needs determinism, TSN,
WTSN, and 5G
▪ The Edge requires real-time and
virtualization
▪ A careful configuration of the edge
system including TSN is needed to
fulfill real-time requirements
▪ VxWorks is a good candidate as a
guest OS at the edge, providing
necessary real-time features,
unikernel, and TSN protocols support
DEMO – Conclusion VM
Edge Real-time Control
VxWorks
TSN
OPC/UA
VM
Linux
OPC/UA
ML MW
Edge Virtualization
VxWorks
OPC/UA
Sensing Actuation
TSN
Control ML Apps
Real-time device
TSN
TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge

More Related Content

PDF
The linux networking architecture
PPTX
LINUX DISTRIBUTIONS.pptx
PDF
Linux kernel modules
PDF
Linux Networking Explained
PDF
Linux kernel debugging
PDF
BPF Internals (eBPF)
PDF
Linux programming lecture_notes
PPT
Linux basics
The linux networking architecture
LINUX DISTRIBUTIONS.pptx
Linux kernel modules
Linux Networking Explained
Linux kernel debugging
BPF Internals (eBPF)
Linux programming lecture_notes
Linux basics

What's hot (20)

PDF
Prerequisite knowledge for shared memory concurrency
PDF
Making Linux do Hard Real-time
PDF
The Linux Kernel Scheduler (For Beginners) - SFO17-421
PDF
Linux Performance Analysis: New Tools and Old Secrets
PDF
Page cache in Linux kernel
PDF
Embedded Hypervisor for ARM
PPTX
Dead Lock Analysis of spin_lock() in Linux Kernel (english)
PDF
Linux Internals - Part II
PDF
淺談探索 Linux 系統設計之道
PPTX
The TCP/IP Stack in the Linux Kernel
PDF
Linux Memory Management
PPTX
Linux process management
PPTX
Cfgmgmtcamp 2023 — eBPF Superpowers
PDF
Linux Module Programming
PPTX
Linux Kernel Tour
PPTX
Introduction to RTOS
PDF
AMP Kynetics - ELC 2018 Portland
PDF
Linux systems - Linux Commands and Shell Scripting
PDF
Linux Preempt-RT Internals
PDF
Lesson 2 Understanding Linux File System
Prerequisite knowledge for shared memory concurrency
Making Linux do Hard Real-time
The Linux Kernel Scheduler (For Beginners) - SFO17-421
Linux Performance Analysis: New Tools and Old Secrets
Page cache in Linux kernel
Embedded Hypervisor for ARM
Dead Lock Analysis of spin_lock() in Linux Kernel (english)
Linux Internals - Part II
淺談探索 Linux 系統設計之道
The TCP/IP Stack in the Linux Kernel
Linux Memory Management
Linux process management
Cfgmgmtcamp 2023 — eBPF Superpowers
Linux Module Programming
Linux Kernel Tour
Introduction to RTOS
AMP Kynetics - ELC 2018 Portland
Linux systems - Linux Commands and Shell Scripting
Linux Preempt-RT Internals
Lesson 2 Understanding Linux File System
Ad

Similar to TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge (20)

PPTX
VMworld 2016: vSphere 6.x Host Resource Deep Dive
PPTX
Sundance at the 49th Intelligent Sensing Program
PPT
UNIT V PPT.ppt
PDF
LinuxCNC 入門簡介
PDF
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
ODP
Fedora Virtualization Day: Linux Containers & CRIU
PPTX
The n00bs guide to ovs dpdk
PDF
ACRN vMeet-Up EU 2021 - Introduction and Architecture Look Forward
PDF
SystemReady IR and MediaTek Genio-1200-EVK - Tech part - COSCUP 20240804
PDF
HKG15-100: What is Linaro working on - core development lightning talks
PDF
HKG15-104: What is Linaro working on - core development lightning talks
PDF
2. Vagin. Linux containers. June 01, 2013
PPTX
Embedded_ PPT_4-5 unit_Dr Monika-edited.pptx
PDF
Deep Dive on Amazon EC2 Instances (March 2017)
ODP
Visual comparison of Unix-like systems & Virtualisation
PDF
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
ODP
PhD Slides
PDF
Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
PDF
Using Embedded Linux for Infrastructure Systems
PPTX
Sundance VCS-1 for Precision Robotics
VMworld 2016: vSphere 6.x Host Resource Deep Dive
Sundance at the 49th Intelligent Sensing Program
UNIT V PPT.ppt
LinuxCNC 入門簡介
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
Fedora Virtualization Day: Linux Containers & CRIU
The n00bs guide to ovs dpdk
ACRN vMeet-Up EU 2021 - Introduction and Architecture Look Forward
SystemReady IR and MediaTek Genio-1200-EVK - Tech part - COSCUP 20240804
HKG15-100: What is Linaro working on - core development lightning talks
HKG15-104: What is Linaro working on - core development lightning talks
2. Vagin. Linux containers. June 01, 2013
Embedded_ PPT_4-5 unit_Dr Monika-edited.pptx
Deep Dive on Amazon EC2 Instances (March 2017)
Visual comparison of Unix-like systems & Virtualisation
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
PhD Slides
Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
Using Embedded Linux for Infrastructure Systems
Sundance VCS-1 for Precision Robotics
Ad

More from Andrei Kholodnyi (7)

PPTX
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
PPTX
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
PDF
ROS2 on VxWorks - one project on Wind River Labs
PDF
ROS2 on VxWorks - Challenges in porting a modern, software framework to RTOS
PDF
Mixed-critical adaptive AUTOSAR stack based on VxWorks, Linux, and virtualiza...
PDF
Developing safety autonomous driving solutions based on the adaptive AUTOSAR ...
PDF
Autonomous driving end-to-end security architecture
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
Turtlebot3: VxWorks running ROS2 as a real-time guest OS on Hypervisor
ROS2 on VxWorks - one project on Wind River Labs
ROS2 on VxWorks - Challenges in porting a modern, software framework to RTOS
Mixed-critical adaptive AUTOSAR stack based on VxWorks, Linux, and virtualiza...
Developing safety autonomous driving solutions based on the adaptive AUTOSAR ...
Autonomous driving end-to-end security architecture

Recently uploaded (20)

PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
System and Network Administraation Chapter 3
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
top salesforce developer skills in 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
Why Generative AI is the Future of Content, Code & Creativity?
Which alternative to Crystal Reports is best for small or large businesses.pdf
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Navsoft: AI-Powered Business Solutions & Custom Software Development
System and Network Administraation Chapter 3
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Internet Downloader Manager (IDM) Crack 6.42 Build 41
CHAPTER 2 - PM Management and IT Context
Designing Intelligence for the Shop Floor.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Odoo POS Development Services by CandidRoot Solutions
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
top salesforce developer skills in 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Digital Systems & Binary Numbers (comprehensive )
Reimagine Home Health with the Power of Agentic AI​
Wondershare Filmora 15 Crack With Activation Key [2025

TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge

  • 1. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D Andrei Kholodnyi https://github.com/razr https://discourse.ros.org/u/razr https://www.linkedin.com/in/akholodnyi/ T e c h n o l o g y O f f i c e TSN apps running on VxWorks RTOS as a KVM guest at the intelligent edge
  • 2. Agenda 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D Why a separation of control from sensor and actuation functionality is important for the intelligent edge solution 1 Why TSN and RTOS are essential parts of the intelligent edge story. 2 How to properly configure TSN, Linux and VxWorks KVM guest to run a OPC/UA TSN example 3
  • 3. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D EDGE – WHY DO WE NEED TSN AND REAL-TIME? Edge Cloud Devices Customer premises Access network ~2 ms <5 ms 1-3 ms Edge compute ~5-20 ms 0-25 km 25-100 km Centralized Data Center 100s-1000s km
  • 4. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D Edge use case : decoupling control from sensing and actuation VM Real-time Control VxWorks OPC/UA Sensing Control Actuation Edge Real-time Control VxWorks TSN OPC/UA VM Linux OPC/UA ML MW Edge Virtualization VxWorks OPC/UA Sensing Actuation TSN Control ML Apps Real-time device TSN
  • 5. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D Demo Configuration: Edge real time control QEMU VM Core 0 OpenIL Linux RT KVM OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Core 0 OPC/UA TSN OpenIL Linux PubSub Rx Core 1 LS1028ARDB eno0 TSN Linux Apps https://github.com/open62541/open62541/tree/master/examples/pubsub_realtime/vxworks Edge Node Edge Device PCI passthrough 192.168.10.46 192.168.10.28
  • 6. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D • Virtualization • Linux host • QEMU • Real-time guest OS • PCI pass-through • i210 card passed through to the guest DEMO – Virtualization QEMU VM Core 0 OpenIL Linux RT KVM OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Linux Apps Edge Node dev=0001:01:00.0 echo $dev > /sys/bus/pci/devices/$dev/driver/unbind echo vfio-pci > /sys/bus/pci/devices/$dev/driver_override echo $dev > /sys/bus/pci/drivers/vfio-pci/bind ~# lspci -k 0001:01:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) Subsystem: Intel Corporation Ethernet Server Adapter I210-T1 Kernel driver in use: vfio-pci
  • 7. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D • VxWorks kernel library • librsl.a • UP mode • Real-time kernel application • tsnperf DEMO – Real-time unikernel Core 0 OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Linux Apps Edge Node $ cat ~/stash/projects/TO/rsl_apps/tsnperf/Makefile APP = tsnPerf all: $(APP) $(APP): $(APP).o main.o Makefile $(RSL_SDK)/krnl/librsl.a rsl build $(APP).o main.o -o $(APP) What is VxWorks? • it is a proprietary hard real-time OS, POSIX PSE52 • 64 bits on ARM, Intel, MIPS, PowerPC, and RISC-V • Kernel and user space separation, user space optional • C/C++17, possible to develop kernel C++ modules and user apps, and recently Rust and Python • Safety certifiable: DO-178, ISO 26262, IEC 61508 • Toolchain LLVM 11, Dinkumware C/C++ libs • Proprietary build system. CMake, autotools support for apps, e.g. ROS2 • Kernel shell • Eclipse, and Visual Studio Code - modern IDEs, Windows/Linux hosts
  • 8. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D ▪ Isolate CPU 2 and 3 to run QEMU rcu_nocbs=2,3 nohz_full=2,3 isolcpus=2,3 irqaffinity=0,1 audit=0 watchdog=0 skew_tick=1 ▪ No CPU frequency scaling ▪ Other settings DEMO – RT_PREEMPT QEMU VM Core 0 OpenIL Linux RT KVM OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Linux Apps Edge Node CONFIG_NO_HZ_FULL=y CONFIG_HIGH_RES_TIMERS=y CONFIG_PREEMPT_RT=y CONFIG_HZ_1000=y # CONFIG_CPU_FREQ is not set
  • 9. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D ▪ taskset -c 2 /* run on CPU2 */ ▪ -enable-kvm /* no emulation */ ▪ -smp 1 /* one CPU only */ ▪ -nic none /* no nic */ ▪ -name debug-threads=on /* name threads */ ▪ -device vfio-pci,host=$dev /* passthrough */ DEMO – QEMU QEMU VM Core 0 OpenIL Linux RT KVM OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Edge Node taskset -c 2 /work/qemu/installArm/bin/qemu-system-aarch64 -cpu host -enable-kvm -smp 1 -name debug-threads=on -nic none -machine type=virt,gic-version=host -nographic -m 256 -overcommit mem- lock=on -append "fs(0,0)host:vxWorks h=192.168.10.28 e=192.168.10.46 u=user pw=invalid f=0x01 o=gei0" -kernel /root/tsnPerf -device vfio-pci,host=$dev
  • 10. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D ▪ Move vCore process to the CPU 3 ▪ Let other QEMU threads on the CPU 2 DEMO – pin vCore to pCore QEMU VM Core 0 OpenIL Linux RT KVM OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Edge Node QEMU_PID=`pidof qemu-system-aarch64` user@LS1046ARDB-Ubuntu:~$ pstree -t $QEMU_PID qemu-system-aar─┬─{CPU 0/KVM} ├─{qemu-system-aar} └─{signalfd_compat} VCPU_PID=`ps -aL |grep -E "(kvm-vcpu|CPU.*KVM)"|awk '{print $2}’ VCPU_CORE=3 taskset -c -p $VCPU_CORE $VCPU_PID QEMU thread #1 QEMU thread #n
  • 11. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D -> ptpdAdd "gei0", 2, 2, 1, 0, 254, 0, 1 -> ptpdStart -> ptpdStatusShow "gei0" Interface name : gei0 Now in state : PTP_SLAVE Demo Configuration: PTP QEMU VM Core 0 OpenIL Linux RT KVM PTP slave VxWorks Unikernel Core 1 Core 2 Core 3 LS1046ARDB i210 Core 0 PTP master OpenIL Linux Core 1 LS1028ARDB eno0 PTP https://github.com/open62541/open62541/tree/master/examples/pubsub_realtime/vxworks Edge Node PCI passthrough 192.168.10.46 192.168.10.28 Edge Device sudo daemonize -E BUILD_ID=dontKillMe -o /var/log/ptp4l.log -e /var/log/ptp4l.err.log /usr/bin/taskset -c 1 chrt 90 /usr/sbin/ptp4l -i eno0 -2 -mq -f /etc/ptp4l_cfg/gPTP.cfg --step_threshold=1 --fault_reset_interval=0 --announceReceiptTimeout=10 --transportSpecific=1 root@LS1028ARDB-Ubuntu:~# tail -f /var/log/ptp.log ptp4l[186906.248]: selected local clock 5ecf89.fffe.ebf722 as best master ptp4l[186906.248]: port 1: assuming the grand master role
  • 12. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D Demo Configuration: TSN (finally) QEMU VM Core 0 OpenIL Linux RT KVM OPC/UA TSN VxWorks Unikernel PubSub Tx Core 1 Core 2 Core 3 LS1046ARDB i210 Core 0 OPC/UA TSN OpenIL Linux PubSub Rx Core 1 LS1028ARDB eno0 TSN https://github.com/open62541/open62541/tree/master/examples/pubsub_realtime/vxworks Edge Node Edge Device PCI passthrough 192.168.10.46 192.168.10.28 QEMU thread #1 QEMU thread #n -> tsnConfig("gei", 4, 0, 0, "/romfs/62541.json") value = 0 = 0x0 -> open62541PubTSNStart("gei", 4, 0, 0, 1) ./tsnPerfLxRx -o "01:00:5E:00:00:01" -I "eno0" -v 3000 -n 1 2>&1 | tee tsnPerfLxRx.log
  • 14. 2 0 2 1 W I N D R I V E R , A L L R I G H T S R E S E R V E D ▪ The Edge needs determinism, TSN, WTSN, and 5G ▪ The Edge requires real-time and virtualization ▪ A careful configuration of the edge system including TSN is needed to fulfill real-time requirements ▪ VxWorks is a good candidate as a guest OS at the edge, providing necessary real-time features, unikernel, and TSN protocols support DEMO – Conclusion VM Edge Real-time Control VxWorks TSN OPC/UA VM Linux OPC/UA ML MW Edge Virtualization VxWorks OPC/UA Sensing Actuation TSN Control ML Apps Real-time device TSN