Dynamic Mediation for Live Migration: Achieving Performance and Flexibility
This case study delves into the implementation of dynamic mediation for live migration in the context of VFIO-PCI, aiming to balance high performance and flexibility by seamlessly transitioning between pass-thru and host driver mediation. The design intricacies, background context, and motivation for adopting SR-IOV devices are explored, highlighting the importance of maintaining performance while ensuring smooth migration processes. The solution involves dynamically activating mediation during migration to track and manage dirty pages effectively and features failover mechanisms to address low performance scenarios. Innovative approaches such as introducing mediate ops to the vfio-pci bus driver further enhance the adaptability and control over the migration process. The study is a comprehensive exploration of optimizing live migration processes in virtualized environments.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Sdic Group meeting Dynamic Mediation for Live Migration VFIO-PCI case study shi, shuo 2019/12/08
Sdic Group meeting Outline 1. Background 2. Design 3. Implementation 4. Discussion
Sdic Group meeting Background
Sdic Group meeting Motivation For SR-IOV devices: To achieve high performance: VFs are passed-thru into guest without host driver mediation. To achieve high flexibility: Host driver mediation is required when migrating VFs. We want both
Sdic Group meeting Design Dynamic Mediation: Dynamically turn on mediation when migration starts to track dirty pages (pre-copy) to pre-fault DMA pages(post-copy) Re-enable pass-thru when migration ends Re-enable pass-thru when migration ends
Sdic Group meeting Design What about bonding driver? Failover: Unplug VF Low performance Live migration Low performance Plug VF Network downtime Current work: 640 ms 2260 ms 112 ms 97 ms 724 ms 1476 ms Find out reason for downtime 1 and 2 Mediation: Throughput Downtime interval 1 Uptime interval 1 Downtime interval 2 Uptime interval 2 Downtime interval 3 Network downtime 120 ms 900 ms 25 ms 63 ms 318 ms 463 ms
Sdic Group meeting Design Introduce mediate ops to vfio-pci bus driver. Enable vfio-pci to provide 3 things: Call mediate ops to allow vender driver customizing default region info/rw/mmap of region. provide a migration region to support migration. provide a dynamic trap bar info region to allow vender driver control trap/un-trap device.
Sdic Group meeting Design Mediate driver Standalone driver Build in PF driver VF control VF state retrieval Extend PF driver to introduce mediate ops
Sdic Group meeting Implementation Register mediate ops vender driver provides override ops and register to vfio-pci vfio-pci maintains mediate ops and callback when migration starts
Sdic Group meeting Implementation Dynamic trap region provide a new region to communicate with qemu new region cap about dynamic trap signal qemu to trap the special bar0 region when migration starts. signal qemu to untrap the special bar0 region when migration ends
Sdic Group meeting Implementation Define a new region to communicate with qemu:
Sdic Group meeting Implementation
Sdic Group meeting Discussion