Real-Time Virtualization How Crazy Are We?

Similar documents
Real-Time KVM for the Masses Unrestricted Siemens AG All rights reserved

KVM in Embedded Requirements, Experiences, Open Challenges

Real-time KVM from the ground up

Architecture of the Kernel-based Virtual Machine (KVM)

Enterprise-Class Virtualization with Open Source Technologies

Enhancing Hypervisor and Cloud Solutions Using Embedded Linux Iisko Lappalainen MontaVista

Virtualization. Dr. Yingwu Zhu

Nested Virtualization

Chapter 14 Virtual Machines

The QEMU/KVM Hypervisor

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Virtualization for Hard Real-Time Applications Partition where you can Virtualize where you have to

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

COS 318: Operating Systems. Virtual Machine Monitors

Virtualization in the ARMv7 Architecture Lecture for the Embedded Systems Course CSD, University of Crete (May 20, 2014)

Advanced Computer Networks. Network I/O Virtualization

KVM Architecture Overview

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

Virtualization. Michael Tsai 2015/06/08

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

Virtualization for Cloud Computing

Introduction to Virtualization & KVM

RED HAT ENTERPRISE VIRTUALIZATION FOR SERVERS: COMPETITIVE FEATURES

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

DPDK Summit 2014 DPDK in a Virtual World

Virtualization. Pradipta De

Nested Virtualization

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Multi-core Programming System Overview

KVM: Kernel-based Virtualization Driver

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

The Art of Virtualization with Free Software

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Enabling Technologies for Distributed Computing

FOR SERVERS 2.2: FEATURE matrix

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Version 3.7 Technical Whitepaper

Network Virtualization Technologies and their Effect on Performance

9/26/2011. What is Virtualization? What are the different types of virtualization.

Hardware accelerated Virtualization in the ARM Cortex Processors

ARM TrustZone and KVM Coexistence with RTOS For Automotive

Introduction to the NI Real-Time Hypervisor

Networking for Caribbean Development

Virtualizing a Virtual Machine

Virtualization: Hypervisors for Embedded and Safe Systems. Hanspeter Vogel Triadem Solutions AG

High-performance vnic framework for hypervisor-based NFV with userspace vswitch Yoshihiro Nakajima, Hitoshi Masutani, Hirokazu Takahashi NTT Labs.

Virtualization. Jukka K. Nurminen

Enabling Technologies for Distributed and Cloud Computing

Using SmartOS as a Hypervisor

I/O Virtualization Using Mellanox InfiniBand And Channel I/O Virtualization (CIOV) Technology

Cloud Computing #6 - Virtualization

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

The Microsoft Windows Hypervisor High Level Architecture

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

evm Virtualization Platform for Windows

Chapter 5 Cloud Resource Virtualization

Eloquence Training What s new in Eloquence B.08.00

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Broadcom Ethernet Network Controller Enhanced Virtualization Functionality

Beyond the Hypervisor

Intel Ethernet and Configuring Single Root I/O Virtualization (SR-IOV) on Microsoft* Windows* Server 2012 Hyper-V. Technical Brief v1.

Hyper-V Networking. Aidan Finn

ELI: Bare-Metal Performance for I/O Virtualization

IOS110. Virtualization 5/27/2014 1

Microsoft SQL Server 2012 on Cisco UCS with iscsi-based Storage Access in VMware ESX Virtualization Environment: Performance Study

Virtualization in Linux KVM + QEMU

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

Virtualization. Types of Interfaces

COS 318: Operating Systems. Virtual Machine Monitors

Deeply Embedded Real-Time Hypervisors for the Automotive Domain Dr. Gary Morgan, ETAS/ESC

HRG Assessment: Stratus everrun Enterprise

Virtualization Technologies

Beyond Virtualization: A Novel Software Architecture for Multi-Core SoCs. Jim Ready September 18, 2012

Intro to Virtualization

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

Performance tuning Xen

Optimize Server Virtualization with QLogic s 10GbE Secure SR-IOV

Full and Para Virtualization

Using VMWare VAAI for storage integration with Infortrend EonStor DS G7i

CPET 581 Cloud Computing: Technologies and Enterprise IT Strategies. Virtualization of Clusters and Data Centers

Parallels Virtuozzo Containers

Virtualization: Concepts, Applications, and Performance Modeling

Database Virtualization

High Performance OpenStack Cloud. Eli Karpilovski Cloud Advisory Council Chairman

PCI-SIG SR-IOV Primer. An Introduction to SR-IOV Technology Intel LAN Access Division

EXPLORING LINUX KERNEL: THE EASY WAY!

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

Cloud Operating Systems for Servers

Development of Type-2 Hypervisor for MIPS64 Based Systems

Scaling in a Hypervisor Environment

Windows Host Utilities Installation and Setup Guide

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

Hardware RAID vs. Software RAID: Which Implementation is Best for my Application?

Evaluation of an RTOS on top of a hosted virtual machine system

2972 Linux Options and Best Practices for Scaleup Virtualization

Transcription:

Siemens Corporate Technology October 2014 Real-Time Virtualization How Crazy Are We? Image: Marcus Quigmire, licensed under CC BY 2.0 Unrestricted Siemens AG 2014. All rights reserved

Real-Time Systems Can Benefit from Virtualization Virtualizable real-time systems Possible scenarios Control systems (industry, healthcare, automotive etc.) Communication systems (media streaming & switching, etc.) Trading systems (stocks, goods, etc.) Primary drivers Consolidation, include mixed criticality Legacy system migration [Development & test] Images: Ethernet switch by Ben Stanfield, licensed under CC BY-SA 2.0, stock market by Katrina.Tuliao, licensed under CC BY 2.0 Page 2 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Virtualization acceleration The critical data path with and without virtualization Real-time Software Stack CPU I/O interface Real-time Software Stack Hypervisor CPU I/O interface Real-time Software Stack vcpu Virtual I/O Hypervisor CPU I/O interface Other Guests vcpu Virt. I/O Event Reaction Event Reaction Event Reaction Native real-time setup Hardware-assisted virtualization Resource sharing & abstraction via emulation Page 3 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

RT Virtualization Two Architectural Options Real-time Application GPOS Real-time Application RTOS Guest OS RTOS RT-Hyperv. Hypervisor Partitioning Hypervisor Real-Time Host OS CPU CPU CPU CPU I/O I/O I/O I/O Page 4 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Architecture of a KVM-based RT-Hypervisor Non-RT Application Real-time Application Stand-alone RTOS or AMP Guest RT-enhanced QEMU PREEMPT-RT + KVM on dedicated cores Hardware Page 5 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

PREEMPT-RT enables RT-Virtualization Role of Linux extension PREEMPT-RT Reduce worst-case event delivery latencies Integrates KVM support Original use-case: virtualization + native RT applications Allows to prioritize virtualization workload over uncritical tasks Can be combined with CPU isolation 1:1 assignment: host CPU RT guest CPU Off-load all non-rt tasks (including low-priority QEMU threads) Warning: No 100% guest CPU load feasible! NO_HZ_FULL extensions work toward enabling this Page 6 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Decent Latencies Achievable in KVM-only Setups Measuring I/O latency of an RT Guest Host setup KVM on x86 PREEMPT-RT Linux Virtual machine on dedicated core Intel NIC (E1000 family) as I/O device, directly assigned to guest Permanent disk I/O load Guest setup Proprietary RTOS Real-time network stack Measurement setup Linux/Xenomai (native installation) Real-time network stack RTnet Periodic ICMP ping messages sent to target Recorded round-trip latency (error <50 µs) => Worst-case latency after 16h: 330 µs Real-Time Linux with RTnet other HW NIC RTOS Guest RT-KVM NIC other HW Page 7 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

RT-QEMU is Required for Emulating in Real-Time QEMU as a Real-Time Device Emulator Scenarios Guest uses NIC A, host has NIC B attached Legacy devices are no longer available on a modern host Multiple guests share single I/O interface for talking to different devices (e.g. on a CAN bus) QEMU can handle such scenarios via emulation Requirements on emulation Equivalent functional behavior Devices models need to react in time on guest requests Devices models need to deliver external events to the guest timely Page 8 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Concurrency in QEMU/KVM The Big QEMU Lock (BQL) IO-Thread Device models I/O back-ends GUI QMP, HMP... Page 9 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Critical BQL Zones CPUState Read/write access cpu_single_env Coalesced MMIO flushing PIO/MMIO request-to-device dispatching Back-end access TX on network layer Write to character device Timer setup, etc. Back-end events (iothread jobs) Network RX, read from chardev, timer signals, IRQ delivery Raising/lowering from device model to IRQ chip Injection into (if user space IRQ chips) Page 10 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Challenge 1: Management of Task Priorities There can be many task involved threads VIRQ injection threads (QEMU: iothreads) Kernel threads (IRQ, worker, RCU, forgot anything?) Problems Wrong configuration destroys RT...or locks up parts or all of your system Actually a generic RT Linux issue Proposals? Tool-based dependency discovery? Tool-based configuration? (More) automatic configuration? Page 11 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Challenge 2: Management of IRQ Parameters Relevant IRQ parameters CPU affinity Thread priority (if any) How to configure in advance? Line-based IRQs may be reachable via /proc/irq MSIs are not... Dynamic IRQ numbers how to associate with devices? Proposals? Something like /sys/devices/.../<device>/irq_vector<n>/...? Page 12 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Safe Isolation via Linux? Code size ASIL SIL 1..4 Formal Methods SIL2Linux Certification Consolidation Mixed Criticality Stahlkocher, CC BY-SA 3.0 Validation Multicore Legacy Code Page 13 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

What about postponing the hypervisor start? Basic concept of late partitioning Images Linux Linux [Boot Loader] Firmware/BIOS Linux Configs Partitioning Layer Linux Partitioning Layer RT App Hardware Hardware Hardware 1. Boot phase 2. Partitioning phase 3. Operational phase Page 14 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved

Jailhouse: Keep it simple, keep it open The Philosophy of Jailhouse Avoid emulation, focus on hardware assisted isolation No overcommitment, no scheduler, static partitioning Directly assign physical devices, do not emulate them You need more? Use KVM! Only expose resources that are required for operation No boot-up phase virtualization Board initialization done by Linux Off-load uncritical tasks to Linux Initial setup / image loading Reconfigurations while in non-operational mode Monitoring, logging etc. Released under GPLv2 => Minimal-sized certifiable hypervisor with full CPU assignment and Linux look-and-feel Page 15 October 2014 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2014. All rights reserved