Kernel I/O Thread for Virtual Storage Request Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In virtualization scenarios, the processing of read/write requests is time-consuming due to the complexity of the storage software stack, leading to significant delays, especially with high-speed storage media where the storage software stack becomes a bottleneck, with delays reaching 19.3% for SSDs and 94.1% for DDR NVM media.
Innovation Solution
A method and apparatus that actively poll the instruction transmit queue of a virtual storage device to obtain read/write requests, forward them to a physical storage device, and process them without needing virtual machine exit and enter operations, using memory-mapped I/O to simplify the process and reduce delays.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a conventional storage software stack is used in virtualization scenarios, then storage services can be provided to virtual machines, but processing delays increase significantly (up to 94.1% for DDR NVM media)
Solution Approach 1:
The patent extracts the I/O processing function from the complex virtualization software stack (QEMU, KVM, virtio) and implements it directly in the kernel through a dedicated I/O processing thread. This removes multiple software layers that cause delays, while maintaining storage service availability for virtual machines.
Solution Approach 2:
The patent segments the I/O processing into distinct components: a kernel-space I/O processing thread handling request forwarding, a separate mapping mechanism for virtual-to-physical device translation, and an interrupt handling subsystem. This segmentation allows each component to operate efficiently independently, reducing overall processing delay.
2Ease of operation
If QEMU process wake-up mechanism is used for I/O handling, then virtual machine I/O requests can be processed, but processing speed decreases due to context switching overhead
Solution Approach 1:
The patent replaces the mechanical QEMU process wake-up mechanism with a kernel-space I/O processing thread that continuously monitors and handles I/O requests. This substitution eliminates context switching overhead and process wake-up delays, significantly improving request processing speed while maintaining full I/O handling capability.
3Adaptability or versatility
If virtual machine exit and enter operations are required for I/O processing, then storage virtualization can be implemented, but processing efficiency decreases due to additional operation overhead
Solution Approach 1:
The patent introduces a kernel-space I/O processing thread as an intermediary between virtual machine I/O requests and the storage subsystem. This intermediary handles virtual-to-physical device mapping and request forwarding without requiring virtual machine exit/enter operations, maintaining storage virtualization capability while dramatically improving processing throughput.
4Adaptability or versatility
If a complex virtualized storage software stack is used, then storage services can be provided to multiple virtual machines, but device complexity increases
Solution Approach 1:
The patent implements a universal kernel-space I/O processing thread that handles I/O requests from multiple virtual machines through a unified interface. This single thread provides multi-functionality by managing virtual-to-physical device mapping, request forwarding, and interrupt handling for all virtual machines, reducing software stack complexity while maintaining multi-VM support.
Data Source
AI summary
A method and an apparatus for processing a read/write request in a physical machine, where the method includes polling, by a host by accessing memory of at least one of virtual storage devices, at least one instruction transmit queue of the at least one virtual storage device in order to obtain a first read/write request from the at least one instruction transmit queue, performing a first forwarding operation on the first read/write request, and obtaining, by the host, another first read/write request from the at least one instruction transmit queue by polling such that the host performs the first forwarding operation on the other first read/write request. According to the method and the apparatus in embodiments of the present disclosure, a speed of processing a read/write request in a virtualization storage scenario can be increased.


