Methods and apparatus involve monitoring spin locks for guest devices. Fully virtualized guests have multiple virtual processors configured under the scheduling control of a hypervisor on a physical hardware platform. The hypervisor posts On CPU and CR3 load information to shared communications pages for each of the processors. A monitoring module in the guest device monitors the pages to ascertain forward progress of the processors. If forward progress is being made, the virtual processors continue to spin. If not, the CPU's control is variously relinquished. The monitoring module typifies a kernel driver so that the guest can maintain an unmodified operating system. Ticket spin locks, and their ordering, are also considered as are computations for lock owners. Other features contemplate computing systems and computer program products, to name a few.
Legal claims defining the scope of protection, as filed with the USPTO.
1. In a computing system environment, a method of monitoring spin locks for guest computing devices having multiple virtual processors configured under the scheduling control of a hypervisor on a hardware platform having at least one physical processor and memory, comprising: determining which of the virtual processors is an owner of a spin lock under consideration; determining whether the owner is considered On CPU by the hypervisor; and relinquishing control of the physical processor to another of the virtual processors if the owner is not said considered On CPU and a ticket order of the virtual processors ahead of the owner are also not considered On CPU.
2. The method of claim 1 , further including determining whether CR3 loads have occurred within a predefined monitoring period before determining the owner.
3. The method of claim 1 , further including examining an interrupted program counter value.
4. The method of claim 3 , further including determining whether the program counter value is found within a spin lock code block.
5. The method of claim 1 , wherein the determining the owner further includes extracting an address of the spin lock from a saved register state of an interrupted context.
6. The method of claim 5 , wherein the ticket order is extracted from the saved register state.
7. In a computing system environment, a method of monitoring spin locks for guest computing devices having multiple virtual processors configured under the scheduling control of a hypervisor on a hardware platform having at least one physical processor and memory, comprising: determining which of the virtual processors is an owner of a spin lock under consideration; determining whether the owner is considered On CPU by the hypervisor; and relinquishing control of the physical processor to another of the virtual processors if the owner is not said considered On CPU and a ticket order of the virtual processors ahead of the owner are also not considered On CPU, wherein the ticket order is extracted from a saved register state of an interrupted context.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
November 16, 2009
January 1, 2013
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.