WO2023155695A1 - Processor, control method, device, and medium - Google Patents

Processor, control method, device, and medium Download PDF

Info

Publication number
WO2023155695A1
WO2023155695A1 PCT/CN2023/074407 CN2023074407W WO2023155695A1 WO 2023155695 A1 WO2023155695 A1 WO 2023155695A1 CN 2023074407 W CN2023074407 W CN 2023074407W WO 2023155695 A1 WO2023155695 A1 WO 2023155695A1
Authority
WO
WIPO (PCT)
Prior art keywords
processor core
frequency
rate
target
target processor
Prior art date
Application number
PCT/CN2023/074407
Other languages
French (fr)
Chinese (zh)
Inventor
罗犇
Original Assignee
阿里巴巴(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴(中国)有限公司 filed Critical 阿里巴巴(中国)有限公司
Publication of WO2023155695A1 publication Critical patent/WO2023155695A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Abstract

Disclosed in the embodiments of the present disclosure are a processor, a control method, a device, and a medium. The processor comprises at least one processor core and at least one upper limit register, wherein the upper limit register is used for storing an upper limit rate, and when a first rate, at which a target processor core corresponding to a target upper limit register generates a split lock, is greater than or equal to a target upper limit rate in the target upper limit register, the highest frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception, the target upper limit register belongs to the at least one upper limit register, and the target processor core belongs to the at least one processor core. By means of the solution, when the normal execution of an application program of a user is not affected to the greatest possible extent, the performance of a processor core not being reduced too much due to the generation of a split lock can be ensured, thereby improving the user experience.

Description

处理器、控制方法、设备及介质Processor, control method, device and medium
本申请要求于2022年02月21日提交中国专利局、申请号为202210156946.1、申请名称为“处理器、控制方法、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202210156946.1 and the application title "processor, control method, device and medium" filed with the China Patent Office on February 21, 2022, the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本公开涉及网络技术领域,具体涉及处理器、控制方法、设备及介质。The present disclosure relates to the field of network technology, and specifically relates to a processor, a control method, equipment and media.
背景技术Background technique
在利用处理器进行运算操作时,可能发生非对齐的内存访问,例如,支持对称多处理(Symmetrical Multi-Processing,SMP)的处理器可以包括多个处理器核(core),多个处理器核中的某个处理器核可能发生跨越两个高速缓存数据线(cache lines)的数据读取。在发生这种状况时,为了保证数据读取的原子性,需要锁定该处理器的整个总线,这种状况可以理解为该处理器核产生了分裂锁(splitlock)。虽然上述方案可以保证数据读取的原子性,但由于处理器的总线被锁住,可能导致其它处理器核无法在总线被锁住时并发访问内存,导致处理器的性能下降。Unaligned memory access may occur when the processor is used for computing operations. For example, a processor supporting Symmetrical Multi-Processing (SMP) may include multiple processor cores (cores), multiple processor cores A data read across two cache data lines (cache lines) may occur in a processor core. When this situation occurs, in order to ensure the atomicity of data reading, the entire bus of the processor needs to be locked. This situation can be understood as that the processor core has generated a split lock (splitlock). Although the above scheme can guarantee the atomicity of data reading, because the bus of the processor is locked, other processor cores may not be able to access the memory concurrently when the bus is locked, resulting in a decrease in the performance of the processor.
相关技术中,可以通过使运行在处理器上的应用程序以及应用程序的编译器尽量避免分配跨cacheline的变量地址,以减少splitlock的产生次数,达到降低总线锁定的几率的目的。In related technologies, the application program running on the processor and the compiler of the application program can avoid allocating variable addresses across cachelines as much as possible, so as to reduce the number of splitlock generation and reduce the probability of bus locking.
虽然上述方案可以降低总线锁定的几率,但是,在应用程序无法受控的场景中,例如云计算场景中,云计算服务商无法对运行在处理器上的应用程序进行控制,因此如何在处理器上运行有可能产生splitlock的应用程序时,在处理器的性能不会因产生splitlock而受到过多影响的前提下,保护处理器上运行的其他应用程序,使其他应用程序能够正常运行,是相关技术中亟待解决的问题。Although the above solution can reduce the probability of bus locking, in scenarios where applications cannot be controlled, such as cloud computing scenarios, cloud computing service providers cannot control applications running on processors, so how to When an application that may generate a splitlock is running on the CPU, on the premise that the performance of the processor will not be too much affected by the splitlock, it is relevant to protect other applications running on the processor so that other applications can run normally technical problems to be solved.
发明内容Contents of the invention
为了解决相关技术中的问题,本公开实施例提供了处理器、控制方法、设备及介质。In order to solve problems in related technologies, embodiments of the present disclosure provide a processor, a control method, a device, and a medium.
第一方面,本公开实施例中提供了一种处理器,其中,处理器包括至少一个处理器核以及至少一个上限寄存器;In a first aspect, an embodiment of the present disclosure provides a processor, wherein the processor includes at least one processor core and at least one upper limit register;
上限寄存器,用于储存上限速率,当目标上限寄存器对应的目标处理器核产生分裂锁(splitlock)的第一速率大于或等于目标上限寄存器中的目标上限速率时,目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常,目标上限寄存器属于至少一个上限寄存器,目标处理器核属于至少一个处理器核。 The upper limit register is used to store the upper limit rate. When the first rate of the target processor core corresponding to the target upper limit register produces a split lock (splitlock) greater than or equal to the target upper limit rate in the target upper limit register, the highest frequency of the target processor core is lower, and/or the target processor core triggers an alignment check exception, the target upper limit register belongs to at least one upper limit register, and the target processor core belongs to at least one processor core.
结合第一方面,本公开在第一方面的第一种实现方式中,With reference to the first aspect, in the first implementation manner of the first aspect of the present disclosure,
处理器还包括频率控制逻辑电路,至少一个处理器核以及至少一个上限寄存器均与频率控制逻辑电路连接;The processor also includes a frequency control logic circuit, at least one processor core and at least one upper limit register are connected to the frequency control logic circuit;
频率控制逻辑电路,用于获取至少一个处理器核产生splitlock的速率,并从至少一个上限寄存器读取上限速率,响应于第一速率大于或等于目标上限速率,降低目标处理器核的最高频率。The frequency control logic circuit is used to obtain the rate at which at least one processor core generates splitlock, read the upper limit rate from at least one upper limit register, and reduce the maximum frequency of the target processor core in response to the first rate being greater than or equal to the target upper limit rate.
结合第一方面的第一种实现方式,本公开在第一方面的第二种实现方式中,With reference to the first implementation of the first aspect, in the second implementation of the first aspect of the present disclosure,
降低目标处理器核的最高频率,包括:Reduce the maximum frequency of the target processor core, including:
获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率;Obtain the highest frequency after the reduction of the target processor core, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the second rate at which the target processor core generates splitlock is less than the target upper limit rate;
其中,降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为降低后最高频率,Fc1为目标处理器核的降低前频率,R为目标上限速率,C1为第一速率。Among them, the highest frequency after reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , Ft 1 is the highest frequency after reduction, Fc 1 is the frequency before reduction of the target processor core, R is the target upper limit rate, and C 1 is the first a rate.
结合第一方面的第一种实现方式至第二种实现方式中任一项,本公开在第一方面的第三种实现方式中,其中,频率控制逻辑电路,还用于:In combination with any one of the first to second implementations of the first aspect, the present disclosure is in a third implementation of the first aspect, wherein the frequency control logic circuit is also used for:
获取当前目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
响应于第三速率小于目标上限速率,升高目标处理器核的最高频率。In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
结合第一方面的第三种实现方式,本公开在第一方面的第四种实现方式中,其中,频率控制逻辑电路,还用于:With reference to the third implementation of the first aspect, in the fourth implementation of the first aspect of the present disclosure, the frequency control logic circuit is further used for:
获取当前的频率调整计数值以及当前目标处理器核的升高前频率,频率调整计数值为从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the pre-increase frequency of the current target processor core. The frequency adjustment count value starts from the moment when the frequency of the target processor core is lowered, and the frequency adjustment count threshold is continuously decremented according to the count decrement speed. ;
升高目标处理器核的最高频率,包括:Increase the maximum frequency of the target processor core, including:
根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值均与升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value, and set the maximum frequency of the target processor core as the highest frequency after the increase. The third rate and the frequency adjustment count value are the same as the increase After the highest frequency negative correlation.
结合第一方面的第四种实现方式,本公开在第一方面的第五种实现方式中,其中,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,包括:With reference to the fourth implementation of the first aspect, the present disclosure is in the fifth implementation of the first aspect, wherein the highest frequency after the increase is obtained according to the frequency before the increase, the third rate, and the frequency adjustment count value, including:
根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为升高前频率,R为目标上限速率,C2为第三速率,T为频率调整计数阈值,Tc为频率调整计数值。According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), obtain the highest frequency Ft 2 after the increase, where Fc 2 is the frequency before the increase, and R is the target upper limit rate, C 2 is the third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
结合第一方面的第四种实现方式,本公开在第一方面的第六种实现方式中,其中,With reference to the fourth implementation manner of the first aspect, the present disclosure is in a sixth implementation manner of the first aspect, wherein,
处理器还包括用于储存频率调整计数阈值的频率调整计数阈值寄存器以及用于储存频率调整计数值的频率调整计数值寄存器,频率调整计数阈值寄存器以及频率调整计数值寄存器均与频率控制逻辑电路连接; The processor also includes a frequency adjustment count threshold register for storing the frequency adjustment count threshold and a frequency adjustment count value register for storing the frequency adjustment count value, the frequency adjustment count threshold register and the frequency adjustment count value register are connected to the frequency control logic circuit ;
频率控制逻辑电路,用于在控制目标处理器核的频率降低的时刻,将从频率调整计数阈值寄存器读取的频率调整计数阈值储存在频率调整计数值寄存器中,并根据计数递减速度对频率调整计数值寄存器中的频率调整计数阈值进行持续递减;The frequency control logic circuit is used to store the frequency adjustment count threshold read from the frequency adjustment count threshold register in the frequency adjustment count value register at the moment when the frequency of the control target processor core is reduced, and to adjust the frequency according to the count decrement speed The frequency adjustment counting threshold in the counting value register is continuously decremented;
获取当前的频率调整计数值,包括:Get the current frequency adjustment count value, including:
从频率调整计数值寄存器中读取当前的频率调整计数值。Read the current frequency adjustment count value from the frequency adjustment count value register.
结合第一方面的第四种实现方式,本公开在第一方面的第七种实现方式中,其中,频率控制逻辑电路,还用于:With reference to the fourth implementation manner of the first aspect, in the seventh implementation manner of the first aspect of the present disclosure, the frequency control logic circuit is further used for:
响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率。In response to the frequency adjustment count value being 0, the highest frequency of the target processor core is set as the highest frequency of the processor core.
第二方面,本公开实施例中提供了一种处理器控制方法,其中,方法包括:In a second aspect, an embodiment of the present disclosure provides a method for controlling a processor, where the method includes:
获取处理器的至少一个处理器核产生分裂锁(splitlock)的速率以及至少一个处理器核对应的上限速率;Obtain the rate at which at least one processor core of the processor generates a split lock (splitlock) and the upper limit rate corresponding to at least one processor core;
响应于至少一个处理器核中的目标处理器核产生splitlock的第一速率大于或等于目标处理器核对应的上限速率,降低目标处理器核的最高频率,和/或使目标处理器核触发对齐检查异常。In response to the target processor core in at least one processor core generating a first rate of splitlock greater than or equal to the upper limit rate corresponding to the target processor core, reducing the maximum frequency of the target processor core, and/or causing the target processor core to trigger alignment Check for exceptions.
结合第二方面,本公开在第二方面的第一种实现方式中,其中,降低目标处理器核的最高频率,包括:With reference to the second aspect, in the first implementation manner of the second aspect of the present disclosure, reducing the maximum frequency of the target processor core includes:
获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率;Obtain the highest frequency after the reduction of the target processor core, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the second rate at which the target processor core generates splitlock is less than the target upper limit rate;
其中,降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为降低后最高频率,Fc1为目标处理器核的降低前频率,R为目标上限速率,C1为第一速率。Among them, the highest frequency after reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , Ft 1 is the highest frequency after reduction, Fc 1 is the frequency before reduction of the target processor core, R is the target upper limit rate, and C 1 is the first a rate.
结合第二方面或第二方面的第一种实现方式,本公开在第二方面的第二种实现方式中,其中,方法还包括:With reference to the second aspect or the first implementation manner of the second aspect, the present disclosure is in the second implementation manner of the second aspect, wherein the method further includes:
获取当前目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
响应于第三速率小于目标上限速率,升高目标处理器核的最高频率。In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
结合第二方面的第二种实现方式,本公开在第二方面的第三种实现方式中,其中,方法还包括:With reference to the second implementation of the second aspect, the present disclosure is in a third implementation of the second aspect, wherein the method further includes:
获取当前的频率调整计数值以及当前目标处理器核的升高前频率,频率调整计数值为从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the pre-increase frequency of the current target processor core. The frequency adjustment count value starts from the moment when the frequency of the target processor core is lowered, and the frequency adjustment count threshold is continuously decremented according to the count decrement speed. ;
升高目标处理器核的最高频率,包括:Increase the maximum frequency of the target processor core, including:
根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值均与升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value, and set the maximum frequency of the target processor core as the highest frequency after the increase. The third rate and the frequency adjustment count value are the same as the increase After the highest frequency negative correlation.
结合第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,根据升高 前频率、第三速率以及频率调整计数值获取升高后最高频率,包括:With reference to the third implementation of the second aspect, in the fourth implementation of the second aspect of the present disclosure, according to the The previous frequency, the third rate, and the frequency adjustment count value obtain the highest frequency after the increase, including:
根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为升高前频率,R为目标上限速率,C2为第三速率,T为频率调整计数阈值,Tc为频率调整计数值。According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), obtain the highest frequency Ft 2 after the increase, where Fc 2 is the frequency before the increase, and R is the target upper limit rate, C 2 is the third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
结合第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,其中,方法还包括:With reference to the third implementation manner of the second aspect, the present disclosure is in a fourth implementation manner of the second aspect, wherein the method further includes:
响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率。In response to the frequency adjustment count value being 0, the highest frequency of the target processor core is set as the highest frequency of the processor core.
第三方面,本公开实施例中提供了一种内处理器控制装置,处理器控制装置包括:In a third aspect, an embodiment of the present disclosure provides an internal processor control device, and the processor control device includes:
速率获取模块,被配置为获取处理器的至少一个处理器核产生分裂锁(splitlock)的速率以及至少一个处理器核对应的上限速率;A rate acquisition module configured to acquire the rate at which at least one processor core of the processor generates a split lock (splitlock) and the upper limit rate corresponding to at least one processor core;
频率控制模块,被配置为响应于至少一个处理器核中的目标处理器核产生splitlock的第一速率大于或等于目标处理器核对应的上限速率,降低目标处理器核的最高频率,和/或使目标处理器核触发对齐检查异常。A frequency control module configured to reduce the maximum frequency of the target processor core in response to the first rate at which the target processor core in the at least one processor core generates a splitlock greater than or equal to the upper limit rate corresponding to the target processor core, and/or Causes the target processor core to trigger an alignment check exception.
第四方面,本公开实施例中提供了一种电子设备,包括存储器和至少一个处理器;存储器用于存储一条或多条计算机指令,一条或多条计算机指令被至少一个处理器执行以实现第二方面、第二方面的第一种实现方式到第四种实现方式中任一项的方法步骤。In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including a memory and at least one processor; the memory is used to store one or more computer instructions, and one or more computer instructions are executed by at least one processor to implement the first The method steps of any one of the second aspect, the first implementation manner to the fourth implementation manner of the second aspect.
第五方面,本公开实施例中提供了一种计算机可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现第二方面、第二方面的第一种实现方式到第四种实现方式中任一项的方法步骤。In the fifth aspect, the embodiments of the present disclosure provide a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the second aspect and the first implementation manner to the second aspect of the second aspect are implemented. The method steps of any one of the four implementations.
第六方面,本公开实施例中提供了一种计算机程序产品,包括计算机指令,该计算机指令被处理器执行时实现如第二方面、第二方面的第一种实现方式到第四种实现方式中任一项的方法步骤。In the sixth aspect, the embodiments of the present disclosure provide a computer program product, including computer instructions. When the computer instructions are executed by a processor, the second aspect and the first implementation manner to the fourth implementation manner of the second aspect are implemented. Any one of the method steps.
本公开实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
根据本公开实施例提供的技术方案,处理器包括至少一个处理器核以及至少一个上限寄存器;其中,上限寄存器,用于储存上限速率,当目标上限寄存器对应的目标处理器核产生splitlock的第一速率大于或等于目标上限寄存器中的目标上限速率时,目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常,目标上限寄存器属于至少一个上限寄存器,目标处理器核属于至少一个处理器核。在使用过程中,当处理器中的目标处理器核产生splitlock时,考虑到处理器核产生splitlock的速率较低时,处理器核的性能并不会降低过多,因此可以以较快的速度读取位于处理器中的上限寄存器所储存的上限速率,基于该上限速率确定相应的处理器核产生splitlock的速率是否较高,从而在目标处理器核产生splitlock的第一速率大于或等于与该目标处理器核对应的目标上限寄存器中的目标上限速率(即目标处理器核产生splitlock的速率较高)时,使目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常。其中,由于处理器核的频率与该处理器核产生 splitlock的速率正相关,因此仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核的最高频率被降低,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,不影响目标处理器核的正常工作(即不降低目标处理器核的最高频率),而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,使目标处理器核的最高频率被降低,使产生splitlock的速率也随之降低,确保处理器核的性能不会因产生splitlock而降低过多,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响;另外,仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核触发对齐检查异常,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,目标处理器核不会触发对齐检查异常,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响,用户体验不会受到任何损害,而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,目标处理器核才触发对齐检查异常,确保处理器核的性能不会因产生splitlock而降低过多。因此上述方案在尽量不影响处理器上运行的用户应用程序正常执行的前提下,确保处理器核的性能不会因产生splitlock而降低过多,改善了用户体验According to the technical solution provided by the embodiments of the present disclosure, the processor includes at least one processor core and at least one upper limit register; wherein, the upper limit register is used to store the upper limit rate, when the target processor core corresponding to the target upper limit register generates the first splitlock When the rate is greater than or equal to the target upper limit rate in the target upper limit register, the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception, the target upper limit register belongs to at least one upper limit register, and the target processor core belongs to At least one processor core. During use, when the target processor core in the processor generates a splitlock, considering that the rate at which the processor core generates a splitlock is low, the performance of the processor core will not degrade too much, so it can be processed at a faster speed. Read the upper limit rate stored in the upper limit register located in the processor, determine whether the rate at which the corresponding processor core generates the splitlock is higher based on the upper limit rate, so that the first rate at which the target processor core generates the splitlock is greater than or equal to the rate of the splitlock When the target upper limit rate in the target upper limit register corresponding to the target processor core (that is, the rate at which the target processor core generates a splitlock is higher), the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check abnormal. Among them, due to the frequency of the processor core and the frequency generated by the processor core The rate of splitlock is positively correlated, so only when the first rate of splitlock generated by the target processor core is high, the maximum frequency of the target processor core is reduced, which can ensure that the rate of generating splitlock is low and will not make the target processor When the performance of the core is reduced too much, it will not affect the normal operation of the target processor core (that is, the maximum frequency of the target processor core will not be reduced), but when the rate of generating splitlock is high, the performance of the target processor core may be reduced too much , so that the highest frequency of the target processor core is reduced, so that the rate of splitlock generation is also reduced, to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock, so that the related applications running on the target processor core (For example, the application program that may cause the splitlock) can be executed normally, and the related application programs running on other processor cores will not be affected too much; When it is high, the target processor core will trigger an alignment check exception, which can ensure that the target processor core will not trigger an alignment check exception when the splitlock rate is low and the performance of the target processor core will not be reduced too much, so that the running in Related applications on the target processor core (for example, applications that may cause splitlock) can be executed normally, while related applications running on other processor cores will not be affected too much, and user experience will not be affected in any way. Damage, and when the rate of splitlock generation is high, which may reduce the performance of the target processor core too much, the target processor core will trigger an alignment check exception to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock. Therefore, on the premise of not affecting the normal execution of user applications running on the processor, the above solution ensures that the performance of the processor core will not be reduced too much due to the generation of splitlock, which improves the user experience.
根据本公开实施例提供的技术方案,处理器还包括频率控制逻辑电路,其中至少一个处理器核以及至少一个上限寄存器均与频率控制逻辑电路连接,频率控制逻辑电路用于获取至少一个处理器核的产生splitlock的速率,并从至少一个上限寄存器读取上限速率,响应于第一速率大于或等于目标上限速率,降低目标处理器核的最高频率。由于频率控制逻辑电路设置在处理器内,因此频率控制逻辑电路获取至少一个处理器核产生splitlock的速率以及从至少一个上限寄存器读取上限速率的耗时均较短,从而使频率控制逻辑电路响应于第一速率大于或等于目标上限速率,降低目标处理器核的最高频率这一过程的反应速度较快,降低了处理时延,提高了处理效率。According to the technical solution provided by the embodiments of the present disclosure, the processor further includes a frequency control logic circuit, wherein at least one processor core and at least one upper limit register are both connected to the frequency control logic circuit, and the frequency control logic circuit is used to obtain at least one processor core A splitlock rate is generated, and the upper limit rate is read from at least one upper limit register, and the maximum frequency of the target processor core is reduced in response to the first rate being greater than or equal to the target upper limit rate. Since the frequency control logic circuit is set in the processor, the time-consuming for the frequency control logic circuit to obtain the rate at which at least one processor core generates the splitlock and to read the upper limit rate from at least one upper limit register is relatively short, so that the frequency control logic circuit responds Because the first rate is greater than or equal to the target upper limit rate, the reaction speed of the process of reducing the maximum frequency of the target processor core is faster, which reduces the processing delay and improves the processing efficiency.
根据本公开实施例提供的技术方案,频率控制逻辑电路通过获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率,可以确保不断实时根据目标处理器核对应的目标上限速率、目标处理器核产生splitlock的实时速率即第一速率以及目标处理器核的实时频率获取目标处理器核降低后的最高频率即降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的速率即第二速率小于目标上限速率,确保目标处理器核的最高频率能够阶段性的稳定下降至满足要求的区间,避免因急剧下降而导致目标处理器核的性能产生较大波动。According to the technical solution provided by the embodiments of the present disclosure, the frequency control logic circuit acquires the reduced maximum frequency of the target processor core, and adjusts the maximum frequency of the target processor core to the reduced maximum frequency until the target processor core generates a splitlock The second rate is lower than the target upper limit rate, which can ensure that the target processor core is continuously reduced in real time according to the target processor core corresponding target upper limit rate, the real-time rate at which the target processor core generates splitlock, that is, the first rate, and the real-time frequency of the target processor core. The final highest frequency is the highest frequency after reduction, and the highest frequency of the target processor core is adjusted to the highest frequency after reduction until the rate at which the target processor core generates splitlock, that is, the second rate is less than the target upper limit rate, ensuring that the target processor core The highest frequency can be steadily decreased in stages to a range that meets the requirements, avoiding large fluctuations in the performance of the target processor core caused by a sharp decrease.
根据本公开实施例提供的技术方案,频率控制逻辑电路通过获取当前目标处理器核产生splitlock的第三速率,并响应于第三速率小于目标上限速率,升高目标处理器核的最高 频率,可以确保目标处理器核的最高频率在升高后,目标处理器核产生splitlock的速率能够逼近目标上限速率,确保在处理器核的性能不会因产生splitlock过快而降低过多的前提下,尽量提高目标处理器核的最高频率,改善目标处理器核的性能。According to the technical solution provided by the embodiments of the present disclosure, the frequency control logic circuit obtains the third rate of splitlock generated by the current target processor core, and increases the maximum rate of the target processor core in response to the third rate being less than the target upper limit rate. Frequency, which can ensure that after the highest frequency of the target processor core is increased, the rate at which the target processor core generates splitlock can approach the target upper limit rate, ensuring that the performance of the processor core will not be reduced too much due to the excessive generation of splitlock Under this condition, try to increase the highest frequency of the target processor core to improve the performance of the target processor core.
根据本公开实施例提供的技术方案,通过获取当前的频率调整计数值以及当前目标处理器核的升高前频率,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值均与升高后最高频率负相关。其中,考虑到当第三速率已处于较高的状态时,若获取的升高后最高频率较高,则可能导致在将目标处理器核的最高频率设置为升高后最高频率后,目标处理器核的频率过高,进而导致目标处理器核产生splitlock的速率较高,甚至目标处理器核产生splitlock的速率可能大于或等于目标上限速率,因此通过使第三速率与升高后最高频率负相关,可以避免在第三速率已处于较高的状态时升高后最高频率也较高;而频率调整计数值与控制目标处理器核的频率降低的时刻至当前时刻的时间长度成反比,该时间长度越长,频率调整计数值越小,而考虑到该时间长度越长,对目标处理器核执行正常应用程序的影响越大,因此通过使第三速率与频率调整计数值负相关,可以避免目标处理器核的频率长期处于过低的状态,使目标处理器核执行的正常应用程序不会受到过多影响。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the current frequency adjustment count value and the pre-increase frequency of the current target processor core, the highest frequency after the increase is obtained according to the pre-increase frequency, the third rate, and the frequency adjustment count value , and set the highest frequency of the target processor core as the highest frequency after the increase, and the third rate and the frequency adjustment count value are negatively correlated with the highest frequency after the increase. Among them, considering that when the third rate is already in a relatively high state, if the maximum frequency obtained after the increase is high, it may cause that after the maximum frequency of the target processor core is set to the maximum frequency after the increase, the target processing The frequency of the processor core is too high, which in turn causes the target processor core to generate a splitlock at a higher rate, and even the rate at which the target processor core generates a splitlock may be greater than or equal to the target upper limit rate. Therefore, by making the third rate and the increased maximum frequency negative Correlation, it can avoid that the highest frequency is also higher after the increase when the third rate is already in a higher state; and the frequency adjustment count value is inversely proportional to the time length from the moment when the frequency of the control target processor core is lowered to the current moment, the The longer the length of time, the smaller the frequency adjustment count value, and considering that the longer the length of time, the greater the impact on the execution of normal application programs by the target processor core, so by making the third rate negatively correlated with the frequency adjustment count value, it can be Prevent the frequency of the target processor core from being too low for a long time, so that the normal application programs executed by the target processor core will not be affected too much.
本公开实施例提供的技术方案,通过Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率,可以较为方便的获取升高后最高频率,提高获取升高后最高频率的效率。In the technical solution provided by the embodiments of the present disclosure, by obtaining the highest frequency after the rise by Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), it is more convenient to obtain the rise The highest frequency after high, improve the efficiency of obtaining the highest frequency after boost.
根据本公开实施例提供的技术方案,处理器还包括用于储存频率调整计数阈值的频率调整计数阈值寄存器以及用于储存频率调整计数值的频率调整计数值寄存器,频率调整计数阈值寄存器以及频率调整计数值寄存器均与频率控制逻辑电路连接,其中由于频率调整计数阈值寄存器以及频率调整计数值寄存器均位于处理器中,因此处理器中的频率控制逻辑电路在从频率调整计数阈值寄存器读取频率调整计数阈值,以及根据计数递减速度对频率调整计数值寄存器中的频率调整计数阈值进行持续递减时,时延较短,从而提高了频率控制逻辑电路的处理效率。According to the technical solution provided by the embodiments of the present disclosure, the processor further includes a frequency adjustment count threshold register for storing the frequency adjustment count threshold, a frequency adjustment count value register for storing the frequency adjustment count value, a frequency adjustment count threshold register, and a frequency adjustment count threshold register. The count value registers are all connected with the frequency control logic circuit, wherein since the frequency adjustment count threshold register and the frequency adjustment count value register are all located in the processor, the frequency control logic circuit in the processor reads the frequency adjustment from the frequency adjustment count threshold register. When the counting threshold and the frequency adjustment counting threshold in the frequency adjustment count value register are continuously decremented according to the counting decrement speed, the time delay is short, thereby improving the processing efficiency of the frequency control logic circuit.
根据本公开实施例提供的技术方案,频率调整计数值为0时,说明从控制所述目标处理器核的频率降低的时刻到当前时刻的时间长度,已经达到允许对目标处理器核的最高频率进行限制的最长时间长度,若继续对目标处理器核的最高频率进行限制,则可能对目标处理器核的正常应用程序执行产生影响,因此频率控制逻辑电路通过响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率,即不再对目标处理器核的最高频率进行任何限制,可以确保目标处理器核的正常应用程序执行不会受到任何影响。According to the technical solution provided by the embodiments of the present disclosure, when the frequency adjustment count value is 0, it indicates that the maximum frequency allowed for the target processor core has been reached in the time period from the moment when the frequency of the target processor core is reduced to the current moment. The maximum length of time for limitation. If the maximum frequency of the target processor core continues to be limited, it may affect the normal application program execution of the target processor core. Therefore, the frequency control logic circuit adjusts the count value to 0 by responding to the frequency , set the maximum frequency of the target processor core to the maximum frequency of the processor core, that is, no longer impose any restrictions on the maximum frequency of the target processor core, which can ensure that the normal application execution of the target processor core will not be affected in any way.
根据本公开实施例提供的技术方案,通过获取处理器的至少一个处理器核产生splitlock的速率以及至少一个处理器核对应的上限速率,考虑到处理器核产生splitlock的速率较低时,处理器核的性能并不会降低过多,因此可以基于上限速率确定相应的处理器核产生splitlock的速率是否较高,从而在目标处理器核产生splitlock的第一速率大于或等 于与该目标处理器核对应的的目标上限速率(即目标处理器核产生splitlock的速率较高)时,使目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常。其中,由于处理器核的频率与该处理器核产生splitlock的速率正相关,因此仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核的最高频率被降低,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,不影响目标处理器核的正常工作(即不降低目标处理器核的最高频率),而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,使目标处理器核的最高频率被降低,使产生splitlock的速率也随之降低,确保处理器核的性能不会因产生splitlock而降低过多,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响;另外,仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核触发对齐检查异常,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,目标处理器核不会触发对齐检查异常,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响,用户体验不会受到任何损害,而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,目标处理器核才触发对齐检查异常,确保处理器核的性能不会因产生splitlock而降低过多。因此上述方案在尽量不影响处理器上运行的用户应用程序正常执行的前提下,确保处理器核的性能不会因产生splitlock而降低过多,改善了用户体验。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the rate at which at least one processor core generates a splitlock and the upper limit rate corresponding to at least one processor core, considering that the rate at which the processor core generates a splitlock is low, the processor The performance of the core will not be reduced too much, so it can be determined based on the upper limit rate whether the rate at which the corresponding processor core generates a splitlock is higher, so that the first rate at which the target processor core generates a splitlock is greater than or equal to When the target upper limit rate corresponding to the target processor core (that is, the rate at which the target processor core generates splitlock is higher), the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception . Wherein, since the frequency of the processor core is positively correlated with the rate at which the processor core produces the splitlock, only when the first rate at which the target processor core produces the splitlock is relatively high, the highest frequency of the target processor core is reduced to ensure When the rate at which the splitlock is generated is low and the performance of the target processor core will not be reduced too much, it will not affect the normal operation of the target processor core (that is, the highest frequency of the target processor core will not be reduced), and the rate at which the splitlock will be generated is relatively high. High, when the performance of the target processor core may be reduced too much, the maximum frequency of the target processor core will be reduced, and the rate of splitlock generation will also be reduced to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock Many, so that related applications running on the target processor core (such as applications that may cause splitlock) can be executed normally, and related applications running on other processor cores will not be affected too much; in addition , only when the first rate of splitlock generated by the target processor core is high, the target processor core triggers an alignment check exception, which can ensure that when the rate of splitlock generated is low and the performance of the target processor core will not be reduced too much, The target processor core will not trigger an alignment check exception, so that related applications running on the target processor core (such as applications that may cause splitlocks) can be executed normally, while related applications running on other processor cores It will not be affected too much, and the user experience will not be damaged in any way. When the rate of splitlock generation is high, which may reduce the performance of the target processor core too much, the target processor core will trigger an alignment check exception to ensure processing The performance of the core will not be degraded too much due to the splitlock. Therefore, the above solution ensures that the performance of the processor core will not be degraded too much due to the generation of the splitlock without affecting the normal execution of the user application program running on the processor as much as possible, thereby improving the user experience.
根据本公开实施例提供的技术方案,通过获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率,可以确保不断实时根据目标处理器核对应的目标上限速率、目标处理器核产生splitlock的实时速率即第一速率以及目标处理器核的实时频率获取目标处理器核降低后的最高频率即降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的速率即第二速率小于目标上限速率,确保目标处理器核的最高频率能够阶段性的稳定下降至满足要求的区间,避免因急剧下降而导致目标处理器核的性能产生较大波动。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the reduced maximum frequency of the target processor core, and adjusting the maximum frequency of the target processor core to the reduced maximum frequency, until the second rate at which the target processor core generates a splitlock is less than The target upper limit rate can ensure continuous real-time acquisition of the highest frequency of the target processor core after reduction according to the target upper limit rate corresponding to the target processor core, the real-time rate at which the target processor core generates splitlock (the first rate), and the real-time frequency of the target processor core That is, the highest frequency after the reduction, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the rate at which the target processor core generates splitlock, that is, the second rate is less than the target upper limit rate, to ensure that the highest frequency of the target processor core can reach the stage The stability drops to a range that meets the requirements, and avoids large fluctuations in the performance of the target processor core caused by a sharp drop.
根据本公开实施例提供的技术方案,通过获取当前目标处理器核产生splitlock的第三速率,并响应于第三速率小于目标上限速率,升高目标处理器核的最高频率,可以确保目标处理器核的最高频率在升高后,目标处理器核产生splitlock的速率能够逼近目标上限速率,确保在处理器核的性能不会因产生splitlock而降低过多的前提下,尽量提高目标处理器核的最高频率,改善目标处理器核的性能。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the third rate at which the current target processor core generates a splitlock, and in response to the fact that the third rate is less than the target upper limit rate, increasing the maximum frequency of the target processor core can ensure that the target processor core After the maximum frequency of the core is increased, the rate at which the target processor core generates splitlocks can approach the target upper limit rate, ensuring that the performance of the processor core will not be reduced too much due to the generation of splitlocks. Maximum frequency to improve the performance of the target processor core.
根据本公开实施例提供的技术方案,通过获取当前的频率调整计数值以及当前目标处理器核的升高前频率,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值 均与升高后最高频率负相关。其中,考虑到当第三速率已处于较高的状态时,若获取的升高后最高频率较高,则可能导致在将目标处理器核的最高频率设置为升高后最高频率后,目标处理器核的频率过高,进而导致目标处理器核产生splitlock的速率较高,甚至目标处理器核产生splitlock的速率可能大于或等于目标上限速率,因此通过使第三速率与升高后最高频率负相关,可以避免在第一速率已处于较高的状态时升高后最高频率也较高;而频率调整计数值与控制目标处理器核的频率降低的时刻至当前时刻的时间长度成反比,该时间长度越长,频率调整计数值越小,而考虑到该时间长度越长,对目标处理器核执行正常应用程序的影响越大,因此通过使升高后最高频率与频率调整计数值负相关,可以避免目标处理器核的频率长期处于过低的状态,使目标处理器核执行的正常应用程序不会受到过多影响。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the current frequency adjustment count value and the pre-increase frequency of the current target processor core, the highest frequency after the increase is obtained according to the pre-increase frequency, the third rate, and the frequency adjustment count value , and set the maximum frequency of the target processor core to the maximum frequency after the boost, the third rate and the frequency adjustment count value Both were negatively correlated with the highest frequency after elevation. Among them, considering that when the third rate is already in a relatively high state, if the maximum frequency obtained after the increase is high, it may cause that after the maximum frequency of the target processor core is set to the maximum frequency after the increase, the target processing The frequency of the processor core is too high, which in turn causes the target processor core to generate a splitlock at a higher rate, and even the rate at which the target processor core generates a splitlock may be greater than or equal to the target upper limit rate. Therefore, by making the third rate and the increased maximum frequency negative Correlation, it can avoid that the highest frequency is also higher after the increase when the first rate is already in a higher state; and the frequency adjustment count value is inversely proportional to the time length from the moment when the frequency of the control target processor core is lowered to the current moment, the The longer the time length is, the smaller the frequency adjustment count value is, and considering that the longer the time length is, the greater the impact on the normal application program execution of the target processor core is, so by making the highest frequency after the increase negatively correlated with the frequency adjustment count value , can prevent the frequency of the target processor core from being too low for a long time, so that the normal application programs executed by the target processor core will not be too much affected.
本公开实施例提供的技术方案,通过Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率,可以较为方便的获取升高后最高频率,提高获取升高后最高频率的效率。In the technical solution provided by the embodiments of the present disclosure, by obtaining the highest frequency after the rise by Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), it is more convenient to obtain the rise The highest frequency after high, improve the efficiency of obtaining the highest frequency after boost.
根据本公开实施例提供的技术方案,频率调整计数值为0时,说明从控制所述目标处理器核的频率降低的时刻到当前时刻的时间长度,已经达到允许对目标处理器核的最高频率进行限制的最长时间长度,若继续对目标处理器核的最高频率进行限制,则可能对目标处理器核的正常应用程序执行产生影响,因此通过响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率,即不再对目标处理器核的最高频率进行任何限制,可以确保目标处理器核的正常应用程序执行不会受到任何影响。According to the technical solution provided by the embodiments of the present disclosure, when the frequency adjustment count value is 0, it indicates that the maximum frequency allowed for the target processor core has been reached in the time period from the moment when the frequency of the target processor core is reduced to the current moment. The maximum length of time for limitation. If the maximum frequency of the target processor core continues to be limited, it may affect the normal application execution of the target processor core. Therefore, by adjusting the count value to 0 in response to the frequency, the target processing The highest frequency of the processor core is set to the highest frequency of the processor core, that is, there is no longer any restriction on the highest frequency of the target processor core, which can ensure that the normal application execution of the target processor core will not be affected in any way.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
结合附图,通过以下非限制性实施方式的详细描述,本公开的其它特征、目的和优点将变得更加明显。在附图中:Other features, objects and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the attached picture:
图1示出根据本公开一实施方式的处理器的示意性结构框图。Fig. 1 shows a schematic structural block diagram of a processor according to an embodiment of the present disclosure.
图2示出根据本公开一实施方式的处理器的示意性结构框图。Fig. 2 shows a schematic structural block diagram of a processor according to an embodiment of the present disclosure.
图3示出根据本公开一实施方式的处理器的示意性结构框图。Fig. 3 shows a schematic structural block diagram of a processor according to an embodiment of the present disclosure.
图4示出根据本公开一实施方式的处理器控制方法的流程图。FIG. 4 shows a flowchart of a processor control method according to an embodiment of the present disclosure.
图5示出根据本公开一实施方式的处理器控制装置的结构框图。Fig. 5 shows a structural block diagram of a processor control device according to an embodiment of the present disclosure.
图6示出根据本公开一实施方式的电子设备的结构框图。Fig. 6 shows a structural block diagram of an electronic device according to an embodiment of the present disclosure.
图7是适于用来实现根据本公开一实施方式的方法的计算机系统的结构示意图。FIG. 7 is a schematic structural diagram of a computer system suitable for implementing a method according to an embodiment of the present disclosure.
具体实施方式 Detailed ways
下文中,将参考附图详细描述本公开的示例性实施方式,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施方式无关的部分。Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for clarity, parts not related to describing the exemplary embodiments are omitted in the drawings.
在本公开中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的标签、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他标签、数字、步骤、行为、部件、部分或其组合存在或被添加的可能性。In the present disclosure, it should be understood that terms such as "comprising" or "having" are intended to indicate the existence of labels, numbers, steps, acts, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude one or multiple other labels, numbers, steps, acts, parts, parts or combinations thereof exist or are added to the possibility.
另外还需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的标签可以相互组合。下面将参考附图并结合实施例来详细说明本公开。In addition, it should be noted that, in the case of no conflict, the embodiments in the present disclosure and the labels in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.
为了在处理器上运行有可能产生splitlock的应用程序时,在处理器的性能不会因产生splitlock而受到过多影响的前提下,保护处理器上运行的其他应用程序,使其他应用程序能够正常运行,本公开发明人考虑了如下方案。In order to protect other applications running on the processor on the premise that the performance of the processor will not be too much affected by the splitlock when running an application that may generate a splitlock, so that other applications can work normally In operation, the inventors of the present disclosure considered the following solutions.
相关技术中,可以通过使运行在处理器上的应用程序以及应用程序的编译器尽量避免分配跨cacheline的变量地址,以减少splitlock的产生次数,达到降低总线锁定的几率的目的。In related technologies, the application program running on the processor and the compiler of the application program can avoid allocating variable addresses across cachelines as much as possible, so as to reduce the number of splitlock generation and reduce the probability of bus locking.
此方案的缺点:上述方案中,虽然可以降低总线锁定的几率,但是,在应用程序无法受控的场景中,例如云计算场景中,云计算服务商无法对运行在处理器上的应用程序进行控制,因此如何在处理器上运行有可能产生splitlock的应用程序时,在处理器的性能不会因产生splitlock而受到过多影响的前提下,保护处理器上运行的其他应用程序,使其他应用程序能够正常运行,是相关技术中亟待解决的问题。Disadvantages of this solution: In the above-mentioned solution, although the probability of bus locking can be reduced, in scenarios where applications cannot be controlled, such as cloud computing scenarios, cloud computing service providers cannot monitor applications running on processors. Therefore, when an application program that may generate a splitlock is running on the processor, on the premise that the performance of the processor will not be too much affected by the generation of the splitlock, protect other applications running on the processor, so that other applications It is an urgent problem to be solved in related technologies that the program can run normally.
考虑以上方案的缺点,本公开发明人提出了新的方案:该方案中的处理器包括至少一个处理器核以及至少一个上限寄存器;其中,上限寄存器,用于储存上限速率,当目标上限寄存器对应的目标处理器核产生splitlock的第一速率大于或等于目标上限寄存器中的目标上限速率时,目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常,目标上限寄存器属于至少一个上限寄存器,目标处理器核属于至少一个处理器核。在使用过程中,当处理器中的目标处理器核产生splitlock时,考虑到处理器核产生splitlock的速率较低时,处理器核的性能并不会降低过多,因此可以以较快的速度读取位于处理器中的上限寄存器所储存的上限速率,基于该上限速率确定相应的处理器核产生splitlock的速率是否较高,从而在目标处理器核产生splitlock的第一速率第一速率大于或等于与该目标处理器核对应的目标上限寄存器中的目标上限速率(即目标处理器核产生splitlock的速率较高)时,使目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常。其中,由于处理器核的频率与该处理器核产生splitlock的速率正相关,因此仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核的最高频率被降低,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,不影响目标处理器核的正常工作(即不降低目标处理器核的最高频率),而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,使目标处理器核的最高频率被降低,使产生splitlock的速 率也随之降低,确保处理器核的性能不会因产生splitlock而降低过多;另外,仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核触发对齐检查异常,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,目标处理器核不会触发对齐检查异常,使用户的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,用户体验不会受到任何损害,而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,目标处理器核才触发对齐检查异常,确保处理器核的性能不会因产生splitlock而降低过多。因此上述方案在尽量不影响处理器上运行的用户应用程序正常执行的前提下,确保处理器核的性能不会因产生splitlock而降低过多,改善了用户体验Considering the shortcomings of the above schemes, the inventors of the present disclosure have proposed a new scheme: the processor in this scheme includes at least one processor core and at least one upper limit register; wherein, the upper limit register is used to store the upper limit rate, when the target upper limit register corresponds to When the first rate at which the target processor core generates a splitlock is greater than or equal to the target upper limit rate in the target upper limit register, the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception, and the target upper limit register belongs to At least one upper limit register, the target processor core belongs to at least one processor core. During use, when the target processor core in the processor generates a splitlock, considering that the rate at which the processor core generates a splitlock is low, the performance of the processor core will not degrade too much, so it can be processed at a faster speed. Read the upper limit rate stored in the upper limit register in the processor, determine whether the rate at which the corresponding processor core generates the splitlock is higher based on the upper limit rate, thereby generating the first rate at the target processor core at the first rate of the splitlock greater than or When it is equal to the target upper limit rate in the target upper limit register corresponding to the target processor core (that is, the rate at which the target processor core generates splitlock is higher), the maximum frequency of the target processor core is reduced, and/or the target processor core Trigger an alignment check exception. Wherein, since the frequency of the processor core is positively correlated with the rate at which the processor core produces the splitlock, only when the first rate at which the target processor core produces the splitlock is relatively high, the highest frequency of the target processor core is reduced to ensure When the rate at which the splitlock is generated is low and the performance of the target processor core will not be reduced too much, it will not affect the normal operation of the target processor core (that is, the highest frequency of the target processor core will not be reduced), and the rate at which the splitlock will be generated is relatively high. High, may reduce the performance of the target processor core too much, so that the maximum frequency of the target processor core is reduced, so that the speed of splitlock The rate is also reduced accordingly to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock; in addition, only when the first rate of splitlock generation by the target processor core is high, the target processor core will trigger an alignment check exception, It can ensure that when the rate of splitlock is low and the performance of the target processor core will not be reduced too much, the target processor core will not trigger an alignment check exception, so that the user's related applications (such as applications that may cause splitlock) It can be executed normally, and the user experience will not be damaged in any way. When the rate of splitlock generation is high, which may reduce the performance of the target processor core too much, the target processor core will trigger an alignment check exception to ensure the processor core. Performance will not be degraded too much due to splitlock. Therefore, on the premise of not affecting the normal execution of user applications running on the processor, the above solution ensures that the performance of the processor core will not be reduced too much due to the generation of splitlock, which improves the user experience.
为了解决上述问题,本公开提出处理器、控制方法、设备及介质。In order to solve the above problems, the present disclosure proposes a processor, a control method, a device, and a medium.
图1示出根据本公开一实施方式的处理器的示意性结构框图,如图1所示,处理器100包括至少一个处理器核101以及至少一个上限寄存器102。FIG. 1 shows a schematic structural block diagram of a processor according to an embodiment of the present disclosure. As shown in FIG. 1 , the processor 100 includes at least one processor core 101 and at least one upper limit register 102 .
其中,上限寄存器102,用于储存上限速率,当目标上限寄存器对应的目标处理器核产生分裂锁(splitlock)的第一速率大于或等于所述目标上限寄存器中的目标上限速率时,所述目标处理器核的最高频率被降低,和/或所述目标处理器核触发对齐检查异常,目标上限寄存器属于至少一个上限寄存器102,目标处理器核属于至少一个处理器核101。Wherein, the upper limit register 102 is used to store the upper limit rate. When the first rate at which the target processor core corresponding to the target upper limit register generates a split lock (splitlock) is greater than or equal to the target upper limit rate in the target upper limit register, the target The highest frequency of the processor core is reduced, and/or the target processor core triggers an alignment check exception, the target upper limit register belongs to at least one upper limit register 102 , and the target processor core belongs to at least one processor core 101 .
在本公开的一个实施例中,处理器可以包括一个或多个处理器核(Core),每个处理器核都可以配置有高速缓存(Cach),高速缓存是位于处理器执行单元和主存储器(DynamicRandom Access Memory,DRAM)之间的存储器,通常是由静态存储器(Static RAM,SRAM)构成,规模较小但存取速度很快。高速缓存可以用于保存内存中部分数据的副本,当处理器读写数据时,首先访问高速缓存,当高速缓存中不存在所需数据时,再访问内存。高速缓存通常分成多个组,其中每个组分成多个高速缓存数据线(cacheline),当从内存中取单元到高速缓存中时,会一次取一个高速缓存数据线大小的内存区域到高速缓存中,然后存进相应的高速缓存数据线中。In one embodiment of the present disclosure, the processor may include one or more processor cores (Core), and each processor core may be configured with a cache (Cach), and the cache is located in the processor execution unit and the main memory (Dynamic Random Access Memory, DRAM) is usually composed of static memory (Static RAM, SRAM), which is small in scale but fast in access speed. The cache can be used to save a copy of some data in the memory. When the processor reads and writes data, it first accesses the cache, and when the required data does not exist in the cache, it accesses the memory again. The cache is usually divided into multiple groups, and each group is divided into multiple cache lines (cacheline). When fetching a unit from the memory into the cache, a memory area of the size of a cache line is taken to the cache at a time. , and then stored in the corresponding cache data line.
在本公开的一个实施例中,处理器核产生splitlock可以理解为,该处理器核产生了跨越两个高速缓存数据线(cache lines)的数据读取,为了保证数据读取的原子性,需要锁定该处理器的整个总线,这种状况可以理解为该处理器核产生了splitlock。其中,数据读取的原子性可以被理解为,数据读取不可被中断。顺序不可以被打乱,也不可以被切割掉部分数据读取或只执行部分数据读取。In one embodiment of the present disclosure, the generation of splitlock by the processor core can be understood as that the processor core generates data read across two cache data lines (cache lines). In order to ensure the atomicity of data read, it is necessary Lock the entire bus of the processor. This situation can be understood as a splitlock generated by the processor core. Among them, the atomicity of data reading can be understood as that data reading cannot be interrupted. The sequence cannot be shuffled, and part of the data read cannot be cut off or only part of the data read can be performed.
在本公开的一个实施例中,上限速率可以理解为,用于指示允许对应的处理器核在单位时间内产生splitlock的次数的上限,示例性的,上限速率的单位可以为次/秒。若对应的处理器核在单位时间内产生splitlock的次数大于或等于该上限速率,则该对应的处理器核的性能可能会下降较多。In one embodiment of the present disclosure, the upper limit rate can be understood as an upper limit for indicating the number of times a corresponding processor core is allowed to generate a splitlock within a unit time. Exemplarily, the unit of the upper limit rate may be times/second. If the number of splitlocks generated by the corresponding processor core per unit time is greater than or equal to the upper limit rate, the performance of the corresponding processor core may be greatly degraded.
在本公开的一个实施例中,上限速率可以为事先储存在上限寄存器中,也可以为由处 理器自身基于处理器的历史日志根据相应的算法或模型计算得到,并写入上限寄存器中,也可以为由其他装置或系统写入上限寄存器中。In an embodiment of the present disclosure, the upper limit rate can be stored in the upper limit register in advance, or it can be The processor itself is calculated based on the historical log of the processor according to a corresponding algorithm or model, and written into the upper limit register, or written into the upper limit register by other devices or systems.
在本公开的一个实施例中,第一速率,可以为通过对目标处理器核进行实时检测,以确定目标处理器核是否产生splitlock,并根据检测结果获取该第一速率,其中,对目标处理器核进行实时检测,可以为以预设检测时间阈值为间隔,周期性的对目标处理器核进行实时检测,该预设检测时间阈值可以为1ms。示例性的,可以以1ms为间隔,周期性的通过处理器中的电源管理单元(Power Management Unit)获取用于指示对应处理器核是否产生splitlock的指示信息,根据该指示信息确定对应处理器核是否产生splitlock,并进一步获取对应处理器核产生splitlock的速率。In an embodiment of the present disclosure, the first rate may be to determine whether the target processor core generates a splitlock by performing real-time detection on the target processor core, and obtain the first rate according to the detection result, wherein the target processor core The real-time detection of the processor core may be to periodically perform real-time detection on the target processor core at intervals of a preset detection time threshold, and the preset detection time threshold may be 1 ms. Exemplarily, at an interval of 1 ms, the instruction information used to indicate whether the corresponding processor core generates a splitlock is periodically obtained through the power management unit (Power Management Unit) in the processor, and the corresponding processor core is determined according to the instruction information Whether to generate a splitlock, and further obtain the rate at which the corresponding processor core generates a splitlock.
在本公开的一个实施例中,目标处理器核的最高频率被降低可以理解为,将目标处理器核的最高频率设置为预设频率;或者,也可以为预先对产生splitlock的不同速率进行速率等级设置,并设置速率等级与最高频率的对应关系,在降低目标处理器核的最高频率之前确定第一速率对应的目标速率等级,获取该目标速率等级对应的最高频率,并将目标处理器核的最高频率设置该目标速率等级对应的最高频率。In one embodiment of the present disclosure, the reduction of the highest frequency of the target processor core can be understood as setting the highest frequency of the target processor core to a preset frequency; Level setting, and set the corresponding relationship between the speed level and the highest frequency, determine the target speed level corresponding to the first speed before reducing the highest frequency of the target processor core, obtain the highest frequency corresponding to the target speed level, and set the target processor core The highest frequency of set the highest frequency corresponding to the target rate level.
根据本公开实施例提供的技术方案,处理器包括至少一个处理器核以及至少一个上限寄存器;其中,上限寄存器,用于储存上限速率,当目标上限寄存器对应的目标处理器核产生splitlock的第一速率大于或等于目标上限寄存器中的目标上限速率时,目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常,目标上限寄存器属于至少一个上限寄存器,目标处理器核属于至少一个处理器核。在使用过程中,当处理器中的目标处理器核产生splitlock时,考虑到处理器核产生splitlock的速率较低时,处理器核的性能并不会降低过多,因此可以以较快的速度读取位于处理器中的上限寄存器所储存的上限速率,基于该上限速率确定相应的处理器核产生splitlock的速率是否较高,从而在目标处理器核产生splitlock的第一速率大于或等于与该目标处理器核对应的目标上限寄存器中的目标上限速率(即目标处理器核产生splitlock的速率较高)时,使目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常。其中,由于处理器核的频率与该处理器核产生splitlock的速率正相关,因此仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核的最高频率被降低,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,不影响目标处理器核的正常工作(即不降低目标处理器核的最高频率),而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,使目标处理器核的最高频率被降低,使产生splitlock的速率也随之降低,确保处理器核的性能不会因产生splitlock而降低过多,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响;另外,仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核触发对齐检查异常,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能 降低过多时,目标处理器核不会触发对齐检查异常,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响,用户体验不会受到任何损害,而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,目标处理器核才触发对齐检查异常,确保处理器核的性能不会因产生splitlock而降低过多。因此上述方案在尽量不影响处理器上运行的用户应用程序正常执行的前提下,确保处理器核的性能不会因产生splitlock而降低过多,改善了用户体验According to the technical solution provided by the embodiments of the present disclosure, the processor includes at least one processor core and at least one upper limit register; wherein, the upper limit register is used to store the upper limit rate, when the target processor core corresponding to the target upper limit register generates the first splitlock When the rate is greater than or equal to the target upper limit rate in the target upper limit register, the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception, the target upper limit register belongs to at least one upper limit register, and the target processor core belongs to At least one processor core. During use, when the target processor core in the processor generates a splitlock, considering that the rate at which the processor core generates a splitlock is low, the performance of the processor core will not degrade too much, so it can be processed at a faster speed. Read the upper limit rate stored in the upper limit register located in the processor, determine whether the rate at which the corresponding processor core generates the splitlock is higher based on the upper limit rate, so that the first rate at which the target processor core generates the splitlock is greater than or equal to the rate of the splitlock When the target upper limit rate in the target upper limit register corresponding to the target processor core (that is, the rate at which the target processor core generates a splitlock is higher), the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check abnormal. Wherein, since the frequency of the processor core is positively correlated with the rate at which the processor core produces the splitlock, only when the first rate at which the target processor core produces the splitlock is relatively high, the highest frequency of the target processor core is reduced to ensure When the rate at which the splitlock is generated is low and the performance of the target processor core will not be reduced too much, it will not affect the normal operation of the target processor core (that is, the highest frequency of the target processor core will not be reduced), and the rate at which the splitlock will be generated is relatively high. High, when the performance of the target processor core may be reduced too much, the maximum frequency of the target processor core will be reduced, and the rate of splitlock generation will also be reduced to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock Many, so that related applications running on the target processor core (such as applications that may cause splitlock) can be executed normally, and related applications running on other processor cores will not be affected too much; in addition , only when the first rate of splitlock generated by the target processor core is high, the target processor core triggers an alignment check exception, which can ensure that the performance of the target processor core will not be reduced when the rate of splitlock generated is low. When the reduction is too high, the target processor core will not trigger an alignment check exception, so that related applications running on the target processor core (such as applications that may cause splitlock) can be executed normally, while running on other processor cores The related applications will not be affected too much, and the user experience will not be damaged in any way. When the rate of splitlock generation is high, which may reduce the performance of the target processor core too much, the target processor core triggers the alignment check. Exception, to ensure that the performance of the processor core will not be degraded too much due to splitlock. Therefore, on the premise of not affecting the normal execution of user applications running on the processor, the above solution ensures that the performance of the processor core will not be reduced too much due to the generation of splitlock, which improves the user experience.
在本公开的一个实施例中,图2示出根据本公开一实施方式的处理器的示意性结构框图,如图2所示,处理器100还包括频率控制逻辑电路103,至少一个处理器核101以及至少一个上限寄存器102均与频率控制逻辑电路103连接。In an embodiment of the present disclosure, FIG. 2 shows a schematic structural block diagram of a processor according to an embodiment of the present disclosure. As shown in FIG. 2 , the processor 100 further includes a frequency control logic circuit 103, at least one processor core 101 and at least one upper limit register 102 are both connected to a frequency control logic circuit 103 .
频率控制逻辑电路103,用于获取至少一个处理器核产生splitlock的速率,并从至少一个上限寄存器读取上限速率,响应于第一速率大于或等于目标上限速率,降低目标处理器核的最高频率。A frequency control logic circuit 103, configured to obtain the rate at which at least one processor core generates splitlock, and read the upper limit rate from at least one upper limit register, and reduce the maximum frequency of the target processor core in response to the first rate being greater than or equal to the target upper limit rate .
在本公开的一个实施例中,频率控制逻辑电路可以理解为,位于处理器中并具备逻辑运算功能的电路。通过与至少一个处理器核连接,频率控制逻辑电路可以与对应的处理器核进行信息交互,例如获取对应处理器核的产生splitlock的速率,以及向目标处理器核发送最高频率控制信息,使目标处理器核响应于该最高频率控制信息降低自身的最高频率。而通过与至少一个上限寄存器连接,频率控制逻辑电路可以从对应的上限寄存器中读取该上限寄存器储存的上限速率。In one embodiment of the present disclosure, the frequency control logic circuit can be understood as a circuit located in a processor and having a logic operation function. By connecting with at least one processor core, the frequency control logic circuit can perform information interaction with the corresponding processor core, for example, obtain the splitlock generation rate of the corresponding processor core, and send the highest frequency control information to the target processor core, so that the target The processor core lowers its own maximum frequency in response to the maximum frequency control information. And by connecting with at least one upper limit register, the frequency control logic circuit can read the upper limit rate stored in the upper limit register from the corresponding upper limit register.
根据本公开实施例提供的技术方案,处理器还包括频率控制逻辑电路,其中至少一个处理器核以及至少一个上限寄存器均与频率控制逻辑电路连接,频率控制逻辑电路用于获取至少一个处理器核的产生splitlock的速率,并从至少一个上限寄存器读取上限速率,响应于第一速率大于或等于目标上限速率,降低目标处理器核的最高频率。由于频率控制逻辑电路设置在处理器内,因此频率控制逻辑电路获取至少一个处理器核产生splitlock的速率以及从至少一个上限寄存器读取上限速率的耗时均较短,从而使频率控制逻辑电路响应于第一速率大于或等于目标上限速率,降低目标处理器核的最高频率这一过程的反应速度较快,降低了处理时延,提高了处理效率。According to the technical solution provided by the embodiments of the present disclosure, the processor further includes a frequency control logic circuit, wherein at least one processor core and at least one upper limit register are both connected to the frequency control logic circuit, and the frequency control logic circuit is used to obtain at least one processor core A splitlock rate is generated, and the upper limit rate is read from at least one upper limit register, and the maximum frequency of the target processor core is reduced in response to the first rate being greater than or equal to the target upper limit rate. Since the frequency control logic circuit is set in the processor, the time-consuming for the frequency control logic circuit to obtain the rate at which at least one processor core generates the splitlock and to read the upper limit rate from at least one upper limit register is relatively short, so that the frequency control logic circuit responds Because the first rate is greater than or equal to the target upper limit rate, the reaction speed of the process of reducing the maximum frequency of the target processor core is faster, which reduces the processing delay and improves the processing efficiency.
在本公开的一个实施例中,降低目标处理器核的最高频率,包括:In one embodiment of the present disclosure, reducing the maximum frequency of the target processor core includes:
获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率;Obtain the highest frequency after the reduction of the target processor core, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the second rate at which the target processor core generates splitlock is less than the target upper limit rate;
其中,降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为降低后最高频率,Fc1为目标处理器核的降低前频率,R为目标上限速率,C1为第一速率。Among them, the highest frequency after reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , Ft 1 is the highest frequency after reduction, Fc 1 is the frequency before reduction of the target processor core, R is the target upper limit rate, and C 1 is the first a rate.
在本公开的一个实施例中,目标处理器核的降低前频率,可以理解为在降低目标处理器核的最高频率之前一时刻,目标处理器核的频率。目标处理器核的降低前频率,可以由 频率控制逻辑电路从目标处理器核获取,也可以为由频率控制逻辑电路从其他装置或系统处获取。In an embodiment of the present disclosure, the frequency of the target processor core before reduction may be understood as the frequency of the target processor core at a moment before the highest frequency of the target processor core is reduced. The pre-reduced frequency of the target processor core can be determined by The frequency control logic circuit is obtained from the target processor core, or the frequency control logic circuit may be obtained from other devices or systems.
在本公开的一个实施例中,获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率,可以理解以预设频率降低时间阈值为间隔,周期性的实时获取目标处理器核的第一速率以及目标处理器核的频率即降低前频率,并根据从目标上限寄存器中读取的目标上限速率、实时获取的第一速率以及实时获取的降低前频率进行计算,以获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率。其中,在将目标处理器核的最高频率调整为降低后最高频率后,若目标处理器核产生splitlock的速率小于目标上限速率时,则停止获取目标处理器核的降低后最高频率。In one embodiment of the present disclosure, the reduced maximum frequency of the target processor core is obtained, and the maximum frequency of the target processor core is adjusted to the reduced maximum frequency until the second rate at which the target processor core generates splitlocks is less than the target upper limit Rate, it can be understood that the preset frequency is lowered by the time threshold as an interval, and the first rate of the target processor core and the frequency of the target processor core are obtained periodically in real time, that is, the frequency before the reduction, and according to the target read from the target upper limit register The upper limit rate, the first rate of real-time acquisition, and the frequency before reduction of real-time acquisition are calculated to obtain the highest frequency of the target processor core after reduction, and the highest frequency of the target processor core is adjusted to the highest frequency after reduction. Wherein, after adjusting the maximum frequency of the target processor core to the reduced maximum frequency, if the rate at which the target processor core generates a splitlock is lower than the target upper limit rate, stop obtaining the reduced maximum frequency of the target processor core.
根据本公开实施例提供的技术方案,频率控制逻辑电路通过获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率,可以确保不断实时根据目标处理器核对应的目标上限速率、目标处理器核产生splitlock的实时速率即第一速率以及目标处理器核的实时频率获取目标处理器核降低后的最高频率即降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的速率即第二速率小于目标上限速率,确保目标处理器核的最高频率能够阶段性的稳定下降至满足要求的区间,避免因急剧下降而导致目标处理器核的性能产生较大波动。According to the technical solution provided by the embodiments of the present disclosure, the frequency control logic circuit acquires the reduced maximum frequency of the target processor core, and adjusts the maximum frequency of the target processor core to the reduced maximum frequency until the target processor core generates a splitlock The second rate is lower than the target upper limit rate, which can ensure that the target processor core is continuously reduced in real time according to the target processor core corresponding target upper limit rate, the real-time rate at which the target processor core generates splitlock, that is, the first rate, and the real-time frequency of the target processor core. The final highest frequency is the highest frequency after reduction, and the highest frequency of the target processor core is adjusted to the highest frequency after reduction until the rate at which the target processor core generates splitlock, that is, the second rate is less than the target upper limit rate, ensuring that the target processor core The highest frequency can be steadily decreased in stages to a range that meets the requirements, avoiding large fluctuations in the performance of the target processor core caused by a sharp decrease.
在本公开的一个实施例中,频率控制逻辑电路,还用于:In one embodiment of the present disclosure, the frequency control logic circuit is also used for:
获取当前目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
响应于第三速率小于目标上限速率,升高目标处理器核的最高频率。In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
在本公开的一个实施例中,第三速率,可以理解为在频率控制逻辑电路降低所述目标处理器核的最高频率后的时刻,目标处理器核产生splitlock的速率。In an embodiment of the present disclosure, the third rate can be understood as the rate at which the target processor core generates a splitlock at the moment after the frequency control logic circuit reduces the highest frequency of the target processor core.
在本公开的一个实施例中,获取第三速率,可以为通过对目标处理器核进行实时检测,以确定目标处理器核是否产生splitlock,并根据检测结果获取该第三速率。In an embodiment of the present disclosure, acquiring the third rate may be by performing real-time detection on the target processor core to determine whether the target processor core generates a splitlock, and acquiring the third rate according to the detection result.
在本公开的一个实施例中,升高目标处理器核的最高频率,可以理解为根据预设设置的频率升高阈值,以预设升高时间阈值为间隔,周期性的增加目标处理器核的最高频率;或者,也可以根据预设设置的频率升高速度阈值以及当前目标处理器核的最高频率进行计算,以获取不同时刻目标处理器核升高后的最高频率,并在对应时刻对目标处理器核的最高频率进行调整。In one embodiment of the present disclosure, increasing the maximum frequency of the target processor core can be understood as increasing the threshold value of the frequency according to the preset frequency, and periodically increasing the target processor core at intervals of the preset increase time threshold. Or, it can also be calculated according to the preset frequency increase speed threshold and the highest frequency of the current target processor core to obtain the highest frequency of the target processor core at different times after the increase, and at the corresponding time The maximum frequency of the target processor core is adjusted.
根据本公开实施例提供的技术方案,频率控制逻辑电路通过获取当前目标处理器核产生splitlock的第三速率,并响应于第三速率小于目标上限速率,升高目标处理器核的最高频率,可以确保目标处理器核的最高频率在升高后,目标处理器核产生splitlock的速率能够逼近目标上限速率,确保在处理器核的性能不会因产生splitlock过快而降低过多的前提 下,尽量提高目标处理器核的最高频率,改善目标处理器核的性能。According to the technical solution provided by the embodiments of the present disclosure, the frequency control logic circuit obtains the third rate at which the current target processor core generates splitlock, and increases the maximum frequency of the target processor core in response to the third rate being less than the target upper limit rate, which can Ensure that after the maximum frequency of the target processor core is increased, the rate at which the target processor core generates splitlocks can approach the target upper limit rate, ensuring that the performance of the processor core will not be reduced too much due to the excessive generation of splitlocks Under this condition, try to increase the highest frequency of the target processor core to improve the performance of the target processor core.
在本公开的一个实施例中,频率控制逻辑电路,还用于:In one embodiment of the present disclosure, the frequency control logic circuit is also used for:
获取当前的频率调整计数值以及当前目标处理器核的升高前频率,频率调整计数值为从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the pre-increase frequency of the current target processor core. The frequency adjustment count value starts from the moment when the frequency of the target processor core is lowered, and the frequency adjustment count threshold is continuously decremented according to the count decrement speed. ;
升高目标处理器核的最高频率,包括:Increase the maximum frequency of the target processor core, including:
根据升高前频率、调整后第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,调第三速率以及频率调整计数值均与升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate after adjustment, and the frequency adjustment count value, and set the highest frequency of the target processor core as the highest frequency after the increase, adjust the third rate and the frequency adjustment count value Negatively correlated with the highest frequency after elevation.
在本公开的一个实施例中,频率控制逻辑电路可以从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减,以便获取在控制目标处理器核的频率降低的时刻之后任一时刻的频率调整计数值。其中,频率调整计数阈值以及计数递减速度可以为预先设置的,也可以为从其他装置或系统处获取。In an embodiment of the present disclosure, the frequency control logic circuit may start from the moment when the frequency of the target processor core is controlled to decrease, and continuously decrement the frequency adjustment count threshold according to the count decrement speed, so as to obtain the frequency of the target processor core under control. The frequency adjusts the count value at any time after the moment of decrease. Wherein, the frequency adjustment counting threshold and the counting decrement speed may be preset, or may be obtained from other devices or systems.
在本公开的一个实施例中,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,可以为将升高前频率、第三速率以及频率调整计数值带入预先设置的算法,根据该算法计算得到升高后最高频率;也可以为将升高前频率、第三速率以及频率调整计数值作为输入,输入预先训练得到的模型,以获取该模型输出的升高后最高频率。In one embodiment of the present disclosure, the highest frequency after the increase is obtained according to the frequency before the increase, the third rate and the frequency adjustment count value, which can be used to bring the frequency before the increase, the third rate and the frequency adjustment count value into the preset According to the algorithm, the highest frequency after the increase is calculated; the frequency before the increase, the third rate and the frequency adjustment count value can also be used as input to input the pre-trained model to obtain the output of the model after the increase highest frequency.
根据本公开实施例提供的技术方案,通过获取当前的频率调整计数值以及当前目标处理器核的升高前频率,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值均与升高后最高频率负相关。其中,考虑到当第三速率已处于较高的状态时,若获取的升高后最高频率较高,则可能导致在将目标处理器核的最高频率设置为升高后最高频率后,目标处理器核的频率过高,进而导致目标处理器核产生splitlock的速率较高,甚至目标处理器核产生splitlock的速率可能大于或等于目标上限速率,因此通过使第三速率与升高后最高频率负相关,可以避免在第三速率已处于较高的状态时升高后最高频率也较高;而频率调整计数值与控制目标处理器核的频率降低的时刻至当前时刻的时间长度成反比,该时间长度越长,频率调整计数值越小,而考虑到该时间长度越长,对目标处理器核执行正常应用程序的影响越大,因此通过使第三速率与频率调整计数值负相关,可以避免目标处理器核的频率长期处于过低的状态,使目标处理器核执行的正常应用程序不会受到过多影响。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the current frequency adjustment count value and the pre-increase frequency of the current target processor core, the highest frequency after the increase is obtained according to the pre-increase frequency, the third rate, and the frequency adjustment count value , and set the highest frequency of the target processor core as the highest frequency after the increase, and the third rate and the frequency adjustment count value are negatively correlated with the highest frequency after the increase. Among them, considering that when the third rate is already in a relatively high state, if the maximum frequency obtained after the increase is high, it may cause that after the maximum frequency of the target processor core is set to the maximum frequency after the increase, the target processing The frequency of the processor core is too high, which in turn causes the target processor core to generate a splitlock at a higher rate, and even the rate at which the target processor core generates a splitlock may be greater than or equal to the target upper limit rate. Therefore, by making the third rate and the increased maximum frequency negative Correlation, it can avoid that the highest frequency is also higher after the increase when the third rate is already in a higher state; and the frequency adjustment count value is inversely proportional to the time length from the moment when the frequency of the control target processor core is lowered to the current moment, the The longer the length of time, the smaller the frequency adjustment count value, and considering that the longer the length of time, the greater the impact on the execution of normal application programs by the target processor core, so by making the third rate negatively correlated with the frequency adjustment count value, it can be Prevent the frequency of the target processor core from being too low for a long time, so that the normal application programs executed by the target processor core will not be affected too much.
在本公开的一个实施例中,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,包括:In an embodiment of the present disclosure, the highest frequency after the increase is obtained according to the frequency before the increase, the third rate and the frequency adjustment count value, including:
根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为升高前频率,R为目标上限速率,C2为第三速率,T为频率调整计数阈值,Tc为频率调整计数值。 According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), obtain the highest frequency Ft 2 after the increase, where Fc 2 is the frequency before the increase, and R is the target upper limit rate, C 2 is the third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
本公开实施例提供的技术方案,通过Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率,可以较为方便的获取升高后最高频率,提高获取升高后最高频率的效率。In the technical solution provided by the embodiments of the present disclosure, by obtaining the highest frequency after the rise by Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), it is more convenient to obtain the rise The highest frequency after high, improve the efficiency of obtaining the highest frequency after boost.
在本公开的一个实施例中,图3示出根据本公开一实施方式的处理器的示意性结构框图,如图3所示,处理器100还包括用于储存频率调整计数阈值的频率调整计数阈值寄存器104以及用于储存频率调整计数值的频率调整计数值寄存器105,频率调整计数阈值寄存器104以及频率调整计数值寄存器105均与频率控制逻辑电路103连接;In an embodiment of the present disclosure, FIG. 3 shows a schematic structural block diagram of a processor according to an embodiment of the present disclosure. As shown in FIG. 3 , the processor 100 further includes a frequency adjustment count for storing the frequency adjustment count threshold The threshold register 104 and the frequency adjustment count value register 105 for storing the frequency adjustment count value, the frequency adjustment count threshold register 104 and the frequency adjustment count value register 105 are all connected to the frequency control logic circuit 103;
频率控制逻辑电路103,用于在控制目标处理器核的频率降低的时刻,将从频率调整计数阈值寄存器104读取的频率调整计数阈值储存在频率调整计数值寄存器105中,并根据计数递减速度对频率调整计数值寄存器105中的频率调整计数阈值进行持续递减;The frequency control logic circuit 103 is used to store the frequency adjustment count threshold read from the frequency adjustment count threshold register 104 in the frequency adjustment count value register 105 at the moment when the frequency of the control target processor core is lowered, and decrement according to the counting speed Continuously decrementing the frequency adjustment count threshold in the frequency adjustment count value register 105;
获取当前的频率调整计数值,包括:Get the current frequency adjustment count value, including:
从频率调整计数值寄存器105中读取当前的频率调整计数值。The current frequency adjustment count value is read from the frequency adjustment count value register 105 .
在本公开的一个实施例中,频率调整计数阈值寄存器中储存的频率调整计数阈值可以为事先写入该频率调整计数阈值寄存器的,也可以为由处理器自身或其他装置或系统写入该频率调整计数阈值寄存器。In an embodiment of the present disclosure, the frequency adjustment count threshold stored in the frequency adjustment count threshold register may be written into the frequency adjustment count threshold register in advance, or may be written by the processor itself or other devices or systems. Adjust count threshold register.
根据本公开实施例提供的技术方案,处理器还包括用于储存频率调整计数阈值的频率调整计数阈值寄存器以及用于储存频率调整计数值的频率调整计数值寄存器,频率调整计数阈值寄存器以及频率调整计数值寄存器均与频率控制逻辑电路连接,其中由于频率调整计数阈值寄存器以及频率调整计数值寄存器均位于处理器中,因此处理器中的频率控制逻辑电路在从频率调整计数阈值寄存器读取频率调整计数阈值,以及根据计数递减速度对频率调整计数值寄存器中的频率调整计数阈值进行持续递减时,时延较短,从而提高了频率控制逻辑电路的处理效率。According to the technical solution provided by the embodiments of the present disclosure, the processor further includes a frequency adjustment count threshold register for storing the frequency adjustment count threshold, a frequency adjustment count value register for storing the frequency adjustment count value, a frequency adjustment count threshold register, and a frequency adjustment count threshold register. The count value registers are all connected with the frequency control logic circuit, wherein since the frequency adjustment count threshold register and the frequency adjustment count value register are all located in the processor, the frequency control logic circuit in the processor reads the frequency adjustment from the frequency adjustment count threshold register. When the counting threshold and the frequency adjustment counting threshold in the frequency adjustment count value register are continuously decremented according to the counting decrement speed, the time delay is short, thereby improving the processing efficiency of the frequency control logic circuit.
在本公开的一个实施例中,频率控制逻辑电路,还用于:In one embodiment of the present disclosure, the frequency control logic circuit is also used for:
响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率。In response to the frequency adjustment count value being 0, the highest frequency of the target processor core is set as the highest frequency of the processor core.
在本公开的一个实施例中,处理器核最高频率可以理解为目标处理器核自身能够达到的最高频率。将目标处理器核的最高频率设置为处理器核最高频率,可以理解为不再对目标处理器核的最高频率进行任何限制。In an embodiment of the present disclosure, the highest frequency of the processor core may be understood as the highest frequency that the target processor core itself can achieve. Setting the maximum frequency of the target processor core to the maximum frequency of the processor core can be understood as no longer restricting the maximum frequency of the target processor core.
根据本公开实施例提供的技术方案,频率调整计数值为0时,说明从控制所述目标处理器核的频率降低的时刻到当前时刻的时间长度,已经达到允许对目标处理器核的最高频率进行限制的最长时间长度,若继续对目标处理器核的最高频率进行限制,则可能对目标处理器核的正常应用程序执行产生影响,因此频率控制逻辑电路通过响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率,即不再对目标处理器核的最高频率进行任何限制,可以确保目标处理器核的正常应用程序执行不会受到任何影响。According to the technical solution provided by the embodiments of the present disclosure, when the frequency adjustment count value is 0, it indicates that the maximum frequency allowed for the target processor core has been reached in the time period from the moment when the frequency of the target processor core is reduced to the current moment. The maximum length of time for limitation. If the maximum frequency of the target processor core continues to be limited, it may affect the normal application program execution of the target processor core. Therefore, the frequency control logic circuit adjusts the count value to 0 by responding to the frequency , set the maximum frequency of the target processor core to the maximum frequency of the processor core, that is, no longer impose any restrictions on the maximum frequency of the target processor core, which can ensure that the normal application execution of the target processor core will not be affected in any way.
图4示出根据本公开一实施方式的处理器控制方法的流程图,如图4所示,处理器控 制方法包括步骤S101、S102。FIG. 4 shows a flow chart of a processor control method according to an embodiment of the present disclosure. As shown in FIG. 4 , the processor control The manufacturing method includes steps S101 and S102.
在步骤S101中,获取处理器的至少一个处理器核产生分裂锁(splitlock)的速率以及至少一个处理器核对应的上限速率。In step S101, a rate at which at least one processor core of a processor generates a split lock (splitlock) and an upper limit rate corresponding to at least one processor core are acquired.
在步骤S102中,响应于至少一个处理器核中的目标处理器核产生splitlock的第一速率大于或等于目标处理器核对应的上限速率,降低目标处理器核的最高频率,和/或使目标处理器核触发对齐检查异常。In step S102, in response to the first rate at which the target processor core in at least one processor core generates a splitlock is greater than or equal to the upper limit rate corresponding to the target processor core, reduce the highest frequency of the target processor core, and/or make the target The processor core triggered an alignment check exception.
在本公开的一个实施例中,处理器可以包括一个或多个处理器核(Core),每个CPU Core都可以配置有高速缓存(Cach),高速缓存是位于处理器执行单元和主存储器(DynamicRandom Access Memory,DRAM)之间的存储器,通常是由静态存储器(Static RAM,SRAM)构成,规模较小但存取速度很快。高速缓存可以用于保存内存中部分数据的副本,当处理器读写数据时,首先访问高速缓存,当高速缓存中不存在所需数据时,再访问内存。高速缓存通常分成多个组,其中每个组分成多个高速缓存数据线(cacheline),当从内存中取单元到高速缓存中时,会一次取一个高速缓存数据线大小的内存区域到高速缓存中,然后存进相应的高速缓存数据线中。In one embodiment of the present disclosure, the processor may include one or more processor cores (Core), and each CPU Core may be configured with a cache (Cach), and the cache is located between the processor execution unit and the main memory ( The memory between Dynamic Random Access Memory (DRAM) is usually composed of static memory (Static RAM, SRAM), which is small in scale but fast in access speed. The cache can be used to save a copy of some data in the memory. When the processor reads and writes data, it first accesses the cache, and when the required data does not exist in the cache, it accesses the memory again. The cache is usually divided into multiple groups, and each group is divided into multiple cache lines (cacheline). When fetching a unit from the memory into the cache, a memory area of the size of a cache line is taken to the cache at a time. , and then stored in the corresponding cache data line.
在本公开的一个实施例中,处理器核产生splitlock可以理解为,该处理器核产生了跨越两个高速缓存数据线(cache lines)的数据读取,为了保证数据读取的原子性,需要锁定该处理器的整个总线,这种状况可以理解为该处理器核产生了splitlock。其中,数据读取的原子性可以被理解为,数据读取不可被中断。顺序不可以被打乱,也不可以被切割掉部分数据读取或只执行部分数据读取。In one embodiment of the present disclosure, the generation of splitlock by the processor core can be understood as that the processor core generates data read across two cache data lines (cache lines). In order to ensure the atomicity of data read, it is necessary Lock the entire bus of the processor. This situation can be understood as a splitlock generated by the processor core. Among them, the atomicity of data reading can be understood as that data reading cannot be interrupted. The sequence cannot be shuffled, and part of the data read cannot be cut off or only part of the data read can be performed.
在本公开的一个实施例中,上限速率可以理解为,用于指示允许对应的处理器核在单位时间内产生splitlock的次数的上限,示例性的,上限速率的单位可以为次/秒。若对应的处理器核在单位时间内产生splitlock的次数大于或等于该上限速率,则该对应的处理器核的性能可能会下降较多。In one embodiment of the present disclosure, the upper limit rate can be understood as an upper limit for indicating the number of times a corresponding processor core is allowed to generate a splitlock within a unit time. Exemplarily, the unit of the upper limit rate may be times/second. If the number of splitlocks generated by the corresponding processor core per unit time is greater than or equal to the upper limit rate, the performance of the corresponding processor core may be greatly degraded.
在本公开的一个实施例中,上限速率可以为事先储存在上限寄存器中,也可以为由处理器自身基于处理器的历史日志根据相应的算法或模型计算得到,并写入上限寄存器中,也可以为由其他装置或系统写入上限寄存器中。In an embodiment of the present disclosure, the upper limit rate can be stored in the upper limit register in advance, or can be calculated by the processor itself based on the processor's history log according to a corresponding algorithm or model, and written into the upper limit register, or It can be written into the upper limit register by other devices or systems.
在本公开的一个实施例中,第一速率,可以为通过对目标处理器核进行实时检测,以确定目标处理器核是否产生splitlock,并根据检测结果获取该第一速率,其中,对目标处理器核进行实时检测,可以为以预设检测时间阈值为间隔,周期性的对目标处理器核进行实时检测,该预设检测时间阈值可以为1ms。示例性的,可以以1ms为间隔,周期性的通过处理器中的电源管理单元(Power Management Unit)获取用于指示对应处理器核是否产生splitlock的指示信息,根据该指示信息确定对应处理器核是否产生splitlock,并进一步获取对应处理器核产生splitlock的速率。In an embodiment of the present disclosure, the first rate may be to determine whether the target processor core generates a splitlock by performing real-time detection on the target processor core, and obtain the first rate according to the detection result, wherein the target processor core The real-time detection of the processor core may be to periodically perform real-time detection on the target processor core at intervals of a preset detection time threshold, and the preset detection time threshold may be 1 ms. Exemplarily, at an interval of 1 ms, the instruction information used to indicate whether the corresponding processor core generates a splitlock is periodically obtained through the power management unit (Power Management Unit) in the processor, and the corresponding processor core is determined according to the instruction information Whether to generate a splitlock, and further obtain the rate at which the corresponding processor core generates a splitlock.
在本公开的一个实施例中,目标处理器核的最高频率被降低可以理解为,将目标处理 器核的最高频率设置为预设频率;或者,也可以为预先对产生splitlock的不同速率进行速率等级设置,并设置速率等级与最高频率的对应关系,在降低目标处理器核的最高频率之前确定第一速率对应的目标速率等级,获取该目标速率等级对应的最高频率,并将目标处理器核的最高频率设置该目标速率等级对应的最高频率。In one embodiment of the present disclosure, the reduction of the maximum frequency of the target processor core can be understood as, the target processing The highest frequency of the processor core is set to the preset frequency; or, it is also possible to pre-set the rate level for different rates of splitlock generation, and set the corresponding relationship between the rate level and the highest frequency, which is determined before reducing the highest frequency of the target processor core The target speed level corresponding to the first rate, obtaining the highest frequency corresponding to the target speed level, and setting the highest frequency of the target processor core to the highest frequency corresponding to the target speed level.
根据本公开实施例提供的技术方案,通过获取处理器的至少一个处理器核产生splitlock的速率以及至少一个处理器核对应的上限速率,时考虑到处理器核产生splitlock的速率较低时,处理器核的性能并不会降低过多,因此可以基于上限速率确定相应的处理器核产生splitlock的速率是否较高,从而在目标处理器核产生splitlock的第一速率大于或等于与该目标处理器核对应的的目标上限速率(即目标处理器核产生splitlock的速率较高)时,使目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常。其中,由于处理器核的频率与该处理器核产生splitlock的速率正相关,因此仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核的最高频率被降低,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,不影响目标处理器核的正常工作(即不降低目标处理器核的最高频率),而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,使目标处理器核的最高频率被降低,使产生splitlock的速率也随之降低,确保处理器核的性能不会因产生splitlock而降低过多,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响;另外,仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核触发对齐检查异常,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,目标处理器核不会触发对齐检查异常,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响,用户体验不会受到任何损害,而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,目标处理器核才触发对齐检查异常,确保处理器核的性能不会因产生splitlock而降低过多。因此上述方案在尽量不影响处理器上运行的用户应用程序正常执行的前提下,确保处理器核的性能不会因产生splitlock而降低过多,改善了用户体验。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the rate at which at least one processor core generates a splitlock and the upper limit rate corresponding to at least one processor core, when considering that the rate at which the processor core generates a splitlock is low, the processing The performance of the processor core will not be reduced too much, so it can be determined based on the upper limit rate whether the rate at which the corresponding processor core generates a splitlock is higher, so that the first rate at which the target processor core generates a splitlock is greater than or equal to that of the target processor When the target upper limit rate corresponding to the core (that is, the rate at which the target processor core generates splitlocks is relatively high), the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception. Wherein, since the frequency of the processor core is positively correlated with the rate at which the processor core produces the splitlock, only when the first rate at which the target processor core produces the splitlock is relatively high, the highest frequency of the target processor core is reduced to ensure When the rate at which the splitlock is generated is low and the performance of the target processor core will not be reduced too much, it will not affect the normal operation of the target processor core (that is, the highest frequency of the target processor core will not be reduced), and the rate at which the splitlock will be generated is relatively high. High, when the performance of the target processor core may be reduced too much, the maximum frequency of the target processor core will be reduced, and the rate of splitlock generation will also be reduced to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock Many, so that related applications running on the target processor core (such as applications that may cause splitlock) can be executed normally, and related applications running on other processor cores will not be affected too much; in addition , only when the first rate of splitlock generated by the target processor core is high, the target processor core triggers an alignment check exception, which can ensure that when the rate of splitlock generated is low and the performance of the target processor core will not be reduced too much, The target processor core will not trigger an alignment check exception, so that related applications running on the target processor core (such as applications that may cause splitlocks) can be executed normally, while related applications running on other processor cores It will not be affected too much, and the user experience will not be damaged in any way. When the rate of splitlock generation is high, which may reduce the performance of the target processor core too much, the target processor core will trigger an alignment check exception to ensure processing The performance of the core will not be degraded too much due to the splitlock. Therefore, the above solution ensures that the performance of the processor core will not be degraded too much due to the generation of the splitlock without affecting the normal execution of the user application program running on the processor as much as possible, thereby improving the user experience.
在本公开的一个实施例中,在步骤S102中,降低目标处理器核的最高频率,可以通过如下步骤实现:In one embodiment of the present disclosure, in step S102, reducing the maximum frequency of the target processor core may be achieved through the following steps:
获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率;Obtain the highest frequency after the reduction of the target processor core, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the second rate at which the target processor core generates splitlock is less than the target upper limit rate;
其中,降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为降低后最高频率,Fc1为目标处理器核的降低前频率,R为目标上限速率,C1为第一速率。Among them, the highest frequency after reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , Ft 1 is the highest frequency after reduction, Fc 1 is the frequency before reduction of the target processor core, R is the target upper limit rate, and C 1 is the first a rate.
在本公开的一个实施例中,目标处理器核的降低前频率,可以理解为在降低目标处理器核的最高频率之前一时刻,目标处理器核的频率。目标处理器核的降低前频率,可以从 目标处理器核获取,也可以为从其他装置或系统处获取。In an embodiment of the present disclosure, the frequency of the target processor core before reduction may be understood as the frequency of the target processor core at a moment before the highest frequency of the target processor core is reduced. The pre-reduced frequency of the target processor core can be changed from The target processor core can also be obtained from other devices or systems.
在本公开的一个实施例中,获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率,可以理解以预设频率降低时间阈值为间隔,周期性的实时获取目标处理器核的第一速率以及目标处理器核的频率即降低前频率,并根据从目标上限寄存器中读取的目标上限速率、实时获取的第一速率以及实时获取的降低前频率进行计算,以获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率。其中,在将目标处理器核的最高频率调整为降低后最高频率后,若目标处理器核产生splitlock的速率即第一速率小于目标上限速率时,则停止获取目标处理器核的降低后最高频率。In one embodiment of the present disclosure, the reduced maximum frequency of the target processor core is obtained, and the maximum frequency of the target processor core is adjusted to the reduced maximum frequency until the second rate at which the target processor core generates splitlocks is less than the target upper limit Rate, it can be understood that the preset frequency is lowered by the time threshold as an interval, and the first rate of the target processor core and the frequency of the target processor core are obtained periodically in real time, that is, the frequency before the reduction, and according to the target read from the target upper limit register The upper limit rate, the first rate of real-time acquisition, and the frequency before reduction of real-time acquisition are calculated to obtain the highest frequency of the target processor core after reduction, and the highest frequency of the target processor core is adjusted to the highest frequency after reduction. Wherein, after the highest frequency of the target processor core is adjusted to the highest frequency after the reduction, if the rate at which the target processor core generates the splitlock, that is, the first rate is less than the target upper limit rate, stop obtaining the highest frequency after the reduction of the target processor core .
根据本公开实施例提供的技术方案,通过获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率,可以确保不断实时根据目标处理器核对应的目标上限速率、目标处理器核产生splitlock的实时速率即第一速率以及目标处理器核的实时频率获取目标处理器核降低后的最高频率即降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的速率即第二速率小于目标上限速率,确保目标处理器核的最高频率能够阶段性的稳定下降至满足要求的区间,避免因急剧下降而导致目标处理器核的性能产生较大波动。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the reduced maximum frequency of the target processor core, and adjusting the maximum frequency of the target processor core to the reduced maximum frequency, until the second rate at which the target processor core generates a splitlock is less than The target upper limit rate can ensure continuous real-time acquisition of the highest frequency of the target processor core after reduction according to the target upper limit rate corresponding to the target processor core, the real-time rate at which the target processor core generates splitlock (the first rate), and the real-time frequency of the target processor core That is, the highest frequency after the reduction, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the rate at which the target processor core generates splitlock, that is, the second rate is less than the target upper limit rate, to ensure that the highest frequency of the target processor core can reach the stage The stability drops to a range that meets the requirements, and avoids large fluctuations in the performance of the target processor core caused by a sharp drop.
在本公开的一个实施例中,所述方法还包括如下步骤:In one embodiment of the present disclosure, the method further includes the following steps:
获取当前目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
响应于第三速率小于目标上限速率,升高目标处理器核的最高频率。In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
在本公开的一个实施例中,第三速率,可以理解为在降低所述目标处理器核的最高频率后的时刻,目标处理器核产生splitlock的速率。In an embodiment of the present disclosure, the third rate may be understood as the rate at which the target processor core generates a splitlock at the moment after the highest frequency of the target processor core is reduced.
在本公开的一个实施例中,获取第三速率,可以为通过对目标处理器核进行实时检测,以确定目标处理器核是否产生splitlock,并根据检测结果获取该第三速率,In an embodiment of the present disclosure, obtaining the third rate may be by performing real-time detection on the target processor core to determine whether the target processor core generates a splitlock, and obtaining the third rate according to the detection result,
在本公开的一个实施例中,升高目标处理器核的最高频率,可以理解为根据预设设置的频率升高阈值,以预设升高时间阈值为间隔,周期性的增加目标处理器核的最高频率;或者,也可以根据预设设置的频率升高速度阈值以及当前目标处理器核的最高频率进行计算,以获取不同时刻目标处理器核升高后的最高频率,并在对应时刻对目标处理器核的最高频率进行调整。In one embodiment of the present disclosure, increasing the maximum frequency of the target processor core can be understood as increasing the threshold value of the frequency according to the preset frequency, and periodically increasing the target processor core at intervals of the preset increase time threshold. Or, it can also be calculated according to the preset frequency increase speed threshold and the highest frequency of the current target processor core to obtain the highest frequency of the target processor core at different times after the increase, and at the corresponding time The maximum frequency of the target processor core is adjusted.
根据本公开实施例提供的技术方案,通过获取当前目标处理器核产生splitlock的第三速率,并响应于第三速率小于目标上限速率,升高目标处理器核的最高频率,可以确保目标处理器核的最高频率在升高后,目标处理器核产生splitlock的速率能够逼近目标上限速率,确保在处理器核的性能不会因产生splitlock而降低过多的前提下,尽量提高目标处理器核的最高频率,改善目标处理器核的性能。 According to the technical solution provided by the embodiments of the present disclosure, by obtaining the third rate at which the current target processor core generates a splitlock, and in response to the fact that the third rate is less than the target upper limit rate, increasing the maximum frequency of the target processor core can ensure that the target processor core After the maximum frequency of the core is increased, the rate at which the target processor core generates splitlocks can approach the target upper limit rate, ensuring that the performance of the processor core will not be reduced too much due to the generation of splitlocks. Maximum frequency to improve the performance of the target processor core.
在本公开的一个实施例中,所述方法还包括如下步骤:In one embodiment of the present disclosure, the method further includes the following steps:
获取当前的频率调整计数值以及当前目标处理器核的升高前频率,频率调整计数值为从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the pre-increase frequency of the current target processor core. The frequency adjustment count value starts from the moment when the frequency of the target processor core is lowered, and the frequency adjustment count threshold is continuously decremented according to the count decrement speed. ;
升高目标处理器核的最高频率,包括:Increase the maximum frequency of the target processor core, including:
根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三以及频率调整计数值均与升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value, and set the maximum frequency of the target processor core as the highest frequency after the increase, and the third and frequency adjustment count values are the same as after the increase The highest frequency is negatively correlated.
在本公开的一个实施例中,可以从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减,以便获取在控制目标处理器核的频率降低的时刻之后任一时刻的频率调整计数值。其中,频率调整计数阈值以及计数递减速度可以为预先设置的,也可以为从其他装置或系统处获取。In an embodiment of the present disclosure, the frequency adjustment count threshold can be continuously decremented according to the count decrement speed from the moment when the frequency of the target processor core is lowered, so as to obtain the Frequency adjustment count value at any time. Wherein, the frequency adjustment counting threshold and the counting decrement speed may be preset, or may be obtained from other devices or systems.
在本公开的一个实施例中,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,可以为将升高前频率、第三速率以及频率调整计数值带入预先设置的算法,根据该算法计算得到升高后最高频率;也可以为将升高前频率、第三速率以及频率调整计数值作为输入,输入预先训练得到的模型,以获取该模型输出的升高后最高频率。In one embodiment of the present disclosure, the highest frequency after the increase is obtained according to the frequency before the increase, the third rate and the frequency adjustment count value, which can be used to bring the frequency before the increase, the third rate and the frequency adjustment count value into the preset According to the algorithm, the highest frequency after the increase is calculated; the frequency before the increase, the third rate and the frequency adjustment count value can also be used as input to input the pre-trained model to obtain the output of the model after the increase highest frequency.
根据本公开实施例提供的技术方案,通过获取当前的频率调整计数值以及当前目标处理器核的升高前频率,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值均与升高后最高频率负相关。其中,考虑到当第三速率已处于较高的状态时,若获取的升高后最高频率较高,则可能导致在将目标处理器核的最高频率设置为升高后最高频率后,目标处理器核的频率过高,进而导致目标处理器核产生splitlock的速率较高,甚至目标处理器核产生splitlock的速率可能大于或等于目标上限速率,因此通过使第三速率与升高后最高频率负相关,可以避免在第一速率已处于较高的状态时升高后最高频率也较高;而频率调整计数值与控制目标处理器核的频率降低的时刻至当前时刻的时间长度成反比,该时间长度越长,频率调整计数值越小,而考虑到该时间长度越长,对目标处理器核执行正常应用程序的影响越大,因此通过使升高后最高频率与频率调整计数值负相关,可以避免目标处理器核的频率长期处于过低的状态,使目标处理器核执行的正常应用程序不会受到过多影响。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the current frequency adjustment count value and the pre-increase frequency of the current target processor core, the highest frequency after the increase is obtained according to the pre-increase frequency, the third rate, and the frequency adjustment count value , and set the highest frequency of the target processor core as the highest frequency after the increase, and the third rate and the frequency adjustment count value are negatively correlated with the highest frequency after the increase. Among them, considering that when the third rate is already in a relatively high state, if the maximum frequency obtained after the increase is high, it may cause that after the maximum frequency of the target processor core is set to the maximum frequency after the increase, the target processing The frequency of the processor core is too high, which in turn causes the target processor core to generate a splitlock at a higher rate, and even the rate at which the target processor core generates a splitlock may be greater than or equal to the target upper limit rate. Therefore, by making the third rate and the increased maximum frequency negative Correlation, it can avoid that the highest frequency is also higher after the increase when the first rate is already in a higher state; and the frequency adjustment count value is inversely proportional to the time length from the moment when the frequency of the control target processor core is lowered to the current moment, the The longer the time length is, the smaller the frequency adjustment count value is, and considering that the longer the time length is, the greater the impact on the normal application program execution of the target processor core is, so by making the highest frequency after the increase negatively correlated with the frequency adjustment count value , can prevent the frequency of the target processor core from being too low for a long time, so that the normal application programs executed by the target processor core will not be too much affected.
在本公开的一个实施例中,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,可以通过如下步骤实现:In an embodiment of the present disclosure, obtaining the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value can be achieved through the following steps:
根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为升高前频率,R为目标上限速率,C2为调整后第三速率,T为频率调整计数阈值,Tc为频率调整计数值。 According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), obtain the highest frequency Ft 2 after the increase, where Fc 2 is the frequency before the increase, and R is the target upper limit rate, C 2 is the adjusted third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
本公开实施例提供的技术方案,通过Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率,可以较为方便的获取升高后最高频率,提高获取升高后最高频率的效率。In the technical solution provided by the embodiments of the present disclosure, by obtaining the highest frequency after the rise by Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), it is more convenient to obtain the rise The highest frequency after high, improve the efficiency of obtaining the highest frequency after boost.
在本公开的一个实施例中,所述方法还包括如下步骤:In one embodiment of the present disclosure, the method further includes the following steps:
响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率。In response to the frequency adjustment count value being 0, the highest frequency of the target processor core is set as the highest frequency of the processor core.
在本公开的一个实施例中,处理器核最高频率可以理解为目标处理器核自身能够达到的最高频率。将目标处理器核的最高频率设置为处理器核最高频率,可以理解为不再对目标处理器核的最高频率进行任何限制。In an embodiment of the present disclosure, the highest frequency of the processor core may be understood as the highest frequency that the target processor core itself can achieve. Setting the maximum frequency of the target processor core to the maximum frequency of the processor core can be understood as no longer restricting the maximum frequency of the target processor core.
根据本公开实施例提供的技术方案,频率调整计数值为0时,说明从控制所述目标处理器核的频率降低的时刻到当前时刻的时间长度,已经达到允许对目标处理器核的最高频率进行限制的最长时间长度,若继续对目标处理器核的最高频率进行限制,则可能对目标处理器核的正常应用程序执行产生影响,因此通过响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率,即不再对目标处理器核的最高频率进行任何限制,可以确保目标处理器核的正常应用程序执行不会受到任何影响。According to the technical solution provided by the embodiments of the present disclosure, when the frequency adjustment count value is 0, it indicates that the maximum frequency allowed for the target processor core has been reached in the time period from the moment when the frequency of the target processor core is reduced to the current moment. The maximum length of time for limitation. If the maximum frequency of the target processor core continues to be limited, it may affect the normal application execution of the target processor core. Therefore, by adjusting the count value to 0 in response to the frequency, the target processing The highest frequency of the processor core is set to the highest frequency of the processor core, that is, there is no longer any restriction on the highest frequency of the target processor core, which can ensure that the normal application execution of the target processor core will not be affected in any way.
以下参照图5描述根据本公开一实施方式的处理器控制装置,图5示出根据本公开一实施方式的处理器控制装置200的结构框图。A processor control device according to an embodiment of the present disclosure will be described below with reference to FIG. 5 , and FIG. 5 shows a structural block diagram of a processor control device 200 according to an embodiment of the present disclosure.
如图5所示,处理器控制装置200包括:As shown in Figure 5, the processor control device 200 includes:
速率获取模块201,被配置为获取处理器的至少一个处理器核产生分裂锁(splitlock)的速率以及至少一个处理器核对应的上限速率;The rate acquisition module 201 is configured to acquire the rate at which at least one processor core of the processor generates a split lock (splitlock) and the upper limit rate corresponding to at least one processor core;
频率控制模块202,被配置为响应于至少一个处理器核中的目标处理器核产生splitlock的第一速率大于或等于目标处理器核对应的上限速率,降低目标处理器核的最高频率,和/或使目标处理器核触发对齐检查异常。The frequency control module 202 is configured to reduce the maximum frequency of the target processor core in response to the first rate at which the target processor core in the at least one processor core generates a splitlock is greater than or equal to the upper limit rate corresponding to the target processor core, and/or Or cause the target processor core to trigger an alignment check exception.
根据本公开实施例提供的技术方案,通过获取处理器的至少一个处理器核产生splitlock的速率以及至少一个处理器核对应的上限速率,考虑到处理器核产生splitlock的速率较低时,处理器核的性能并不会降低过多,因此可以基于上限速率确定相应的处理器核产生splitlock的速率是否较高,从而在目标处理器核产生splitlock的第一速率大于或等于与该目标处理器核对应的的目标上限速率(即目标处理器核产生splitlock的速率较高)时,使目标处理器核的最高频率被降低,和/或目标处理器核触发对齐检查异常。其中,由于处理器核的频率与该处理器核产生splitlock的速率正相关,因此仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核的最高频率被降低,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,不影响目标处理器核的正常工作(即不降低目标处理器核的最高频率),而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,使目标处理器核的最高频率被降低,使产生splitlock的速率也随之降低,确保处理器核的性能不会因产生splitlock而降低过多,使运行在目标处理器核上的相 关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响;另外,仅在目标处理器核产生splitlock的第一速率较高时,使目标处理器核触发对齐检查异常,可以确保在产生splitlock的速率较低、不会使目标处理器核的性能降低过多时,目标处理器核不会触发对齐检查异常,使运行在目标处理器核上的相关应用程序(例如可能导致产生splitlock的应用程序)能够被正常执行,而运行在其他处理器核上的相关应用程序也不会受到过多影响,用户体验不会受到任何损害,而在产生splitlock的速率较高、可能会使目标处理器核的性能降低过多时,目标处理器核才触发对齐检查异常,确保处理器核的性能不会因产生splitlock而降低过多。因此上述方案在尽量不影响处理器上运行的用户应用程序正常执行的前提下,确保处理器核的性能不会因产生splitlock而降低过多,改善了用户体验。According to the technical solution provided by the embodiments of the present disclosure, by obtaining the rate at which at least one processor core generates a splitlock and the upper limit rate corresponding to at least one processor core, considering that the rate at which the processor core generates a splitlock is low, the processor The performance of the core will not be reduced too much, so it can be determined based on the upper limit rate whether the rate at which the corresponding processor core generates the splitlock is higher, so that the first rate at which the target processor core generates the splitlock is greater than or equal to that of the target processor core When the corresponding target upper limit rate (that is, the rate at which the target processor core generates splitlocks is relatively high), the maximum frequency of the target processor core is reduced, and/or the target processor core triggers an alignment check exception. Wherein, since the frequency of the processor core is positively correlated with the rate at which the processor core produces the splitlock, only when the first rate at which the target processor core produces the splitlock is relatively high, the highest frequency of the target processor core is reduced to ensure When the rate at which the splitlock is generated is low and the performance of the target processor core will not be reduced too much, it will not affect the normal operation of the target processor core (that is, the highest frequency of the target processor core will not be reduced), and the rate at which the splitlock will be generated is relatively high. High, when the performance of the target processor core may be reduced too much, the maximum frequency of the target processor core will be reduced, and the rate of splitlock generation will also be reduced to ensure that the performance of the processor core will not be reduced too much due to the generation of splitlock multiple, so that the phase running on the target processor core Related applications (such as applications that may cause splitlocks) can be executed normally, and related applications running on other processor cores will not be affected too much; in addition, only the first splitlock generated by the target processor core When the rate is high, the target processor core will trigger an alignment check exception, which can ensure that the target processor core will not trigger an alignment check exception when the splitlock rate is low and the performance of the target processor core will not be reduced too much. The relevant applications running on the target processor core (for example, the applications that may cause splitlock) can be executed normally, while the related applications running on other processor cores will not be affected too much, and the user experience will be improved. It will not suffer any damage, and when the rate of splitlock generation is high, which may reduce the performance of the target processor core too much, the target processor core will trigger an alignment check exception to ensure that the performance of the processor core will not be reduced due to the generation of splitlock excessive. Therefore, the above solution ensures that the performance of the processor core will not be degraded too much due to the generation of the splitlock without affecting the normal execution of the user application program running on the processor as much as possible, thereby improving the user experience.
本领域技术人员可以理解,参照图5描述的技术方案的可以与参照上述描述的任一实施例结合,从而具备上述描述的任一实施例所实现的技术效果。具体内容可以参照上述实施例的描述,其具体内容在此不再赘述。Those skilled in the art can understand that the technical solution described with reference to FIG. 5 can be combined with any embodiment described above, so as to have the technical effect achieved by any embodiment described above. For specific content, reference may be made to the description of the foregoing embodiments, and the specific content is not repeated here.
本公开实施方式还提供了一种电子设备,图6示出根据本公开一实施方式的电子设备的结构框图,如图6所示,电子设备303包括至少一个处理器301;以及与至少一个处理器301通信连接的存储器302;其中,存储器302存储有可被至少一个处理器301执行的指令,指令被至少一个处理器301执行以实现以下步骤:The embodiment of the present disclosure also provides an electronic device. FIG. 6 shows a structural block diagram of the electronic device according to an embodiment of the present disclosure. As shown in FIG. 6 , the electronic device 303 includes at least one processor 301; The memory 302 connected to the device 301 in communication; wherein, the memory 302 stores instructions that can be executed by at least one processor 301, and the instructions are executed by at least one processor 301 to implement the following steps:
本公开实施例中提供了一种处理器控制方法,其中,所述方法包括:An embodiment of the present disclosure provides a method for controlling a processor, wherein the method includes:
获取处理器的至少一个处理器核产生splitlock的速率以及至少一个处理器核对应的上限速率;Obtain the rate at which at least one processor core of the processor generates a splitlock and the upper limit rate corresponding to at least one processor core;
响应于至少一个处理器核中的目标处理器核产生splitlock的第一速率大于或等于目标处理器核对应的上限速率,降低目标处理器核的最高频率,和/或使目标处理器核触发对齐检查异常。In response to the target processor core in at least one processor core generating a first rate of splitlock greater than or equal to the upper limit rate corresponding to the target processor core, reducing the maximum frequency of the target processor core, and/or causing the target processor core to trigger alignment Check for exceptions.
结合第二方面,本公开在第二方面的第一种实现方式中,其中,降低目标处理器核的最高频率,包括:With reference to the second aspect, in the first implementation manner of the second aspect of the present disclosure, reducing the maximum frequency of the target processor core includes:
获取目标处理器核的降低后最高频率,并将目标处理器核的最高频率调整为降低后最高频率,直至目标处理器核产生splitlock的第二速率小于目标上限速率;Obtain the highest frequency after the reduction of the target processor core, and adjust the highest frequency of the target processor core to the highest frequency after the reduction, until the second rate at which the target processor core generates splitlock is less than the target upper limit rate;
其中,降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为降低后最高频率,Fc1为目标处理器核的降低前频率,R为目标上限速率,C1为第一速率。Among them, the highest frequency after reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , Ft 1 is the highest frequency after reduction, Fc 1 is the frequency before reduction of the target processor core, R is the target upper limit rate, and C 1 is the first a rate.
结合第二方面或第二方面的第一种实现方式,本公开在第二方面的第二种实现方式中,其中,方法还包括:With reference to the second aspect or the first implementation manner of the second aspect, the present disclosure is in the second implementation manner of the second aspect, wherein the method further includes:
获取当前目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
响应于第三速率小于目标上限速率,升高目标处理器核的最高频率。 In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
结合第二方面的第二种实现方式,本公开在第二方面的第三种实现方式中,其中,方法还包括:With reference to the second implementation of the second aspect, the present disclosure is in a third implementation of the second aspect, wherein the method further includes:
获取当前的频率调整计数值以及当前目标处理器核的升高前频率,频率调整计数值为从控制目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the pre-increase frequency of the current target processor core. The frequency adjustment count value starts from the moment when the frequency of the target processor core is lowered, and the frequency adjustment count threshold is continuously decremented according to the count decrement speed. ;
升高目标处理器核的最高频率,包括:Increase the maximum frequency of the target processor core, including:
根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,并将目标处理器核的最高频率设置为升高后最高频率,第三速率以及频率调整计数值均与升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value, and set the maximum frequency of the target processor core as the highest frequency after the increase. The third rate and the frequency adjustment count value are the same as the increase After the highest frequency negative correlation.
结合第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,根据升高前频率、第三速率以及频率调整计数值获取升高后最高频率,包括:In combination with the third implementation of the second aspect, in the fourth implementation of the second aspect of the present disclosure, the highest frequency after the increase is obtained according to the frequency before the increase, the third rate, and the frequency adjustment count value, including:
根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为升高前频率,R为目标上限速率,C2为第三速率,T为频率调整计数阈值,Tc为频率调整计数值。According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), obtain the highest frequency Ft 2 after the increase, where Fc 2 is the frequency before the increase, and R is the target upper limit rate, C 2 is the third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
结合第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,其中,方法还包括:With reference to the third implementation manner of the second aspect, the present disclosure is in a fourth implementation manner of the second aspect, wherein the method further includes:
响应于频率调整计数值为0,将目标处理器核的最高频率设置为处理器核最高频率。In response to the frequency adjustment count value being 0, the highest frequency of the target processor core is set as the highest frequency of the processor core.
图7是适于用来实现根据本公开一实施方式的方法的计算机系统的结构示意图。如图7所示,计算机系统400包括处理单元401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储部分408加载到随机访问存储器(RAM)403中的程序而执行上述附图所示的实施方式中的各种处理。在RAM403中,还存储有系统400操作所需的各种程序和数据。处理单元401、ROM402以及RAM403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。FIG. 7 is a schematic structural diagram of a computer system suitable for implementing a method according to an embodiment of the present disclosure. As shown in FIG. 7 , a computer system 400 includes a processing unit 401 that can execute the above-mentioned additional processing unit 401 according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage section 408 into a random access memory (RAM) 403. Various processes in the embodiment shown in the figure. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The processing unit 401 , ROM 402 and RAM 403 are connected to each other through a bus 404 . An input/output (I/O) interface 405 is also connected to bus 404 .
以下部件连接至I/O接口405:包括键盘、鼠标等的输入部分406;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分407;包括硬盘等的存储部分408;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分409。通信部分409经由诸如因特网的网络执行通信处理。驱动器410也根据需要连接至I/O接口405。可拆卸介质411,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器410上,以便于从其上读出的计算机程序根据需要被安装入存储部分408。其中,所述处理单元401可实现为CPU、GPU、TPU、FPGA、NPU等处理单元。The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 408 including a hard disk, etc. and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 410 as necessary so that a computer program read therefrom is installed into the storage section 408 as necessary. Wherein, the processing unit 401 may be implemented as a processing unit such as a CPU, GPU, TPU, FPGA, or NPU.
特别地,根据本公开的实施方式,上文参考附图描述的方法可以被实现为计算机软件程序。示例性的,本公开的实施方式包括一种计算机程序产品,其包括有形地包含在及其可读介质上的计算机程序,所述计算机程序包含用于执行附图中的方法的程序代码。在这 样的实施方式中,该计算机程序可以通过通信部分409从网络上被下载和安装,和/或从可拆卸介质411被安装。示例性的,本公开的实施方式包括一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现用于执行附图中的方法的程序代码。In particular, according to the embodiments of the present disclosure, the methods described above with reference to the accompanying drawings can be implemented as computer software programs. Exemplarily, the embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a readable medium thereof, the computer program including program code for performing the methods in the accompanying drawings. At this In such an embodiment, the computer program may be downloaded and installed from the network through the communication part 409, and/or may be installed from the removable medium 411. Exemplarily, the embodiments of the present disclosure include a readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, program codes for executing the methods in the drawings are implemented.
附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。示例性的,两个接连地表示的方框上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a roadmap or block diagram may represent a module, program segment, or part of code that contains one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules involved in the embodiments described in the present disclosure may be implemented by means of software or hardware. The described units or modules may also be set in the processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.
作为另一方面,本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中所述计算机系统中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本公开的方法。As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the computer system described in the above-mentioned implementation manners; or exist independently, A computer-readable storage medium that is not incorporated into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the methods described in the present disclosure.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。示例性的上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。 The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but should also cover the technical solutions made by the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of or equivalent features thereof. A technical solution formed by replacing the exemplary above-mentioned features with technical features disclosed in this disclosure (but not limited to) having similar functions.

Claims (14)

  1. 一种处理器,其中,所述处理器包括至少一个处理器核以及至少一个上限寄存器;A processor, wherein the processor includes at least one processor core and at least one upper limit register;
    所述上限寄存器,用于储存上限速率,当目标上限寄存器对应的目标处理器核产生分裂锁(splitlock)的第一速率大于或等于所述目标上限寄存器中的目标上限速率时,所述目标处理器核的最高频率被降低,和/或所述目标处理器核触发对齐检查异常,所述目标上限寄存器属于所述至少一个上限寄存器,所述目标处理器核属于所述至少一个处理器核。The upper limit register is used to store the upper limit rate. When the first rate at which the target processor core corresponding to the target upper limit register generates a split lock (splitlock) is greater than or equal to the target upper limit rate in the target upper limit register, the target processing The highest frequency of the processor core is reduced, and/or the target processor core triggers an alignment check exception, the target upper limit register belongs to the at least one upper limit register, and the target processor core belongs to the at least one processor core.
  2. 根据权利要求1所述的处理器,其中,所述处理器还包括频率控制逻辑电路,所述至少一个处理器核以及所述至少一个上限寄存器均与所述频率控制逻辑电路连接;The processor according to claim 1, wherein the processor further comprises a frequency control logic circuit, and both the at least one processor core and the at least one upper limit register are connected to the frequency control logic circuit;
    所述频率控制逻辑电路,用于获取至少一个处理器核产生splitlock的速率,并从至少一个上限寄存器读取上限速率,响应于所述第一速率大于或等于所述目标上限速率,降低所述目标处理器核的最高频率。The frequency control logic circuit is configured to obtain the rate at which at least one processor core generates a splitlock, and read the upper limit rate from at least one upper limit register, and reduce the The maximum frequency of the target processor core.
  3. 根据权利要求2所述的处理器,其中,所述降低所述目标处理器核的最高频率,包括:The processor according to claim 2, wherein said reducing the highest frequency of the target processor core comprises:
    获取所述目标处理器核的降低后最高频率,并将所述目标处理器核的最高频率调整为所述降低后最高频率,直至所述目标处理器核产生splitlock的第二速率小于所述目标上限速率;Acquiring the reduced maximum frequency of the target processor core, and adjusting the maximum frequency of the target processor core to the reduced maximum frequency until the second rate at which the target processor core generates a splitlock is less than the target upper limit rate;
    其中,所述降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为所述降低后最高频率,Fc1为所述目标处理器核的降低前频率,R为所述目标上限速率,C1为所述第一速率。Wherein, the highest frequency after the reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , where Ft 1 is the highest frequency after the reduction, Fc 1 is the frequency before reduction of the target processor core, and R is the Target upper limit rate, C1 is the first rate.
  4. 根据权利要求2或3所述的处理器,其中,所述频率控制逻辑电路,还用于:The processor according to claim 2 or 3, wherein the frequency control logic circuit is further used for:
    获取当前所述目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
    响应于所述第三速率小于所述目标上限速率,升高所述目标处理器核的最高频率。In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
  5. 根据权利要求4所述的处理器,其中,所述频率控制逻辑电路,还用于:The processor according to claim 4, wherein the frequency control logic circuit is further used for:
    获取当前的频率调整计数值以及当前所述目标处理器核的升高前频率,所述频率调整计数值为从控制所述目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the current frequency before the increase of the target processor core, the frequency adjustment count value starts from the moment when the frequency of the target processor core is controlled, and adjusts the frequency according to the count decrement speed The counting threshold is continuously decremented;
    所述升高所述目标处理器核的最高频率,包括:Said raising the highest frequency of said target processor core includes:
    根据所述升高前频率、所述第三速率以及所述频率调整计数值获取升高后最高频率,并将所述目标处理器核的最高频率设置为所述升高后最高频率,所述第三速率以及所述频率调整计数值均与所述升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value, and set the highest frequency of the target processor core as the highest frequency after the increase, the Both the third rate and the frequency adjustment count value are negatively correlated with the increased highest frequency.
  6. 根据权利要求5所述的处理器,其中,所述根据所述升高前频率、所述第三速率以 及所述频率调整计数值获取升高后最高频率,包括:The processor according to claim 5, wherein said frequency before said boosting, said third rate at And the frequency adjustment count value obtains the highest frequency after the increase, including:
    根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为所述升高前频率,R为所述目标上限速率,C2为所述第三速率,T为所述频率调整计数阈值,Tc为所述频率调整计数值。According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), the highest frequency Ft 2 after the increase is obtained, wherein Fc 2 is the frequency before the increase, and R is The target upper limit rate, C 2 is the third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
  7. 根据权利要求5所述的处理器,其中,所述处理器还包括用于储存所述频率调整计数阈值的频率调整计数阈值寄存器以及用于储存所述频率调整计数值的频率调整计数值寄存器,所述频率调整计数阈值寄存器以及所述频率调整计数值寄存器均与所述频率控制逻辑电路连接;The processor according to claim 5, wherein the processor further comprises a frequency adjustment count threshold register for storing the frequency adjustment count threshold and a frequency adjustment count value register for storing the frequency adjustment count value, Both the frequency adjustment count threshold register and the frequency adjustment count value register are connected to the frequency control logic circuit;
    所述频率控制逻辑电路,用于在控制所述目标处理器核的频率降低的时刻,将从所述频率调整计数阈值寄存器读取的频率调整计数阈值储存在所述频率调整计数值寄存器中,并根据所述计数递减速度对所述频率调整计数值寄存器中的频率调整计数阈值进行持续递减;The frequency control logic circuit is configured to store the frequency adjustment count threshold read from the frequency adjustment count threshold register in the frequency adjustment count value register when controlling the frequency reduction of the target processor core, and continuously decrementing the frequency adjustment count threshold in the frequency adjustment count value register according to the count decrement speed;
    所述获取当前的频率调整计数值,包括:The acquisition of the current frequency adjustment count value includes:
    从所述频率调整计数值寄存器中读取当前的频率调整计数值。Read the current frequency adjustment count value from the frequency adjustment count value register.
  8. 一种处理器控制方法,其中,所述方法包括:A processor control method, wherein the method comprises:
    获取处理器的至少一个处理器核产生分裂锁(splitlock)的速率以及至少一个处理器核对应的上限速率;Obtain the rate at which at least one processor core of the processor generates a split lock (splitlock) and the upper limit rate corresponding to at least one processor core;
    响应于所述至少一个处理器核中的目标处理器核产生splitlock的第一速率大于或等于所述目标处理器核对应的上限速率,降低所述目标处理器核的最高频率,和/或使所述目标处理器核触发对齐检查异常。In response to the first rate at which the target processor core in the at least one processor core generates a splitlock is greater than or equal to the upper limit rate corresponding to the target processor core, reduce the maximum frequency of the target processor core, and/or enable The target processor core triggers an alignment check exception.
  9. 根据权利要求8所述的处理器控制方法,其中,所述降低所述目标处理器核的最高频率,包括:The processor control method according to claim 8, wherein said reducing the highest frequency of the target processor core comprises:
    获取所述目标处理器核的降低后最高频率,并将所述目标处理器核的最高频率调整为所述降低后最高频率,直至所述目标处理器核产生splitlock的第二速率小于所述目标上限速率;Acquiring the reduced maximum frequency of the target processor core, and adjusting the maximum frequency of the target processor core to the reduced maximum frequency until the second rate at which the target processor core generates a splitlock is less than the target upper limit rate;
    其中,所述降低后最高频率是根据Ft1=Fc1*R/C1获取,Ft1为所述降低后最高频率,Fc1为所述目标处理器核的降低前频率,R为所述目标上限速率,C1为所述第一速率。Wherein, the highest frequency after the reduction is obtained according to Ft 1 =Fc 1 *R/C 1 , where Ft 1 is the highest frequency after the reduction, Fc 1 is the frequency before reduction of the target processor core, and R is the Target upper limit rate, C1 is the first rate.
  10. 根据权利要求8或9所述的处理器控制方法,其中,所述方法还包括:The processor control method according to claim 8 or 9, wherein the method further comprises:
    获取当前所述目标处理器核产生splitlock的第三速率;Obtain the third rate at which the current target processor core generates a splitlock;
    响应于所述第三速率小于所述目标上限速率,升高所述目标处理器核的最高频率。In response to the third rate being less than the target upper limit rate, increasing the maximum frequency of the target processor core.
  11. 根据权利要求10所述的处理器控制方法,其中,所述方法还包括: The processor control method according to claim 10, wherein said method further comprises:
    获取当前的频率调整计数值以及当前所述目标处理器核的升高前频率,所述频率调整计数值为从控制所述目标处理器核的频率降低的时刻开始,根据计数递减速度对频率调整计数阈值进行持续递减得到;Obtain the current frequency adjustment count value and the current frequency before the increase of the target processor core, the frequency adjustment count value starts from the moment when the frequency of the target processor core is controlled, and adjusts the frequency according to the count decrement speed The counting threshold is continuously decremented;
    所述升高所述目标处理器核的最高频率,包括:Said raising the highest frequency of said target processor core includes:
    根据所述升高前频率、所述第三速率以及所述频率调整计数值获取升高后最高频率,并将所述目标处理器核的最高频率设置为所述升高后最高频率,所述第三速率以及所述频率调整计数值均与所述升高后最高频率负相关。Obtain the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value, and set the highest frequency of the target processor core as the highest frequency after the increase, the Both the third rate and the frequency adjustment count value are negatively correlated with the increased highest frequency.
  12. 根据权利要求11所述的处理器控制方法,其中,所述根据所述升高前频率、所述第三速率以及所述频率调整计数值获取升高后最高频率,包括:The processor control method according to claim 11, wherein said obtaining the highest frequency after the increase according to the frequency before the increase, the third rate and the frequency adjustment count value comprises:
    根据Ft2=Fc2+Fc2*(R/C2-1)*((T-Tc)/T)获取升高后最高频率Ft2,其中Fc2为所述升高前频率,R为所述目标上限速率,C2为所述第三速率,T为所述频率调整计数阈值,Tc为所述频率调整计数值。According to Ft 2 =Fc 2 +Fc 2 *(R/C 2 -1)*((T-Tc)/T), the highest frequency Ft 2 after the increase is obtained, wherein Fc 2 is the frequency before the increase, and R is The target upper limit rate, C 2 is the third rate, T is the frequency adjustment count threshold, and Tc is the frequency adjustment count value.
  13. 一种电子设备,其特征在于,包括存储器和至少一个处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述至少一个处理器执行以实现权利要求8-12任一项所述的方法步骤。An electronic device, characterized by comprising a memory and at least one processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the at least one processor To realize the method steps described in any one of claims 8-12.
  14. 一种计算机可读存储介质,其上存储有计算机指令,其特征在于,该计算机指令被处理器执行时实现权利要求8-12任一项所述的方法步骤。 A computer-readable storage medium on which computer instructions are stored, wherein the computer instructions are executed by a processor to implement the method steps described in any one of claims 8-12.
PCT/CN2023/074407 2022-02-21 2023-02-03 Processor, control method, device, and medium WO2023155695A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210156946.1 2022-02-21
CN202210156946.1A CN114691592A (en) 2022-02-21 2022-02-21 Processor, control method, device, and medium

Publications (1)

Publication Number Publication Date
WO2023155695A1 true WO2023155695A1 (en) 2023-08-24

Family

ID=82137867

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074407 WO2023155695A1 (en) 2022-02-21 2023-02-03 Processor, control method, device, and medium

Country Status (2)

Country Link
CN (1) CN114691592A (en)
WO (1) WO2023155695A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691592A (en) * 2022-02-21 2022-07-01 阿里巴巴(中国)有限公司 Processor, control method, device, and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286115A1 (en) * 2016-04-01 2017-10-05 James A. Coleman Apparatus and method for non-serializing split locks
CN109643293A (en) * 2016-08-30 2019-04-16 英特尔公司 It detects bus locking condition and bus is avoided to lock
CN111124947A (en) * 2018-10-31 2020-05-08 阿里巴巴集团控股有限公司 Data processing method and device
CN112579158A (en) * 2019-09-27 2021-03-30 英特尔公司 Apparatus, method and system for non-writeback capability of processor
CN114691592A (en) * 2022-02-21 2022-07-01 阿里巴巴(中国)有限公司 Processor, control method, device, and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286115A1 (en) * 2016-04-01 2017-10-05 James A. Coleman Apparatus and method for non-serializing split locks
CN109643293A (en) * 2016-08-30 2019-04-16 英特尔公司 It detects bus locking condition and bus is avoided to lock
CN111124947A (en) * 2018-10-31 2020-05-08 阿里巴巴集团控股有限公司 Data processing method and device
CN112579158A (en) * 2019-09-27 2021-03-30 英特尔公司 Apparatus, method and system for non-writeback capability of processor
CN114691592A (en) * 2022-02-21 2022-07-01 阿里巴巴(中国)有限公司 Processor, control method, device, and medium

Also Published As

Publication number Publication date
CN114691592A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US10089266B2 (en) Power saving feature for storage subsystems
WO2021073130A1 (en) Frequency modulation method and apparatus for processor, and computing device
US10467106B2 (en) Data processing method, data processing system, and non-transitory computer program product for controlling a workload delay time
WO2023155695A1 (en) Processor, control method, device, and medium
CN107209543B (en) Clock rate adjustment for processing unit
CN110941395B (en) Dynamic random access memory, memory management method, system and storage medium
EP3440531B1 (en) Enhanced dynamic clock and voltage scaling (dcvs) scheme
WO2022222721A1 (en) Computational resource scheduling method and apparatus
US20210192046A1 (en) Resource Management Unit for Capturing Operating System Configuration States and Managing Malware
KR20210001883A (en) Method and apparatus for processing set of loop instructions, device and medium
US11782761B2 (en) Resource management unit for capturing operating system configuration states and offloading tasks
TW201314433A (en) Server system and power managing method data thereof
CN110795323A (en) Load statistical method, device, storage medium and electronic equipment
CN108205503B (en) Hardware drive compatible method and terminal
CN109388609B (en) Data processing method and device based on acceleration core
WO2019114044A1 (en) Image processing method and device, electronic apparatus, and computer readable storage medium
WO2024021485A1 (en) Processor performance adjustment method and apparatus, electronic device and storage medium
US11630698B2 (en) Resource management unit for capturing operating system configuration states and swapping memory content
CN107436795A (en) A kind of method for ensureing the online migration service quality of virtual machine
WO2019028987A1 (en) Data processing method, electronic device and computer readable storage medium
US10955901B2 (en) Saving power in the command processor using queue based watermarks
US20210057420A1 (en) Method of controlling performance boosting of semiconductor device and semiconductor device performing the method
US11451615B1 (en) Probabilistic per-file images preloading
CN113485805B (en) Distributed computing adjustment method, device and equipment based on heterogeneous acceleration platform
CN116467235B (en) DMA-based data processing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23755698

Country of ref document: EP

Kind code of ref document: A1