US 12,032,989 B2
Timer processing method, apparatus, electronic device and computer storage medium
Yun Xu, Hangzhou (CN); Yibin Shen, Hangzhou (CN); and Xiantao Zhang, Hangzhou (CN)
Assigned to Alibaba Group Holding Limited, George Town (KY)
Filed by Alibaba Group Holding Limited, Grand Cayman (KY)
Filed on Mar. 18, 2022, as Appl. No. 17/698,402.
Application 17/698,402 is a continuation of application No. PCT/CN2020/116465, filed on Sep. 21, 2020.
Claims priority of application No. 201910913341.0 (CN), filed on Sep. 25, 2019.
Prior Publication US 2022/0206840 A1, Jun. 30, 2022
Int. Cl. G06F 9/48 (2006.01); G06F 9/455 (2018.01)
CPC G06F 9/4825 (2013.01) [G06F 9/45558 (2013.01); G06F 2009/45575 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method implemented by a computing device, the method comprising:
determining to perform timer switching on a virtual local timer used by a virtual processor according to one or more preset timer switching conditions;
determining a physical processor of the computing device that runs the virtual processor, and switching a physical local timer currently used by the physical processor to a physical global timer, to enable the physical processor to perform operations on the physical global timer, wherein a clock interrupt generated by the physical local timer is delivered to the physical processor of the computing device only, and a clock interrupt generated by the physical global timer is delivered to any physical processor of the computing device; and
performing a timer configuration for the virtual processor to enable the physical local timer to act as a timer of the virtual processor.
 
8. One or more computer readable media storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:
determining to perform timer switching on a virtual local timer used by a virtual processor according to one or more preset timer switching conditions;
determining a physical processor that runs the virtual processor, and switching a physical local timer currently used by the physical processor to a physical global timer; and
performing a timer configuration for the virtual processor to enable the physical local timer to act as a timer of the virtual processor.
 
15. An apparatus comprising:
one or more processors; and
memory storing executable instructions that, when executed by the one or more processors, cause the one or more processors to perform acts comprising:
determining to perform timer switching on a virtual local timer used by a virtual processor according to one or more preset timer switching conditions;
determining a physical processor that runs the virtual processor, and switching a physical local timer currently used by the physical processor to a physical global timer; and
performing a timer configuration for the virtual processor to enable the physical local timer to act as a timer of the virtual processor.