IP Library Granted Patent US 10,521,265
Granted Patent B2
US 10,521,265 · App. 12/234,353 · Granted Dec 31, 2019

Coalescing periodic timer expiration in guest operating systems in a virtualized environment

Inventors: Haiyong Wang (Redmond, WA); Brandon S. Baker (Redmond, WA); Shuvabrata Ganguly (Seattle, WA); Thomas D. I. Fahrig (Redmond, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F9/4812G06F9/45533Y02D10/24Y02D10/26Y02D10/28
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 10,521,265
App. No.
12/234,353
Granted
Dec 31, 2019
Kind
B2
Abstract

Techniques are disclosed for coalescing timer ticks generated by timers used to service guest operating systems executing in virtual machines. By coalescing timer ticks a logical processor can enter a low power mode thereby reducing power consumed by the system.

Claims (50)

1. A method for coalescing interrupts, comprising:

receiving, by a first virtual timer of a first virtual machine, a request for periodic interrupts at a first interval from a first guest operating system executing on the first virtual machine;

receiving, by a second virtual timer of a second virtual machine, a request for periodic interrupts at a second interval from a second guest operating system executing on the second virtual machine;

determining, based on the first interval, a first system time range for the first virtual machine, the first system time range comprising a minimum system time and a maximum system time for generating a periodic interrupt for the first virtual machine within a tolerance of the first guest operating system;

determining, based on the second interval, a second system time range for the second virtual machine, the second system time range comprising a minimum system time and a maximum system time for generating a periodic interrupt for the second virtual machine within a tolerance of the second guest operating system

determining an interrupt time range, the interrupt time range being the intersection between the first system time range and the second system time range, and setting a hardware timer to expire at first system time within the interrupt time range; and

sending, in response to the hardware timer expiring at the first system time, a virtual timer interrupt to each of the first virtual machine and the second virtual machine.

2. The method of claim 1 , further comprising:

receiving an asynchronous interrupt prior to the first system time;

determining whether a current system time is within the interrupt time range in response to receiving the asynchronous interrupt; and

sending a virtual timer interrupt to each of the first virtual machine and the second virtual machine in response to determining the current system time is within the interrupt time range.

3. The method of claim 2 , wherein the method further comprises:

clearing the set timer in response to sending the virtual timer interrupts.

4. The method of claim 2 , wherein the asynchronous interrupt was generated by a hardware device.

5. The method of claim 1 , wherein the first interval is different form the second interval.

6. The method of claim 5 , wherein determining the first system time range further comprises:

determining a second system time that is a multiple of the first interval, wherein the second system time is within the first system time range.

7. The method of claim 6 , wherein determining the second system time further comprises:

determining a third system time that is a multiple of the second interval, wherein the third system time that is within the second system time range.

8. A system for coalescing interrupts comprising:

circuitry configured to receive a signal from a first guest operating system executing on a first virtual machine, the signal programming a virtual timer of the first virtual machine to generate periodic interrupts at a first interval;

circuitry configured to receive a second signal from a second guest operating system executing on a second virtual machine, the second signal programming a virtual timer of the second virtual machine to generate periodic interrupts at a second interval;

circuitry configured to determine based on the first interval, a first system time range for the first virtual machine, the first system time range comprising a minimum system time and a maximum system time for generating a periodic interrupt for the first virtual machine within a tolerance of the first guest operating system;

circuitry configured to determine, based on the second interval, a second system time range for the second virtual machine, the second system time range comprising a minimum system time and a maximum system time for generating a periodic interrupt for the second virtual machine within a tolerance of the second guest operating system

circuitry configured to determine an interrupt time range, the interrupt time range being the intersection between the first system time range and the second system time range, and set a hardware timer to expire at a first system time within the interrupt time range; and

circuitry configured to send, in response to the hardware timer expiring at the first system time, a virtual timer interrupt to each of the first virtual machine and the second virtual machine.

9. The system of claim 8 , further comprising:

circuitry configured to receive an asynchronous interrupt prior to the first system time;

circuitry configured to determine whether a current system time is within the interrupt time range in response to receiving the asynchronous interrupt; and

circuitry configured to send a virtual timer interrupt to each of the first virtual machine and the second virtual machine in response to determining the current system time is within the interrupt time range.

10. The system of claim 9 , further comprising:

circuitry configured to clear the set timer in response to sending the virtual timer interrupts.

11. The system of claim 9 , wherein the asynchronous interrupt was generated by a hardware device.

12. The system of claim 9 , wherein the asynchronous interrupt comprises a hypercall.

13. The system of claim 9 , wherein the asynchronous interrupt comprises a hypervisor intercept.

14. A computer readable hardware storage device including computer executable instructions for coalescing interrupts, the computer readable hardware storage device comprising:

instructions for receiving, by a first virtual timer of a first virtual machine, a request for a periodic interrupts at a first interval from a first guest operating system executing on the first virtual machine;

instructions for receiving, by a second virtual timer of a second virtual machine, a request for a periodic interrupts at a second interval from a second guest operating system executing on the second virtual machine;

instructions for determining, based on the first interval, a first system time range for the first virtual machine, the first system time range comprising a minimum system time and a maximum system time for generating a periodic interrupt for the first virtual machine within a tolerance of the first guest operating system;

instructions for determining based on the second interval a second system time range for the second virtual machine, the second system time range comprising a minimum system time and a maximum system time for generating a periodic interrupt for the second virtual machine within a tolerance of the second guest operating system; and

instructions for determining an interrupt time range, the interrupt time range being the intersection between the first system time range and the second system time range, and setting a hardware timer to expire at a first system time within the interrupt time range; and

sending, in response to the hardware timer expiring at the first system time, a virtual timer interrupt to each of the first virtual machine and the second virtual machine.

15. The computer readable storage device of claim 14 , further comprising:

instructions for receiving an asynchronous interrupt prior to the first system time;

instructions for determining whether a current system time is within the interrupt time range in response to receiving the asynchronous interrupt; and

instructions for sending a virtual timer interrupt to each of the first virtual machine and the second virtual machine in response to determining the current system time is within the interrupt time range.

16. The computer readable storage device of claim 15 , further comprising:

instructions for clearing the set timer in response to sending the virtual timer interrupts.

17. The computer readable storage device of claim 14 , wherein the asynchronous interrupt is received from a programmed timer.

18. The computer readable storage device of claim 14 , wherein the asynchronous interrupt is received from a hardware device.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034564/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 25, 2008
From: WANG, HAIYONG; BAKER, BRANDON S; GANGULY, SHUVABRATA; FAHRIG, THOMAS D I
To: MICROSOFT CORPORATION
Reel/Frame 021891/0073 →
Continuity (1)
Related Publication 20100077394A1 · Mar 25, 2010