张俊 1080379124 [email protected] 2011.1 1. btlab embedded virtualization group outline ...
TRANSCRIPT
BTLab Embedded Virtualization Group
Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion
2
BTLab Embedded Virtualization Group
Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion
3
BTLab Embedded Virtualization Group
Virtualization in General A host(VMM, Virtual Machine Monitor)
manages the hardware resources Multiplexing or Partitioning
Virtualization Flavors Full virtualization Paravirtualization
Virtualization Application Server Desktop Embedded System
OS
App App
Hardware
Guest OS
App App
Guest OS
App App
Host(VMM)
Hardware
4
BTLab Embedded Virtualization Group
Motivation
5
RTOS is primitive, simple executives Task scheduling Interrupt Handling
RT applications now require TCP/IP&GUI File system&Database Multi-core support
Classic solutions Add these non-RT services to the basic RT kernel Add RT extension to the general-purpose kernel
Task scheduling Kernel preemptivity
BTLab Embedded Virtualization Group
System Consolidation Multi-core enablement for legacy embedded
uni-processor applications
6
BTLab Embedded Virtualization Group
Another Solution Deploy separate RTOS and GPOS on single
embedded platform RTOS: real-time tasks GPOS: non-real-time services
Meet increasing RT application requirements while enjoying all the benefits of embedded virtualization Add RT extension to the VMM VM scheduling VMM kernel preemptivity
7
BTLab Embedded Virtualization Group
Embedded Real-Time Architecture
8
Multi-core CPU with virtualization extension KVM as the hypervisor Linux as the GPOS VxWorks as the RTOS
BTLab Embedded Virtualization Group
Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion
9
BTLab Embedded Virtualization Group
PDLT: Process Dispatch Latency Time Between an interrupt occurs and the first
command of a process that has been awakened by the interrupt service routine
longest antency
are on the order of tens up to hundreds of milliseconds
10
swctxschedulinglatencynellatencyISRIRT tttttPDLT ker
BTLab Embedded Virtualization Group
Six stages associated with the delivery of the interrupt to the guest OS
System load causing additional latency Computational loads Interrupt loads
Virtualization-Caused Latency
11
BTLab Embedded Virtualization Group
Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion
12
BTLab Embedded Virtualization Group
PrioritizationA straightforward approach to improving guest
responsiveness over QEMU/KVM is to raise the priorities of QEMU’s threads and lift them into a real-time scheduling class
ApproachesShell command: chrt System Call: sched_setscheduler()
13
BTLab Embedded Virtualization Group
Dedicated Core Reserve one dedicated core for real-time guest a
symmetric multi-processor (SMP) system, preventing the real-time guest from being adversely affected by harmful workloads.
ApproachesProcess pinning
System call: sched_setaffinity() Tools: taskset/cpuset
Interrupt pinning File interface: /proc/irq/<irq_number>/smp_affinity
14
BTLab Embedded Virtualization Group
Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion
15
BTLab Embedded Virtualization Group
Experimental Results (VxWorks)Interrupt Response Time (IRT)
16
BTLab Embedded Virtualization Group
Experimental Results (Linux)Process Dispatch Latency Time (PDLT)
17
BTLab Embedded Virtualization Group
Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion
18
BTLab Embedded Virtualization Group
Conclusions Virtualization software layer combined with
various system loads do cause certain additional response latencies.
Real-time performance tunings methods under the host Linux can reduce the response latencies of the real-time guest to some degree.
With careful setup and tuning, sub-millisecond response time can be guaranteed on the KVM guest.
19
BTLab Embedded Virtualization Group
Contributions Propose an KVM-based embedded real-time
virtualization architecture, which combines Linux and VxWorks together, as the guest GPOS and guest RTOS respectively.
Analyze how KVM combined other system loads introduces additional latencies to the guest interrupt response time
Evaluate the interrupt response time the KVM guest is able to achieve and the effectiveness of various performance tuning methods.
20
BTLab Embedded Virtualization Group
End
Thank you!Q&A
21
BTLab Embedded Virtualization Group
Backup
VMM VM scheduling
BTLab Embedded Virtualization Group
Backup
BTLab Embedded Virtualization Group