IP Library Granted Patent US 8,392,623
Granted Patent B2
US 8,392,623 · App. 13/483,869 · Granted Mar 5, 2013

Guest/hypervisor interrupt coalescing for storage adapter virtual function in guest passthrough mode

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,392,623
App. No.
13/483,869
Granted
Mar 5, 2013
Kind
B2
Abstract

A method is described for coalescing input/output (IO) interrupts to a virtual machine (VM) running on a host computer. At a virtualization layer of the host computer that supports execution of the VM receives an IO interrupt in response to a completion of an IO request of the VM, wherein a transmission of the IO request by the VM to an IO device bypasses the virtualization layer. The virtualization layer then determines whether the VM has responded to a most recently delivered IO interrupt to the VM by the virtualization layer, and drops the IO interrupt if the VM has not responded to the most recently delivered IO interrupt, thereby failing to deliver the IO interrupt to the VM.

Claims (38)

1. A method for coalescing input/output (IO) interrupts to a virtual machine (VM) running on a host computer comprising the steps of:

receiving, at a virtualization layer of the host computer that supports execution of the VM, an IO interrupt in response to a completion of an IO request of the VM, wherein a transmission of the IO request by the VM to an IO device bypasses the virtualization layer;

determining, at the virtualization layer, whether the VM has responded to a most recently delivered IO interrupt to the VM by the virtualization layer; and

dropping, by the virtualization layer, the IO interrupt if the VM has not responded to the most recently delivered IO interrupt, thereby failing to deliver the IO interrupt to the VM.

2. The method of claim 1 , further comprising the step of delivering, by the virtualization layer, the IO interrupt to the VM if the VM has responded to the most recently delivered IO interrupt.

3. The method of claim 1 , if the VM has responded to the most recently delivered IO interrupt, further comprising the steps of:

determining, at the virtualization layer, a number of pending IO requests transmitted by the VM to the IO device for which the IO device has not yet responded to the host computer;

if the number of pending IO requests does not exceed a threshold value, delivering, by the virtualization layer, the IO interrupt to the VM; and

if the number of pending IO requests exceeds the threshold value, (i) delivering, by the virtualization layer, the IO interrupt to the VM if a predetermined number of IO interrupts have already been dropped, and (ii) dropping the IO interrupt if the predetermined number of IO interrupts have not been dropped.

4. The method of claim 3 , wherein the step of determining the number of pending IO requests transmitted by the VM to the IO device for which the IO device has not yet responded to the host computer further comprises calculating a difference between a first variable that represents a number of IO requests in a buffer that have been transmitted by the VM and for which the VM has not yet handled and a second variable that represents a number of IO requests in the buffer for which the IO device has responded to the host computer and are ready to be handled by the VM.

5. The method of claim 4 , wherein at least the first variable is stored in a shared memory accessible by the VM and virtualization layer and is updated by the VM during execution of the VM.

6. The method of claim 1 , wherein the determining step further comprises comparing a first identifier that identifies an IO interrupt that has been most recently handled by the VM with a second identifier that identifies an IO interrupt that has been most recently delivered by the virtualization layer to the VM, wherein the first identifier and second identifier are (i) updated by the VM and the virtualization layer, respectively, and (ii) are stored in a shared memory accessible by the VM and the virtualization layer.

7. The method of claim 4 , wherein the update of the first identifier by the VM is performed by an IO device driver in a guest operating system of the VM, wherein the IO device driver is aware of and has access to the shared memory.

8. A non-transitory computer readable storage medium including instructions that, when executed on a computer processor, causes the computer processor to coalesce input/output (IO) interrupts to a virtual machine (VM) running on a host computer, by performing the steps of:

receiving, at a virtualization layer of the host computer that supports execution of the VM, an IO interrupt in response to a completion of an IO request of the VM, wherein a transmission of the IO request by the VM to an IO device bypasses the virtualization layer;

determining, at the virtualization layer, whether the VM has responded to a most recently delivered IO interrupt to the VM by the virtualization layer; and

dropping, by the virtualization layer, the IO interrupt if the VM has not responded to the most recently delivered IO interrupt, thereby failing to deliver the IO interrupt to the VM.

9. The non-transitory computer-readable storage medium of claim 8 , wherein the instructions further perform the step of delivering, by the virtualization layer, the IO interrupt to the VM if the VM has responded to the most recently delivered IO interrupt.

10. The non-transitory computer-readable storage medium of claim 8 , wherein, if the VM has responded to the most recently delivered IO interrupt, the instructions further perform the steps of:

determining, at the virtualization layer, a number of pending IO requests transmitted by the VM to the IO device for which the IO device has not yet responded to the host computer;

if the number of pending IO requests does not exceed a threshold value, delivering, by the virtualization layer, the IO interrupt to the VM; and

if the number of pending IO requests exceeds the threshold value, (i) delivering, by the virtualization layer, the IO interrupt to the VM if a predetermined number of IO interrupts have already been dropped, and (ii) dropping the IO interrupt if the predetermined number of IO interrupts have not been dropped.

11. The non-transitory computer-readable storage medium of claim IO, wherein the step of determining the number of pending IO requests transmitted by the VM to the IO device for which the IO device has not yet responded to the host computer further comprises calculating a difference between a first variable that represents a number of IO requests in a buffer that have been transmitted by the VM and for which the VM has not yet handled and a second variable that represents a number of IO requests in the buffer for which the IO device has responded to the host computer and are ready to be handled by the VM.

12. The non-transitory computer-readable storage medium of claim 11 , wherein at least the first variable is stored in a shared memory accessible by the VM and virtualization layer and is updated by the VM during execution of the VM.

13. The computer-readable storage medium of claim 8 , wherein the determining step further comprises comparing a first identifier that identifies an IO interrupt that has been most recently handled by the VM with a second identifier that identifies an IO interrupt that has been most recently delivered by the virtualization layer to the VM, wherein the first identifier and second identifier are (i) updated by the VM and the virtualization layer, respectively, and (ii) are stored in a shared memory accessible by the VM and the virtualization layer.

14. The non-transitory computer-readable storage medium of claim 12 , wherein the update of the first identifier by the VM is performed by an IO device driver in a guest operating system of the VM, wherein the IO device driver is aware of and has access to the shared memory.

15. A host computer configured to coalesce input/output (IO) interrupts to a virtual machine (VM) running on the host computer, the host computer comprising a processor configured to perform the steps of:

receiving, at a virtualization layer of the host computer that supports execution of the VM, an IO interrupt in response to a completion of an IO request of the VM, wherein a transmission of the IO request by the VM to an IO device bypasses the virtualization layer;

determining, at the virtualization layer, whether the VM has responded to a most recently delivered IO interrupt to the VM by the virtualization layer; and

dropping, by the virtualization layer, the IO interrupt if the VM has not responded to the most recently delivered IO interrupt, thereby failing to deliver the IO interrupt to the VM.

16. The host computer of claim 15 , wherein the processor is further configured to perform the step of delivering, by the virtualization layer, the IO interrupt to the VM if the VM has responded to the most recently delivered IO interrupt.

17. The host computer of claim 15 , wherein, if the VM has responded to the most recently delivered IO interrupt, the processor is further configured to perform the steps of:

determining, at the virtualization layer, a number of pending IO requests transmitted by the VM to the IO device for which the IO device has not yet responded to the host computer;

if the number of pending IO requests does not exceed a threshold value, delivering, by the virtualization layer, the IO interrupt to the VM; and

if the number of pending IO requests exceeds the threshold value, (i) delivering, by the virtualization layer, the IO interrupt to the VM if a predetermined number of IO interrupts have already been dropped, and (ii) dropping the IO interrupt if the predetermined number of IO interrupts have not been dropped.

18. The host computer of claim 17 , wherein the step of determining the number of pending IO requests transmitted by the VM to the IO device for which the IO device has not yet responded to the host computer further comprises calculating a difference between a first variable that represents a number of IO requests in a buffer that have been transmitted by the VM and for which the VM has not yet handled and a second variable that represents a number of IO requests in the buffer for which the IO device has responded to the host computer and are ready to be handled by the VM.

19. The host computer of claim 18 , wherein at least the first variable is stored in a shared memory accessible by the VM and virtualization layer and is updated by the VM during execution of the VM.

20. The host computer of claim 15 , wherein the determining step further comprises comparing a first identifier that identifies an IO interrupt that has been most recently handled by the VM with a second identifier that identifies an IO interrupt that has been most recently delivered by the virtualization layer to the VM, wherein the first identifier and second identifier are (i) updated by the VM and the virtualization layer, respectively, and (ii) are stored in a shared memory accessible by the VM and the virtualization layer.

Assignments (1)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0314 →