IP Library › Granted Patent US 11,281,487
Granted Patent B2
US 11,281,487 · App. 16/740,198 · Granted Mar 22, 2022

Managing processor overcommit for virtual machines

Inventor: Michael Tsirkin (Lexington, MA)
Assignee: Red Hat, Inc.
G06F9/45558G06F9/4812G06F9/505G06F9/5077G06F9/542G06F9/546G06F2009/45562G06F2009/45583G06F2209/5018G06F2209/5022
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 11,281,487
App. No.
16/740,198
Granted
Mar 22, 2022
Kind
B2
Abstract

Systems and methods for managing processor overcommit for virtual machines are disclosed. In one implementation, a processing device may identify, by a hypervisor running on a host computer system, an over-committed physical processor, the physical processor is executing a thread implementing a first virtual processor (vCPU) of a virtual machine (VM). The processing device may further queue, by the hypervisor, a message notifying the VM of hot-unplugging of the first vCPU. Responsive to receiving, by the hypervisor, a notification of a second vCPU of the VM transitioning into an idle state, the processing device may also transmitting the message to the VM.

Claims (35)

1. A method comprising:

identifying, by a hypervisor running on a host computer system, an over-committed physical processor, wherein the physical processor is executing a thread implementing a first virtual processor (vCPU) of a virtual machine (VM);

queuing, by the hypervisor, a message notifying the VM of hot-unplugging of the first vCPU; and

responsive to receiving, by the hypervisor, a notification of a second vCPU of the VM transitioning into an idle state, transmitting the message to the VM.

2. The method of claim 1 , wherein identifying the over-committed physical processor comprises:

determining that a task is waiting to be executed by the physical processor while the physical processor is executing the thread implementing the first vCPU.

3. The method of claim 2 , wherein the task is a second thread implementing a second vCPU of a second VM.

4. The method of claim 1 , wherein the first vCPU and the second vCPU are the same vCPU.

5. The method of claim 1 , wherein the message to the VM further comprises an inter-processor interrupt (IPI) to unplug the first vCPU.

6. The method of claim 1 , wherein hot-unplugging of the first vCPU comprises removing the first vCPU from a set of vCPUs associated with the VM without shutting down the VM.

7. The method of claim 1 , wherein transmitting the message to the VM is performed via a shared memory region that is accessible to the vCPUs of the VM.

8. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processing device, cause the processing device to:

detect that a first virtual processor (vCPU) of a virtual machine (VM) running on a host computer system is transitioning into an idle state;

responsive to the detection, determine whether a configuration change request of hot-unplugging a second vCPU of the VM is pending;

responsive to determining that the configuration change request of hot-unplugging the second vCPU of the VM is pending, transmit a message notifying the VM of hot-unplugging of the second vCPU; and

mark the configuration change request as complete.

9. The non-transitory computer-readable storage medium of claim 8 , wherein the configuration change request corresponds to a determination that at least one of a plurality of vCPUs of the VM is being executed by an over-committed physical processor of the host computer system.

10. The non-transitory computer-readable storage medium of claim 9 , wherein to identify the over-committed physical processor, the processing logic is further to detect that a first task is waiting to be executed by the physical processor while the physical processor is executing a second task.

11. The non-transitory computer-readable storage medium of claim 8 , wherein the message to the VM further comprises an IPI to hot-unplug the second vCPU.

12. The non-transitory computer-readable storage medium of claim 8 , wherein hot-unplugging of the second vCPU further comprises removing the second vCPU from a set of vCPUs associated with the VM without shutting down the VM.

13. The non-transitory computer-readable storage medium of claim 8 , wherein to detect that the first vCPU is transitioning into the idle state, the processing logic is further to detect that the first vCPU is executing a VM exit instruction.

14. The non-transitory computer-readable storage medium of claim 8 , wherein the processing device is further to:

responsive to waiting for a predetermined period of time, send the message to the VM using a shared memory region that is accessible to the vCPUs of the VM.

15. A system comprising:

a memory; and

a processing device operatively coupled to the memory, wherein the processing device is to:

identify an over-committed physical processor, wherein the physical processor is executing a thread implementing a first virtual processor (vCPU) of a virtual machine (VM);

queuing a message notifying the VM of hot-unplugging of the first vCPU; and

responsive to receiving a notification of a second vCPU of the VM transitioning into an idle state, transmitting the message to the VM.

16. The system of claim 15 , wherein identifying the over-committed physical processor comprises:

determining that a task is waiting to be executed by the physical processor while the physical processor is executing the thread implementing the first vCPU.

17. The system of claim 16 , wherein the task is a second thread implementing a second vCPU of a second VM.

18. The system of claim 15 , wherein the first vCPU and the second vCPU are the same vCPU.

19. The system of claim 15 , wherein the message to the VM further comprises an inter-processor interrupt (WI) to unplug the first vCPU.

20. The system of claim 15 , wherein hot-unplugging of the first vCPU comprises removing the first vCPU from a set of vCPUs associated with the VM without shutting down the VM.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2020
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 051483/0842 →
Continuity (1)
Related Publication 20210216344A1 · Jul 15, 2021
Cited By (2)
US 12,705,083 US 12,748,610