PCIe SRIOV Device Offloads Virtual Machine I/O Requests
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In virtualization scenarios, the simulation of virtual input/output devices by virtual machine monitors leads to frequent context switches between kernel and user modes, significantly impacting I/O performance and increasing CPU overhead, especially when multiple virtual machines are involved.
Innovation Solution
A data processing method where I/O requests from virtual machines are directly processed by a dedicated device connected to the server via a PCIe bus, offloading processor load and utilizing a descriptor prefetch engine to enhance I/O request processing speed, along with an interrupt generation module and DMA engine for efficient data transfer.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a virtual machine monitor simulates Virtio and intercepts I/O requests, then virtualization functionality is achieved, but I/O performance deteriorates due to frequent context switches
Solution Approach 1:
The patent introduces a PCI-SRIOV device as an intermediary component between the virtual machine and the physical I/O device. The Virtio front-end driver in the virtual machine communicates with the PCI-SRIOV device, which then handles I/O requests directly without requiring the VMM to intercept and serialize them. This intermediary approach maintains virtualization functionality while eliminating the performance penalty of context switches.
Solution Approach 2:
The patent extracts the I/O processing functionality from the virtual machine monitor and relocates it to a dedicated PCI-SRIOV device. By taking out the I/O request handling from the VMM, the system eliminates the harmful context switches between kernel and user modes that occur when the VMM processes I/O requests, thereby improving I/O performance while preserving virtualization capabilities.
2Adaptability or versatility
If the VMM processes all I/O requests and serializes them into a single I/O flow, then hardware compatibility is maintained, but CPU overhead increases
Solution Approach 1:
The PCI-SRIOV device serves as an intermediary that handles I/O request processing, freeing the CPU from the burden of processing each I/O request through the VMM. The device maintains hardware compatibility by implementing standard Virtio interfaces while performing I/O operations independently, thus reducing CPU overhead without sacrificing adaptability.
Solution Approach 2:
The PCI-SRIOV device performs I/O processing autonomously without requiring CPU intervention for each request. The device self-manages the I/O operations by directly interacting with the physical I/O device through DMA transfers, eliminating the need for the CPU to serialize and process I/O requests, thereby significantly reducing CPU overhead while maintaining hardware compatibility.
3Adaptability or versatility
If multiple Virtios are simulated by the VMM, then support for multiple I/O devices is achieved, but system complexity increases
Solution Approach 1:
The patent segments the I/O processing functionality by creating separate PCI-SRIOV devices for different I/O functions. Instead of having the VMM simulate multiple Virtios, each requiring independent processing, the system uses dedicated PCI-SRIOV devices that handle specific I/O operations independently. This segmentation reduces system complexity by distributing the processing burden across specialized hardware components rather than centralizing it in the VMM.
4Productivity
If the virtual machine directly sends I/O requests to the device, then I/O processing speed is improved, but device integration complexity increases
Solution Approach 1:
The PCI-SRIOV device implements universal Virtio interfaces that allow the virtual machine to communicate using standard protocols. The device is designed to be multi-functional, supporting various I/O operations (read, write, interrupt handling) through a unified interface. This universality enables direct I/O request processing at high speed while managing integration complexity through standardized, multi-purpose hardware design.
Applied Scientific Principles
This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.
Function Achieved in This Case
This approach optimizes I/O processing, reduces server processor load, and improves virtual I/O performance by allowing the device to handle I/O requests directly from virtual machines, thereby minimizing the overhead associated with virtual machine monitor simulations.
Implementation Method 1
obtaining, by the DMA engine, the first I/O request from the memory of the server in the DMA manner based on the first descriptor
Implementation Method 2
The descriptor prefetch engine automatically transfers the descriptor from the server to a local memory of the device. This increases an I/O request processing speed.
Data Source
Figure 1~2
Figure 3~4
AI summary
This disclosure provides a data processing method, including: obtaining, by a device in a server, a first input/output I/O request sent by a virtual machine, where the device is connected to the server through a high-speed serial computer expansion standard PCIe bus, the virtual machine runs on the server, the device provides a plurality of virtual functions VFs for the server, the first I/O request is initiated by the virtual machine for any one VF of the plurality of VFs, the first I/O request includes a read operation or a write operation, the read operation is used to perform a data read operation on an I/O device in the server, the write operation is used to perform a data write operation on the I/O device in the server; and reading or writing, by the device, data from or into the I/O device in the server based on the first I/O request. The method can optimize an I/O processing process, and reduce load of a processor of the server. The device directly processes the I/O request from the virtual machine, and this further improves virtual I/O performance.