Flow control-based virtual machine request queuing
AssigneeRed Hat Israel, Ltd.
InventorMichael Tsirkin
Life of this patent
Estimating the term…
Abstract
A mechanism for flow control-based virtual machine (VM) request queuing is disclosed. A method of the invention includes implementing a pass-through mode for handling of one or more requests sent to a hypervisor by a virtual machine (VM) managed by the hypervisor, determining that a number of outstanding requests associated with the VM has exceeded a first threshold, implementing a queued mode for handling the one or more requests sent to the hypervisor from the VM, determining that a number of outstanding requests associated with the VM has fallen below a second threshold, implementing the pass-through mode for handling the one or more requests sent to the hypervisor from the VM, and repeating the implementing and determining as long as the VM continues to send requests to the hypervisor.
Claims18
A method, comprising:
- implementing, by a hypervisor executed by a processing device of a host machine, a pass-through mode to handle requests sent to the hypervisor by a virtual machine (VM) managed by the hypervisor, wherein the pass-through mode comprises the hypervisor directing the requests from the VM to at least one of a device or a module of the host machine that can handle the request;
- determining, by the hypervisor subsequent to the implementing the pass-through mode, that a number of outstanding requests corresponding to the VM exceeds a first threshold;
- implementing, by the hypervisor in view of the determining the number of outstanding requests exceeds the first threshold, a queued mode to handle the requests, wherein the queued mode comprises copying the requests to a queue of the hypervisor immediately upon receipt of the requests and notifying the VM that the requests have been queued;
- determining, by the hypervisor, that the number of outstanding requests corresponding to the VM is below a second threshold;
- and
- returning, by the hypervisor in view of the determining the number of outstanding requests is below the second threshold, the VM to the pass-through mode to handle the requests.
A system, comprising:
- a memory;
- a processing device communicably coupled to the memory;
- a hypervisor to execute one or more virtual machines (VMs) from the memory that share use of the processing device, the hypervisor to:
- implement a pass-through mode to handle requests sent to the hypervisor by a VM of the one or more VMs executed by the hypervisor, wherein the pass-through mode comprises the hypervisor directing the requests from the VM to at least one of a device or a module of the host machine that can handle the request;
- determine, subsequent to the implementing the pass-through mode, that a number of outstanding requests corresponding to the VM exceeds a first threshold;
- implement, in view of the determining the number of outstanding requests exceeds the first threshold, a queued mode to handle the requests, wherein the queued mode comprises copying the requests to a queue of the hypervisor immediately upon receipt of the requests and notifying the VM that the requests have been queued;
- determine that the number of outstanding requests corresponding to the VM is below a second threshold;
- and
- return, in view of the determining the number of outstanding requests is below the second threshold, the VM to the pass-through mode to handle.
A non-transitory machine-readable storage medium including instructions that, when accessed by a processing device, cause the processing device to perform operations comprising:
- implementing, by a hypervisor executed by the processing device of a host machine, a pass-through mode to handle requests sent to the hypervisor by a virtual machine (VM) managed by the hypervisor, wherein the pass-through mode comprises the hypervisor directing the requests from the VM to at least one of a device or a module of the host machine that can handle the request;
- determining, by the hypervisor subsequent to the implementing the pass-through mode, that a number of outstanding requests corresponding to the VM exceeds a first threshold;
- implementing, by the hypervisor in view of the determining the number of outstanding requests exceeds the first threshold, a queued mode to handle the requests, wherein the queued mode comprises copying the requests to a queue of the hypervisor immediately upon receipt of the requests and notifying the VM that the requests have been queued;
- determining, by the hypervisor, that the number of outstanding requests corresponding to the VM is below a second threshold;
- and
- returning, by the hypervisor in view of the determining the number of outstanding requests is below the second threshold, the VM to the pass-through mode to handle the requests.
Dependencies are inferred from the claim text.