Responsive and Enforced Interrupt Handling for Real-Time System Virtualization



Similar documents
Real- Time Mul,- Core Virtual Machine Scheduling in Xen

Real-Time Virtualization How Crazy Are We?

ELI: Bare-Metal Performance for I/O Virtualization

Introduction to the NI Real-Time Hypervisor

Memory Access Control in Multiprocessor for Real-time Systems with Mixed Criticality

Enhancing Hypervisor and Cloud Solutions Using Embedded Linux Iisko Lappalainen MontaVista

Achieving Real-Time Performance on a Virtualized Industrial Control Platform

Real-Time Multi-Core Virtual Machine Scheduling in Xen

Real-Time Multi-Core Virtual Machine Scheduling in Xen

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

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

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

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

Real-time KVM from the ground up

Nested Virtualization

IOS110. Virtualization 5/27/2014 1

Flight Processor Virtualization

ELI: Bare-Metal Performance for I/O Virtualization

Cloud Operating Systems for Servers

Virtualization. Types of Interfaces

Chapter 14 Virtual Machines

The Quest-V Separation Kernel

Virtualization. Jukka K. Nurminen

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

RT-Xen: Towards Real-time Hypervisor Scheduling in Xen

Predictable response times in event-driven real-time systems

HIPEAC Segregation of Subsystems with Different Criticalities on Networked Multi-Core Chips in the DREAMS Architecture

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

RCL: Software Prototype

Deploying Extremely Latency-Sensitive Applications in VMware vsphere 5.5

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Enabling Technologies for Distributed Computing

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

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

White Paper. Recording Server Virtualization

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Version 3.7 Technical Whitepaper

HRG Assessment: Stratus everrun Enterprise

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

PARALLELS CLOUD SERVER

Real-time Performance Control of Elastic Virtualized Network Functions

How To Understand The Power Of A Virtual Machine Monitor (Vm) In A Linux Computer System (Or A Virtualized Computer)

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Virtualization Technologies

Virtualization. Dr. Yingwu Zhu

Solving the Hypervisor Network I/O Bottleneck Solarflare Virtualization Acceleration

Distributed and Cloud Computing

Secure Containers. Jan Imagination Technologies HGI Dec, 2014 p1

Enabling Technologies for Distributed and Cloud Computing

Full and Para Virtualization

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

Quality of Service su Linux: Passato Presente e Futuro

Performance Evaluation of VMXNET3 Virtual Network Device VMware vsphere 4 build

The Xen of Virtualization

Enterprise-Class Virtualization with Open Source Technologies

Avoid Paying The Virtualization Tax: Deploying Virtualized BI 4.0 The Right Way. Ashish C. Morzaria, SAP

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

Oracle Database Scalability in VMware ESX VMware ESX 3.5

VtRES Towards Hardware Embedded Virtualization Technology: Architectural Enhancements to an ARM SoC. ESRG Embedded Systems Research Group

Virtualization. Michael Tsai 2015/06/08

Real-time Operating Systems. VO Embedded Systems Engineering Armin Wasicek

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

Performance Management for Cloudbased STC 2012

VMware vsphere 4.1 Networking Performance

Parallels Virtuozzo Containers

A hypervisor approach with real-time support to the MIPS M5150 processor

Virtual Computing and VMWare. Module 4

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

Virtualization for Cloud Computing

Resource usage monitoring for KVM based virtual machines

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

Machine Virtualization: Efficient Hypervisors, Stealthy Malware

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

Models For Modeling and Measuring the Performance of a Xen Virtual Server

VMware Server 2.0 Essentials. Virtualization Deployment and Management

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

Reference Architecture for Dell VIS Self-Service Creator and VMware vsphere 4

GUEST OPERATING SYSTEM BASED PERFORMANCE COMPARISON OF VMWARE AND XEN HYPERVISOR

Toward a practical HPC Cloud : Performance tuning of a virtualized HPC cluster

Mentor Embedded IVI Solutions

Virtualization. Pradipta De

Virtual Machines.

Large-scale performance monitoring framework for cloud monitoring. Live Trace Reading and Processing

Cloud Computing with Red Hat Solutions. Sivaram Shunmugam Red Hat Asia Pacific Pte Ltd.

Using EDF in Linux: SCHED DEADLINE. Luca Abeni

4. Fixed-Priority Scheduling

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

VMware vsphere 5.0 Boot Camp

NoHype: Virtualized Cloud Infrastructure without the Virtualization

Performance Analysis of Large Receive Offload in a Xen Virtualized System

Transcription:

Responsive and Enforced Interrupt Handling for Real-Time System Virtualization Hyoseung Kim * Shige Wang Raj Rajkumar * * General Motors R&D

Workload Consolidation Multi-core CPUs for embedded real-time systems Automotive: Freescale i.mx6 4-core CPU NVIDIA Tegra K1 platform Avionics and defense: Rugged Intel i7 single board computers Freescale P4080 8-core CPU Consolidation of real-time applications onto a single hardware platform Reduces the number of CPUs and wiring harness among them Leads to a significant reduction in cost and space requirements 2/26

Benefits of Real-Time Virtualization Barrier to consolidation Each app. could have been developed independently by different vendors Heterogeneous S/W infrastructure Bare-metal / Proprietary OS Linux / Android Different license issues Consolidation via virtualization Each application can maintain its own implementation Minimizes re-certification process IP protection, license segregation Fault isolation Virtualization Real-Time Hypervisor Multi-core CPU 3/26

Scheduling in Virtualization Two-level hierarchical scheduling structure scheduling and VCPU scheduling VM 1 VM 2 Scheduler Scheduler VCPU VCPU VCPU VCPU Hypervisor PCPU Real-time hierarchical scheduling VCPU Scheduler Budget and replenishment period for each VCPU Various budget PCPU replenishment policies (e.g., deferrable server) 4/26

Interrupt Handling in Virtualization Interrupt-triggered task VM 1 VM 2 Guest OS Scheduler Interrupt Service Routine Guest OS Scheduler Interrupt Service Routine VCPU VCPU VCPU VCPU Hypervisor Virtual interrupt VCPU Scheduler Interrupt Service Routine I/O device (e.g., sensor) PCPU PCPU Physical interrupt 5/26

Requirements for Interrupt Handling R1: Responsive and bounded interrupt handling time Timing penalties to interrupt handling in virtualization R2: Protect real-time tasks from interrupt storms schedulability should be guaranteed R3: Support unmodified guest OSs Many commercial RTOSs are closed-source 6/26

Previous Work Priority based sched. R1 R2 R3 VCPU temporal isolation Bounded Interrupt handling Interrupt storm protection sched. guarantee Unmodified guest OSs [1] [2] [3] [4] Ours [1] M. Beckert et al. Sufficient temporal independence and improved interrupt latencies in a real-time hypervisor. In DAC, 2014. [2] J. Kiszka. Towards Linux as a real-time hypervisor. In RTLWS, 2009. [3] A. Lackorzy nski, A. Warg, M. Volp, and H. H artig. Flattening hierarchical scheduling. In EMSOFT, 2012. [4] R. Ma et al. Performance tuning towards a KVM-based embedded real-time virtualization system. J. Inf. Sci. Eng., 29(5):1021 1035, 2013. 7/26

Our Approach vint: an analyzable interrupt handling framework for real-time system virtualization Provides responsive, bounded, and enforced interrupt handling Does not require any change to the guest OS code Easily applicable to virtualizing proprietary, closed-source RTOSs Contributions vint framework design Analysis on interrupt handling time and VCPU/task schedulability Implementation and case study on the KVM hypervisor of Linux/RK 8/26

Outline Introduction vint Framework System model Problems with interrupt handling vint details Analysis Evaluation Conclusion 9/26

System Model (1) Partitioned fixed-priority scheduling for both VCPUs and tasks Widely supported in many real-time OSs and hypervisors e.g., OKL4, PikeOS, VCPU v i : (C i v, T i v ) C i v : Maximum execution budget T i v : Budget replenishment period Any task or OS code can execute only if the corresponding VCPU has a non-zero remaining budget VCPU budget replenishment policies Deferrable server & sporadic server τ i : C i, T i C i : Worst-case execution time (WCET) T i : Minimum inter-arrival time 10/26

System Model (2) Physical interrupt I i pi : (C i pi, T i pi ) A signal issued from a hardware device to a PCPU Handled by the corresponding ISR of the hypervisor Virtual interrupt I j vi : (C i vi, T i vi ) A software signal from the hypervisor to a VCPU Min. inter-arrival time expected at design time Interrupt storms may happen at runtime Handled by the ISR of the guest OS while consuming the VCPU budget PCPU 1 Hypervisor VCPU v 1 1 VM Exit τ 1 Physical Intr. ISR 2 VM Enter Virtual Intr. ISR 3 Trap VM Exit EOI VM Enter 4 Interrupt-triggered task τ 2 Interrupt-triggered execution flow 11/26

Problems with Virtual Interrupts (1) Virtual interrupt Main difference between interrupt handling in virtualized and nonvirtualized environments Problem 1: Timing penalties to virtual interrupt handling VCPU budget depletion and VCPU preemption PCPU 1 Hypervisor VCPU v 1 1 VM Exit τ 1 Physical Intr. ISR 2 VM Enter Virtual Intr. ISR ISR 3 Trap VM Exit EOI VM Enter 4 Interrupt-triggered task τ 2 ISR budget depleted Next replenishment Interrupt handling delay 12/26

Problems with Virtual Interrupts (2) Problem 2: Virtual interrupt storms VCPU typically has a fraction of physical CPU time as its budget Negative impact of virtual interrupt storm can be much significant than physical interrupt storms Prior work developed for non-virtualized systems Cannot address virtual interrupt storms due to the unawareness of the passage of physical time within a VM 13/26

vint Overview Conceptually splits virtual interrupt handling from the VCPU of regular tasks in an analyzable way Used pseudo-vcpu abstraction Prioritizes virtual interrupt handling Does not require any guest OS modification VM1 VM1 Time-triggered Interrupt-triggered Time-triggered Interrupt-triggered Scheduler ISR vint Scheduler ISR VCPU VCPU Pseudo-VCPU 14/26

Pseudo-VCPU Parameters Same types of parameters as a regular VCPU: (C p v, T p v ) Budget replenishment period T p v Equal to or greater than the minimum inter-arrival time of the associated interrupt Execution budget C p v Sum of execution times of ISR and interrupt-triggered task Extra budget to reduce blocking time on interrupt handling 15/26

Pseudo-VCPU Realization Pseudo-VCPU does not have an execution context vint handles a virtual interrupt as if it was handled in its pseudo-vcpu vint checks the remaining budget of the corresponding pseudo-vcpu PCPU 1 Hypervisor VCPU v 1 1 VM Exit τ 1 Physical Intr. ISR 2 VM Enter Virtual Intr. ISR 3 Trap VM Exit EOI VM Enter 4 Interrupt-triggered task τ 2 vint let VCPU v 1 override the budget and priority of the pseudo-vcpu vint supports nested interrupt handling by using an EOI signal 16/26

Analysis Scope of our analysis Interrupt handling time VCPU schedulability schedulability Considers four different use cases VCPU budget replenish policies With vint Without vint Deferrable server YES YES Sporadic server YES YES 17/26

Interrupt Handling Time Analysis Interrupt handling time Sum of physical and virtual interrupt response times Physical interrupt response time Similar to interrupt handling time in a non-virtualized environment Virtual interrupt response time [ without vint ] [ vint ] Delay from VCPU budget depletion Delay from time-triggered tasks 18/26 Delay from higher-priority interrupt handling

Outline Introduction vint Framework Evaluation Performance characteristics of vint Implementation Case study Conclusion 19/26

Performance Characteristics of vint Purpose: Empirically investigate the performance characteristics and benefits of vint DSbase SSbase DSvINT SSvINT Deferrable Server without vint (baseline) Sporadic Server without vint (baseline) Deferrable Server with vint Sporadic Server with vint Experimental setup Used randomly-generated task sets and interrupt sets Metrics Percentage of schedulable task sets Percentage of serviceable interrupt sets 20/26

Experimental Results (1) Interrupts with short inter-arrival times schedulability Interrupt service rate vint has benefits in both task scheduling and interrupt handling 21/26

Experimental Results (2) WCET of interrupt handlers schedulability vint shows slightly lower task schedulability Interrupt service rate But vint provides significantly higher interrupt service rates 22/26

Case Study System configuration Hypervisor: KVM of Linux/RK Chosen for convenience vint applied to a Gigabit PCI NIC Guest VM OS: Unmodified Linux kernel 3.10 s: Netperf (network benchmark tool), Mplayer (movie player), Busyloop (background task) 1Gbps Ethernet Netperf receiver, Mplayer and Busyloop running in a VM Remote machine (Netperf sender) 23/26

Netperf Round-Trip Latency Highly affected by system s interrupt handling time [ Idle ] [ Mplayer + Busyloop] Netperf with vint: handles 95% of round-trips in 200 μsec Netperf without vint: only 50% during that time 24/26

Mplayer QoS under Interrupt Storms Measured fps(frames-per-second) of video playback MPEG2 video stream recorded in 29.97 fps X-axis: total VCPU budget assigned Mplayer with vint: nearly unaffected Mplayer without vint: dropped from 29.97 fps to 6 fps 25/26

Conclusions vint: an interrupt handling framework for RT virtualization Provides responsive and bounded interrupt handling time Protects real-time tasks from interrupt storms Supports unmodified guest OSs Analysis and Experimental Results Timely interrupt handling and good task schedulability in most cases A system designer can choose a trade off between task schedulability and interrupt handling time for each interrupt Implementation and Case study KVM + Linux/RK: https://rtml.ece.cmu.edu/redmine/projects/rk/ Future Work Memory interference, efficient VCPU resource allocation 26/26