SlideShare a Scribd company logo
1 of 33
Download to read offline
© Copyright 2020 Xilinx
Xen Cache Coloring &
Real-Time
Stefano Stabellini
Marco Solieri
Luca Miccio
Giulio Corradi
© Copyright 2020 Xilinx
Xen in Embedded
Consolidation and Componentization
Isolation
 Security
 Reliability
 Safety
 Interference& Real-Time
© Copyright 2020 Xilinx
Xen Schedulers
CPU CPU
CPU CPU
© Copyright 2020 Xilinx
Xen Schedulers
CPU CPU
CPU CPU
sched=null
sched=credit
vCPU vCPU
vCPU vCPU
vCPU vCPU
vCPU vCPU
vCPU vCPU
© Copyright 2020 Xilinx
Xen Schedulers
CPU CPU
CPU CPU
sched=null
sched=credit
vCPU vCPU
vCPU vCPU
vCPU vCPU
vCPU vCPU
vCPU vCPU
© Copyright 2020 Xilinx
Xen Schedulers
CPU CPU
CPU CPU
sched=null
sched=rtds
vCPU vCPU
vCPU vCPU
vCPU vCPU
vCPU vCPU
vCPU vCPU
© Copyright 2020 Xilinx
Shared L2 cache
L2
Core
1
Core
2
Core
3
Core
4
DDR
L1 L1 L1 L1
© Copyright 2020 Xilinx
Shared L2 cache
L2
Core
1
Core
2
Core
3
Core
4
DDR
L1 L1 L1 L1
© Copyright 2020 Xilinx
Shared L2 cache
L2
Core
1
Core
2
Core
3
Core
4
DDR
L1 L1 L1 L1
© Copyright 2020 Xilinx
Xen Cache Coloring
CPUs clusters often share L2 cache
Interference via L2 cache affects performance
 App0 running on CPU0 can cause cache entries
evictions, which affect App1 running on CPU1
 App1 running on CPU1 could miss a deadline due to
App0’s behavior
 It can happen betweenApps running on the same OS &
between VMs on the same hypervisor
Hypervisor Solution: Cache Partitioning,
AKA Cache Coloring
 Each VM gets its own allocation of cache entries
 No shared cache entries between VMs
 Allows real-time apps to run with deterministic IRQ
latency
Core
1
Core
2
Core
3
Core
4
L2
D
D
R
© Copyright 2020 Xilinx
Colors Calculation
Detect Way Size
 via registers
 via xen command line
Calculate colors masks and total number of available colors
 Xilinx ZynqMP: way size is 65536
 Order 16 -> color bitmask 0xF000 -> 16 colors
D
D
R
© Copyright 2020 Xilinx
Colored Allocation
New colored memory allocator
 In alternative to Buddy
 Pages are stored by color in separate lists
Can be used for Xen memory as well as Domain memory
© Copyright 2020 Xilinx
Coloring Configuration
Xen command line
Dom0-less DomUs
xl domU config files
way_size=65536 xen_colors=0 dom0_colors=1-6
fdt set /chosen/domU0 colors <0x0 0x80>
colors=["10-11"]
© Copyright 2020 Xilinx
Benchmarking
 Hardware: Xilinx MPSoC
 Workload: Bare Metal application
 Stress: Bare Metal application
 Test configuration:
 Measured load: 1500 sums
 Internal load: 8000 sums every 250us
 Interrupt triggered every 8ms
 Samples:1000
 Colored configuration:
 Xen: ["0,1"]
 Motor Control DomU: ["4,7"]
 Stress DomU: ["8,11"]
 Stress2 DomU:["12,15"]
 Linux stress:["2,3"]
 Linux stress command: stress -m 1 --vm-bytes 8M --vm-stride 64 --vm-keep -t 3600 &
© Copyright 2020 Xilinx
L1 vs L2 cache
L1 cache can hide L2 cache interference effects in simple test scenarios
Make sure not use the L1 cache by accident during the measurements
© Copyright 2020 Xilinx
Benchmark #1: Motor Control Execution Time
Measure the time it takes to run a typical motor control execution routine, with
and without interference
© Copyright 2020 Xilinx
Results
No interference:
results for reference
Lower is better
© Copyright 2020 Xilinx
Results
Adding interference:
Xen Coloring
has the best execution time
© Copyright 2020 Xilinx
Results
Increasing interference:
• Xen Coloring is stable
• Other results worsen
© Copyright 2020 Xilinx
Results
Increasing interference
again:
• Xen Coloring is stable
• Other results worsen still
© Copyright 2020 Xilinx
Results
Comparing
Xen vs. Xen Colored
Lower is better
© Copyright 2020 Xilinx
Benchmark #2: interrupt response time
Measure the difference between the time when the interrupt service routine
runs and the time the interrupt is set to fire, with and without interference
Timer in Programmable Logic
© Copyright 2020 Xilinx
Results
No interference:
results for reference
Lower is better
© Copyright 2020 Xilinx
Results
Adding interference:
• Xen without Coloring
worsen
• Xen Coloring is stable
© Copyright 2020 Xilinx
Results
Adding more interference:
• Xen without Coloring
worsen again
• Xen Coloring is stable
© Copyright 2020 Xilinx
Results
Adding even more
interference:
• Xen without Coloring
worsen still
• Xen Coloring is stable
© Copyright 2020 Xilinx
Results
All results together
Xen Coloring provides
stable IRQ latency even
under severe levels of
interference
© Copyright 2020 Xilinx
Conclusions
Xen Cache Coloring offers
 Much lower execution times under stress
 Much lower IRQ latency under stress
Greatly improves Determinism -- measurements have far lower variance
Xen Cache Coloring effectively reduces the effects of cache interference
Enable deployments of real-time and non-real-time workloads on a single SoC
© Copyright 2020 Xilinx
Status
All patches online at:
 https://github.com/Xilinx/xen.git xilinx/release-2020.1
TODO
 Upstreaming
 Linux Dom0 not 1:1 mapped, i.e. PV drivers support
© Copyright 2020 Xilinx
Xen Cache Coloring: Demo
Xen
[0]
Baremetal
Latency
Measurements
[7]
Baremetal Memory
Stress
[10 11]
Dom0
[1 2 3 4 5 6]
© Copyright 2020 Xilinx
Baremetal Latency Measurements
© Copyright 2020 Xilinx
Baremetal Memory Stress
© Copyright 2020 Xilinx
Thank You

More Related Content

What's hot

RedHat Linux
RedHat LinuxRedHat Linux
RedHat LinuxApo
 
The Next Generation of Hyperconverged Infrastructure - Cisco
The Next Generation of Hyperconverged Infrastructure - CiscoThe Next Generation of Hyperconverged Infrastructure - Cisco
The Next Generation of Hyperconverged Infrastructure - CiscoMarcoTechnologies
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMXPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMThe Linux Foundation
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver艾鍗科技
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxThe Linux Foundation
 
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022Stefano Stabellini
 
VMware VSAN Technical Deep Dive - March 2014
VMware VSAN Technical Deep Dive - March 2014VMware VSAN Technical Deep Dive - March 2014
VMware VSAN Technical Deep Dive - March 2014David Davis
 
Xen Project 15 Years down the Line
Xen Project 15 Years down the LineXen Project 15 Years down the Line
Xen Project 15 Years down the LineThe Linux Foundation
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAMChris Simmonds
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Novell
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...The Linux Foundation
 
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...Cisco Canada
 
Hyperconverged Infrastructure, It's the Future
Hyperconverged Infrastructure, It's the FutureHyperconverged Infrastructure, It's the Future
Hyperconverged Infrastructure, It's the FutureHoward Marks
 
Patch Management on Windows with Puppet
Patch Management on Windows with PuppetPatch Management on Windows with Puppet
Patch Management on Windows with PuppetPuppet
 
Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Ahmed El-Arabawy
 
ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)The Linux Foundation
 
IBM Tape the future of tape
IBM Tape the future of tapeIBM Tape the future of tape
IBM Tape the future of tapeJosef Weingand
 

What's hot (20)

RedHat Linux
RedHat LinuxRedHat Linux
RedHat Linux
 
The Next Generation of Hyperconverged Infrastructure - Cisco
The Next Generation of Hyperconverged Infrastructure - CiscoThe Next Generation of Hyperconverged Infrastructure - Cisco
The Next Generation of Hyperconverged Infrastructure - Cisco
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMXPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
 
Xen Memory Management
Xen Memory ManagementXen Memory Management
Xen Memory Management
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
 
OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training
 
VMware VSAN Technical Deep Dive - March 2014
VMware VSAN Technical Deep Dive - March 2014VMware VSAN Technical Deep Dive - March 2014
VMware VSAN Technical Deep Dive - March 2014
 
Xen Project 15 Years down the Line
Xen Project 15 Years down the LineXen Project 15 Years down the Line
Xen Project 15 Years down the Line
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
Hands on OpenCL
Hands on OpenCLHands on OpenCL
Hands on OpenCL
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
 
Hyperconverged Infrastructure, It's the Future
Hyperconverged Infrastructure, It's the FutureHyperconverged Infrastructure, It's the Future
Hyperconverged Infrastructure, It's the Future
 
Patch Management on Windows with Puppet
Patch Management on Windows with PuppetPatch Management on Windows with Puppet
Patch Management on Windows with Puppet
 
Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring
 
ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)
 
IBM Tape the future of tape
IBM Tape the future of tapeIBM Tape the future of tape
IBM Tape the future of tape
 

Similar to Xen Cache Coloring: Interference-Free Real-Time System

“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...
“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...
“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...Edge AI and Vision Alliance
 
Cit bip v3_7.17_ally_house
Cit bip v3_7.17_ally_houseCit bip v3_7.17_ally_house
Cit bip v3_7.17_ally_houseErica Price
 
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...KTN
 
Encoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingEncoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingRay Adensamer
 
“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...
“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...
“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...Edge AI and Vision Alliance
 
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...HostedbyConfluent
 
Boost performance and provide strong end-user unified communications experien...
Boost performance and provide strong end-user unified communications experien...Boost performance and provide strong end-user unified communications experien...
Boost performance and provide strong end-user unified communications experien...Principled Technologies
 
Introduction to Software Defined Visualization (SDVis)
Introduction to Software Defined Visualization (SDVis)Introduction to Software Defined Visualization (SDVis)
Introduction to Software Defined Visualization (SDVis)Intel® Software
 
Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...
Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...
Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...Lee Bushen
 
“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...
“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...
“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...Edge AI and Vision Alliance
 
Novosco: Citrix tips and best practices
Novosco: Citrix tips and best practicesNovosco: Citrix tips and best practices
Novosco: Citrix tips and best practicesNovosco
 
“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...
“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...
“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...Edge AI and Vision Alliance
 
Citrix Portfolio Updates
Citrix Portfolio UpdatesCitrix Portfolio Updates
Citrix Portfolio UpdatesPawel Serwan
 
“Efficient Video Perception Through AI,” a Presentation from Qualcomm
“Efficient Video Perception Through AI,” a Presentation from Qualcomm“Efficient Video Perception Through AI,” a Presentation from Qualcomm
“Efficient Video Perception Through AI,” a Presentation from QualcommEdge AI and Vision Alliance
 
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...The Linux Foundation
 
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...Codemotion
 

Similar to Xen Cache Coloring: Interference-Free Real-Time System (20)

Rendering in the Cloud
Rendering in the CloudRendering in the Cloud
Rendering in the Cloud
 
“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...
“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...
“Trends in Neural Network Topologies for Vision at the Edge,” a Presentation ...
 
Cit bip v3_7.17_ally_house
Cit bip v3_7.17_ally_houseCit bip v3_7.17_ally_house
Cit bip v3_7.17_ally_house
 
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
 
Encoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingEncoding at Scale for Live Video Streaming
Encoding at Scale for Live Video Streaming
 
“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...
“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...
“Vitis and Vitis AI: Application Acceleration from Cloud to Edge,” a Presenta...
 
VDI-POC
VDI-POCVDI-POC
VDI-POC
 
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
 
Boost performance and provide strong end-user unified communications experien...
Boost performance and provide strong end-user unified communications experien...Boost performance and provide strong end-user unified communications experien...
Boost performance and provide strong end-user unified communications experien...
 
Introduction to Software Defined Visualization (SDVis)
Introduction to Software Defined Visualization (SDVis)Introduction to Software Defined Visualization (SDVis)
Introduction to Software Defined Visualization (SDVis)
 
Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...
Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...
Citrix Desktop Master Class – New in XA/XD 7.9, Skype for Business, HDX Raspb...
 
“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...
“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...
“State-of-the-art Model Quantization and Optimization for Efficient Edge AI,”...
 
Novosco: Citrix tips and best practices
Novosco: Citrix tips and best practicesNovosco: Citrix tips and best practices
Novosco: Citrix tips and best practices
 
“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...
“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...
“Vision and AI DSPs for Ultra-High-End and Always-On Applications,” a Present...
 
Citrix Portfolio Updates
Citrix Portfolio UpdatesCitrix Portfolio Updates
Citrix Portfolio Updates
 
“Efficient Video Perception Through AI,” a Presentation from Qualcomm
“Efficient Video Perception Through AI,” a Presentation from Qualcomm“Efficient Video Perception Through AI,” a Presentation from Qualcomm
“Efficient Video Perception Through AI,” a Presentation from Qualcomm
 
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
 
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
 
Dcp
DcpDcp
Dcp
 
HDX 3D
HDX 3DHDX 3D
HDX 3D
 

More from Stefano Stabellini

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeStefano Stabellini
 
System Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and LopperSystem Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and LopperStefano Stabellini
 
Dom0less - Xen Developer Summit 2019
Dom0less  - Xen Developer Summit 2019Dom0less  - Xen Developer Summit 2019
Dom0less - Xen Developer Summit 2019Stefano Stabellini
 
Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Stefano Stabellini
 

More from Stefano Stabellini (10)

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
RunX ELCE 2020
RunX ELCE 2020RunX ELCE 2020
RunX ELCE 2020
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edge
 
System Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and LopperSystem Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and Lopper
 
Dom0less - Xen Developer Summit 2019
Dom0less  - Xen Developer Summit 2019Dom0less  - Xen Developer Summit 2019
Dom0less - Xen Developer Summit 2019
 
Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)
 
Xen Project for ARM Servers
Xen Project for ARM ServersXen Project for ARM Servers
Xen Project for ARM Servers
 
Xen and OpenStack
Xen and OpenStackXen and OpenStack
Xen and OpenStack
 
XDS15: Project Raisin
XDS15: Project RaisinXDS15: Project Raisin
XDS15: Project Raisin
 
OpenStack and Xen
OpenStack and XenOpenStack and Xen
OpenStack and Xen
 

Recently uploaded

Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Clinic
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Flutter Agency
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...Neo4j
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmuxevmux96
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConNatan Silnitsky
 

Recently uploaded (20)

Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmux
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 

Xen Cache Coloring: Interference-Free Real-Time System

  • 1. © Copyright 2020 Xilinx Xen Cache Coloring & Real-Time Stefano Stabellini Marco Solieri Luca Miccio Giulio Corradi
  • 2. © Copyright 2020 Xilinx Xen in Embedded Consolidation and Componentization Isolation  Security  Reliability  Safety  Interference& Real-Time
  • 3. © Copyright 2020 Xilinx Xen Schedulers CPU CPU CPU CPU
  • 4. © Copyright 2020 Xilinx Xen Schedulers CPU CPU CPU CPU sched=null sched=credit vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU
  • 5. © Copyright 2020 Xilinx Xen Schedulers CPU CPU CPU CPU sched=null sched=credit vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU
  • 6. © Copyright 2020 Xilinx Xen Schedulers CPU CPU CPU CPU sched=null sched=rtds vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU vCPU
  • 7. © Copyright 2020 Xilinx Shared L2 cache L2 Core 1 Core 2 Core 3 Core 4 DDR L1 L1 L1 L1
  • 8. © Copyright 2020 Xilinx Shared L2 cache L2 Core 1 Core 2 Core 3 Core 4 DDR L1 L1 L1 L1
  • 9. © Copyright 2020 Xilinx Shared L2 cache L2 Core 1 Core 2 Core 3 Core 4 DDR L1 L1 L1 L1
  • 10. © Copyright 2020 Xilinx Xen Cache Coloring CPUs clusters often share L2 cache Interference via L2 cache affects performance  App0 running on CPU0 can cause cache entries evictions, which affect App1 running on CPU1  App1 running on CPU1 could miss a deadline due to App0’s behavior  It can happen betweenApps running on the same OS & between VMs on the same hypervisor Hypervisor Solution: Cache Partitioning, AKA Cache Coloring  Each VM gets its own allocation of cache entries  No shared cache entries between VMs  Allows real-time apps to run with deterministic IRQ latency Core 1 Core 2 Core 3 Core 4 L2 D D R
  • 11. © Copyright 2020 Xilinx Colors Calculation Detect Way Size  via registers  via xen command line Calculate colors masks and total number of available colors  Xilinx ZynqMP: way size is 65536  Order 16 -> color bitmask 0xF000 -> 16 colors D D R
  • 12. © Copyright 2020 Xilinx Colored Allocation New colored memory allocator  In alternative to Buddy  Pages are stored by color in separate lists Can be used for Xen memory as well as Domain memory
  • 13. © Copyright 2020 Xilinx Coloring Configuration Xen command line Dom0-less DomUs xl domU config files way_size=65536 xen_colors=0 dom0_colors=1-6 fdt set /chosen/domU0 colors <0x0 0x80> colors=["10-11"]
  • 14. © Copyright 2020 Xilinx Benchmarking  Hardware: Xilinx MPSoC  Workload: Bare Metal application  Stress: Bare Metal application  Test configuration:  Measured load: 1500 sums  Internal load: 8000 sums every 250us  Interrupt triggered every 8ms  Samples:1000  Colored configuration:  Xen: ["0,1"]  Motor Control DomU: ["4,7"]  Stress DomU: ["8,11"]  Stress2 DomU:["12,15"]  Linux stress:["2,3"]  Linux stress command: stress -m 1 --vm-bytes 8M --vm-stride 64 --vm-keep -t 3600 &
  • 15. © Copyright 2020 Xilinx L1 vs L2 cache L1 cache can hide L2 cache interference effects in simple test scenarios Make sure not use the L1 cache by accident during the measurements
  • 16. © Copyright 2020 Xilinx Benchmark #1: Motor Control Execution Time Measure the time it takes to run a typical motor control execution routine, with and without interference
  • 17. © Copyright 2020 Xilinx Results No interference: results for reference Lower is better
  • 18. © Copyright 2020 Xilinx Results Adding interference: Xen Coloring has the best execution time
  • 19. © Copyright 2020 Xilinx Results Increasing interference: • Xen Coloring is stable • Other results worsen
  • 20. © Copyright 2020 Xilinx Results Increasing interference again: • Xen Coloring is stable • Other results worsen still
  • 21. © Copyright 2020 Xilinx Results Comparing Xen vs. Xen Colored Lower is better
  • 22. © Copyright 2020 Xilinx Benchmark #2: interrupt response time Measure the difference between the time when the interrupt service routine runs and the time the interrupt is set to fire, with and without interference Timer in Programmable Logic
  • 23. © Copyright 2020 Xilinx Results No interference: results for reference Lower is better
  • 24. © Copyright 2020 Xilinx Results Adding interference: • Xen without Coloring worsen • Xen Coloring is stable
  • 25. © Copyright 2020 Xilinx Results Adding more interference: • Xen without Coloring worsen again • Xen Coloring is stable
  • 26. © Copyright 2020 Xilinx Results Adding even more interference: • Xen without Coloring worsen still • Xen Coloring is stable
  • 27. © Copyright 2020 Xilinx Results All results together Xen Coloring provides stable IRQ latency even under severe levels of interference
  • 28. © Copyright 2020 Xilinx Conclusions Xen Cache Coloring offers  Much lower execution times under stress  Much lower IRQ latency under stress Greatly improves Determinism -- measurements have far lower variance Xen Cache Coloring effectively reduces the effects of cache interference Enable deployments of real-time and non-real-time workloads on a single SoC
  • 29. © Copyright 2020 Xilinx Status All patches online at:  https://github.com/Xilinx/xen.git xilinx/release-2020.1 TODO  Upstreaming  Linux Dom0 not 1:1 mapped, i.e. PV drivers support
  • 30. © Copyright 2020 Xilinx Xen Cache Coloring: Demo Xen [0] Baremetal Latency Measurements [7] Baremetal Memory Stress [10 11] Dom0 [1 2 3 4 5 6]
  • 31. © Copyright 2020 Xilinx Baremetal Latency Measurements
  • 32. © Copyright 2020 Xilinx Baremetal Memory Stress
  • 33. © Copyright 2020 Xilinx Thank You