Method and device for processing i/o request under kvm virtualization

2017 
Provided are a method and device for processing an I/O request under KVM virtualization. The method comprises: intercepting, by means of a kernel-based virtual machine (KVM), an I/O request transmitted by a virtual machine, and determining information of an I/O channel corresponding to the I/O request, wherein the I/O channel has a corresponding buffer zone, and the information of the I/O channel includes a file descriptor for an event notification (eventfd) (101); writing the I/O request into the buffer zone of the corresponding I/O channel (102); using the eventfd to notify the I/O channel of a corresponding user mode process (103); and in the user mode process, monitoring, according to the eventfd, an event of the corresponding I/O channel, acquiring the I/O request from the buffer zone of the corresponding I/O channel, and executing I/O simulation on the I/O request (104), wherein the user mode process includes a first device simulation process and a second device simulation process that is independent from the first device simulation process. The method can realize distribution of I/O requests in a kernel mode, and can support multiple device simulation processes for a single virtual machine, thereby improving an I/O simulation efficiency.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []