Selective descheduling of idling guests running on a host computer system
First Claim
Patent Images
1. A method of scheduling virtual machines running on at least one processor, comprising:
- receiving instructions of a virtual machine for binary translation at a binary translation layer, the binary translation layer generating an outgoing stream of instructions for execution on the at least one processor;
detecting a PAUSE instruction in the received instructions; and
inserting a descheduling instruction block in the outgoing stream of instructions to deschedule the virtual machine based upon detection of the PAUSE instruction, wherein the descheduling instruction block inserted in the outgoing stream of instructions is to measure how long the PAUSE instruction has been executed, and to deschedule the virtual machine if the execution time of the PAUSE instruction is longer than a threshold period.
1 Assignment
0 Petitions
Accused Products
Abstract
Guests, such as virtual machines, that are running on a host hardware platform are selectively descheduled when an idling condition is detected. An example of the idling condition is that the guest has been executing instructions in an idle loop for more than a threshold period. Guest instructions may be evaluated for the idling condition in conjunction with binary translation.
36 Citations
28 Claims
-
1. A method of scheduling virtual machines running on at least one processor, comprising:
-
receiving instructions of a virtual machine for binary translation at a binary translation layer, the binary translation layer generating an outgoing stream of instructions for execution on the at least one processor; detecting a PAUSE instruction in the received instructions; and inserting a descheduling instruction block in the outgoing stream of instructions to deschedule the virtual machine based upon detection of the PAUSE instruction, wherein the descheduling instruction block inserted in the outgoing stream of instructions is to measure how long the PAUSE instruction has been executed, and to deschedule the virtual machine if the execution time of the PAUSE instruction is longer than a threshold period. - View Dependent Claims (2, 3, 4, 5, 6, 7, 9, 10, 11)
-
-
8. A method of scheduling virtual machines running on at least one processor, the method comprising:
-
receiving instructions of a virtual machine for binary translation at a binary translation layer, the binary translation layer generating an outgoing stream of instructions for execution on the at least one processor; detecting an idling loop in the received instructions; and inserting a descheduling instruction block in the outgoing stream of instructions to deschedule the virtual machine if an instruction associated with an atomic memory access is detected within the idling loop, wherein the descheduling instruction block inserted in the outgoing stream of instructions is to deschedule the virtual machine if an execution duration of the idling loop meets or exceeds a threshold.
-
-
12. A method of scheduling virtual machines running on at least one processor, the method comprising:
-
converting at least some instructions issued by a virtual machine using binary translation into respective translated instruction streams for execution on the at least one processor; detecting a PAUSE instruction in the at least some instructions; determining a threshold period based on a workload of the at least one processor; and emitting a descheduling code block in the translated instruction stream for at least one of the at least some instructions if the PAUSE instruction is detected, wherein the descheduling code block, when executed by the at least one processor, performs operations of; measuring a time period for which an idling loop containing the PAUSE instruction has been executed, and descheduling the virtual machine if the time period for which the idling loop has executed exceeds the threshold period. - View Dependent Claims (13, 14)
-
-
15. A computer system comprising:
-
a host hardware platform, which includes at least one hardware processor; at least one virtual machine to issue instructions for execution on the at least one hardware processor; a system layer to mediate access by the virtual machine for hardware resources, the hardware resources including the at least one hardware processor; an interface layer to observe the instructions issued by the at least one virtual machine to be executed on the at least one hardware processor; a binary translation sub-system within the interface layer to convert at least some of the instructions issued by the at least one virtual machine using binary translation into respective translated instruction streams for execution on the at least one hardware processor; a detection module to detect instructions forming an idling loop by identifying instruction pointers within one or more instruction pointer ranges within the instructions issued by the virtual machine; and a scheduling module within the system layer to deschedule the virtual machine; in which; the detection module is incorporated into the binary translator and is further to emit a descheduling code block in the translated instruction stream for at least one of the instructions issued by the at least one virtual machine, wherein the descheduling code block is to measure how long the idling loop has executed, and is to indicate descheduling to the scheduling module if the execution time of the idling loop is longer than a threshold period. - View Dependent Claims (25, 26)
-
-
16. A computer-readable non-propagating storage medium comprising a set of instructions which, when executed, cause at least one processor to at least:
detect instructions forming an idling loop in instructions of a virtual machine by detecting respective instruction pointers in one or more instruction pointer ranges, the instructions being received for binary translation at a binary translation layer, the binary translation layer generating an outgoing stream of instructions for execution on the at least one processor; insert instructions in the outgoing stream of instructions for descheduling the virtual machine in association with the instructions forming the idling loop; and adjust a threshold period as a function of workload on the at least one processor. - View Dependent Claims (19, 20, 21, 22, 23, 24, 27, 28)
-
17. A computer-readable non-propagating storage medium comprising a set of instructions which, when executed, cause a machine to at least:
detect instructions forming an idling loop in instructions of a virtual machine by detecting respective instruction pointers in one or more instruction pointer ranges, the instructions being received for binary translation at a binary translation layer, the binary translation layer generating an outgoing stream of instructions for execution on the machine; insert instructions in the outgoing stream of instructions for descheduling the virtual machine in association with the instructions forming the idling loop; and measure a frequency at which instructions received for binary translation are within a fixed instruction address range, and wherein the instructions for descheduling the virtual machine are inserted if the frequency exceeds a threshold frequency.
-
18. A computer-readable non-propagating storage medium comprising a set of instructions which, when executed, cause a machine to at least:
-
detect instructions forming an idling loop in instructions of a virtual machine by detecting respective instruction pointers in one or more instruction pointer ranges, the instructions being received for binary translation at a binary translation layer, the binary translation layer generating an outgoing stream of instructions for execution on the machine; insert instructions in the outgoing stream of instructions for descheduling the virtual machine in association with the instructions forming the idling loop; sample the instructions received for binary translation; measure a frequency at which the sampled instructions are within a fixed instruction address range, and determine that the instructions forming the idling loop have been detected when the frequency exceeds a threshold frequency.
-
Specification