US 12,411,704 B2
Efficient central processing unit overcommit for virtual machines with symmetric multi-processing
Michael Tsirkin, Yokneam Illit (IL)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by Red Hat, Inc., Raleigh, NC (US)
Filed on Mar. 23, 2022, as Appl. No. 17/702,090.
Prior Publication US 2023/0305872 A1, Sep. 28, 2023
Int. Cl. G06F 9/455 (2018.01); G06F 9/48 (2006.01)
CPC G06F 9/45558 (2013.01) [G06F 9/4812 (2013.01); G06F 9/485 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method performed by a computer system, the method comprising:
receiving a preemption-disable request on behalf of a virtual machine (VM) running on a physical central processing unit (PCPU);
determining that the VM is a Simultaneous Multi-Processing (SMP) VM;
in response to receiving the preemption-disable request and determining that the VM is a SMP VM, initiating a counter on the PCPU to a counter value, wherein the counter value is dynamically determined by the computer system based on one or more factors;
in response to receiving a preempting task from a hypervisor to perform on the PCPU, checking a counter status for the counter; and
in response to the counter status being active:
performing an ongoing task from the VM on the PCPU; and
delaying performance of the preempting task until the counter status is inactive.