CN-121979375-A - Method, device, equipment, chip and medium for adjusting processing core state
Abstract
The disclosure provides a processing core state adjustment method, device, equipment and medium, wherein the method comprises the steps of identifying whether a processing core of a processor has a core state adjustment requirement according to an operation state parameter of the processor, determining a target processing core to be adjusted and a target adjustment state required to be reached by the target processing core in response to identifying that the processing core has the core state adjustment requirement of the processor, and carrying out state adjustment on the target processing core. The method has the advantages that the data range used when the target processing core and the target adjustment state are determined is enlarged, the acquisition precision and accuracy of the target processing core and the target adjustment state are improved, the state adjustment precision of the processing core is further improved, the scene adaptability of the processing core state adjustment method is improved, the response speed of the state adjustment of the processing core is improved under the scene of realizing the state adjustment of the processing core based on hardware equipment, the software cost is reduced, and the stability of system operation is improved.
Inventors
- YU KUN
- TANG BO
- JIN YU
Assignees
- 北京玄戒技术有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (18)
- 1. A method of processing core state adjustment, the method comprising: determining whether a processing core of a processor has a core state adjustment requirement according to an operation state parameter of the processor; And in response to the core state adjustment requirement of the processor, determining a target adjustment processing core to be adjusted and a target adjustment state which the target adjustment processing core needs to reach, and performing state adjustment on the target adjustment processing core, wherein the target state comprises one of a sleep state and a low power consumption state.
- 2. The method of claim 1, wherein determining whether a core state adjustment requirement exists for a processing core of a processor based on an operating state parameter of the processor comprises: Based on the running state parameters, acquiring a core idle rate of the processing core, a core temperature of the processing core and a residual power supply quantity of the processing core; and determining whether the processing core has the state adjustment requirement according to at least one of the core idle rate, the core temperature and the residual power supply quantity.
- 3. The method of claim 2, wherein the obtaining the core idle rate of the processing core based on the operating state parameter comprises: obtaining a core idle clock cycle number of the processing core according to the core state signal of the processing core; And determining the core idle rate of the processing core according to the core idle clock period.
- 4. The method of claim 3, wherein said determining the core idle rate of the processing core from the core idle clock cycles comprises: Acquiring an idle state signal of the processing core from a core state signal of the processing core, and determining a core idle clock cycle number of the processing core based on the signal number of the idle state signal, wherein the idle state signal is a signal in a high level state in the core state signal; and acquiring the core idle clock cycle number of the processing core and the system clock cycle number of the system, and acquiring the core idle rate of the processing core according to the relation between the core idle clock cycle number and the system clock cycle number.
- 5. The method of claim 2, wherein the processing core has a determination condition that the state adjustment requirement needs to meet, comprising at least one of: the core idle rate is greater than or equal to a first idle rate threshold value, and the duration is greater than or equal to a preset duration; the residual power supply electric quantity is smaller than or equal to a preset electric quantity lower limit value; The input voltage of the processor is abnormal; The core temperature is greater than or equal to a preset core temperature upper limit.
- 6. The method of claim 1, wherein the determining a target adjustment processing core to be adjusted and a target adjustment state that the target adjustment processing core needs to reach in response to identifying that the processor has a core state adjustment requirement for a processing core, and to perform state adjustment for the target adjustment processing core, comprises: In response to identifying that the processor has the core state adjustment requirement, determining the target adjustment processing core and the corresponding target adjustment state based on a core idle rate of the processing core, a core temperature of the processing core, and a remaining power supply capacity of the processing core; and carrying out state adjustment on the target adjustment processing core based on the target adjustment state.
- 7. The method of claim 6, wherein the determining the target adjustment processing core and the corresponding target adjustment state based on a core idle rate, a core temperature, and a remaining power supply capacity of the processing core in response to identifying that the processor has the core state adjustment requirement comprises: For any processing core in the processor, responding to the core idle rate of the processing core being greater than or equal to a second idle rate threshold corresponding to a preset deep sleep state, wherein the core temperature of the processing core is less than or equal to a preset core temperature upper limit value, the residual power supply capacity of the processing core is greater than or equal to a preset power supply capacity lower limit value, determining that the processing core is the target adjustment processing core, and determining that the deep sleep state is the target adjustment state; Responding to the fact that the core idle rate of the processing core is larger than or equal to a third idle rate threshold corresponding to shallow sleep, the core temperature of the processing core is smaller than or equal to the core temperature upper limit value, the residual power supply electric quantity of the processing core is larger than or equal to the electric quantity lower limit value, determining that the processing core is the target adjustment processing core, and determining that a shallow sleep state is the target adjustment state; And in response to the core temperature of the processing core being greater than the core temperature upper limit and the remaining power supply capacity of the processing core being less than the remaining power supply capacity lower limit, determining that the processing core is the target adjustment processing core and determining that a deeper sleep state is the target adjustment state.
- 8. The method according to any one of claims 1-7, characterized in that the method comprises: And in response to identifying that the processor has core wake-up requirements, determining a target wake-up processing core to be woken up from sleep processing cores in a sleep state, and waking up the target wake-up processing core.
- 9. The method of claim 8, wherein the number of sleep processing cores is a plurality, and wherein the determining a target wake processing core to wake from among the sleep processing cores in a sleep state and waking the target wake processing core in response to identifying that the processor has a core wake requirement comprises: In response to the processor having a core wake-up demand, determining a target wake-up processing core to be woken up from shallow sleep processing cores included in a plurality of sleep processing cores, and waking up the target wake-up processing core; And after the target wake-up processing cores in the shallow sleep state are awakened, the processor still has the core wake-up requirement, and the next target wake-up processing core to be awakened is determined from the deep sleep processing cores included in the plurality of sleep processing cores and is awakened, wherein the target wake-up processing cores to be awakened in the deep sleep processing cores are determined based on the energy efficiency ratio of the deep sleep processing cores.
- 10. The method of claim 8, wherein the processor has a determination condition for a core wake requirement comprising at least one of: The working frequency of the processor is larger than or equal to a preset working frequency threshold value, and the load of the processor is larger than or equal to a preset load threshold value; The processor receives a new task load demand; The processor receives a system interrupt request; The core region temperature of the processor is greater than or equal to a set region temperature threshold. The module temperature of the corresponding power module of the processor is higher than or equal to a set module temperature threshold.
- 11. A processing core state adjustment device, the device comprising: the identification module is used for identifying whether a processing core of the processor has a core state adjustment requirement according to the running state parameters of the CPU; And the adjusting module is used for responding to the recognition that the processor has the core state adjusting requirement of the processing core, determining a target processing core to be adjusted and a target adjusting state which the target processing core needs to reach, and carrying out state adjustment on the target processing core, wherein the target state comprises one of a sleep state and a low-power consumption state.
- 12. The apparatus of claim 11, wherein the identification module is further configured to: Based on the running state parameters, acquiring a core idle rate of the processing core, a core temperature of the processing core and a residual power supply quantity of the processing core; and determining whether the processing core has the state adjustment requirement according to at least one of the core idle rate, the core temperature and the residual power supply quantity.
- 13. The apparatus of claim 11, wherein the adjustment module is further configured to: In response to identifying that the processor has the core state adjustment requirement, determining the target adjustment processing core and the corresponding target adjustment state based on a core idle rate of the processing core, a core temperature of the processing core, and a remaining power supply capacity of the processing core; and carrying out state adjustment on the target adjustment processing core based on the target adjustment state.
- 14. The apparatus of claim 13, wherein the adjustment module is further configured to: For any processing core in the processor, responding to a second idle rate threshold corresponding to a preset deep sleep state when the core idle rate of the processing core is larger than or equal to a preset core temperature upper limit value, determining that the processing core is the target processing core when the residual power supply capacity of the processing core is larger than or equal to a preset power supply lower limit value, and determining that the deep sleep state is the target adjustment state; Responding to the fact that the core idle rate of the processing core is larger than or equal to a third idle rate threshold corresponding to shallow sleep, the core temperature of the processing core is smaller than or equal to the core temperature upper limit value, the residual power supply electric quantity of the processing core is larger than or equal to the electric quantity lower limit value, determining that the processing core is the target adjustment processing core, and determining that a shallow sleep state is the target adjustment state; And in response to the core temperature of the processing core being greater than the core temperature upper limit and the remaining power supply capacity of the processing core being less than the remaining power supply capacity lower limit, determining that the processing core is the target adjustment processing core and determining that a deeper sleep state is the target adjustment state.
- 15. The apparatus according to any of claims 11-14, characterized in that the apparatus comprises a wake-up module for: And in response to identifying that the processor has core wake-up requirements, determining a target wake-up processing core to be woken up from sleep processing cores in a sleep state, and waking up the target wake-up processing core.
- 16. An electronic device, comprising: A processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute instructions to implement the method of any of claims 1-10.
- 17. A computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of any of claims 1-10.
- 18. A chip comprising one or more interface circuits and one or more processors, the interface circuits being operable to receive a signal and to send the signal to the processors, the signal comprising computer instructions stored in a memory which, when executed by the processors, cause the chip to perform the steps of the method of any one of claims 1 to 10.
Description
Method, device, equipment, chip and medium for adjusting processing core state Technical Field The present disclosure relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, a chip, and a medium for processing core state adjustment. Background With the development of technology, a multi-core processor has been widely applied to various fields of work and life of people, and in the running process of the multi-core processor, state adjustment may need to be performed on cores in the processor core to adjust the overall running power consumption of the CPU. Therefore, it is important how to perform accurate state adjustment on the core. Disclosure of Invention The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art. To this end, a first aspect of the present disclosure proposes a processing core state adjustment method. A second aspect of the present disclosure provides a processing core state adjustment device. A third aspect of the present disclosure proposes an electronic device. A fourth aspect of the present disclosure proposes a computer-readable storage medium. A fifth aspect of the present disclosure proposes a chip. The first aspect of the present disclosure proposes a method for adjusting a state of a processing core, including identifying, according to an operation state parameter of a processor, whether a core state adjustment requirement exists for a processing core of the processor, determining, in response to identifying that the core state adjustment requirement exists for the processing core for the processor, a target adjustment processing core to be adjusted and a target adjustment state to be reached by the target adjustment processing core, and performing state adjustment on the target adjustment processing core, where the target state includes one of a sleep state and a low power consumption state. The second aspect of the disclosure proposes a processing core state adjustment device, which comprises an identification module, an adjustment module and an adjustment module, wherein the identification module is used for identifying whether a core state adjustment requirement exists in a processing core of a processor according to an operation state parameter of the processor, and the adjustment module is used for determining a target adjustment processing core to be adjusted and a target adjustment state which the target adjustment processing core needs to reach in response to identifying that the core state adjustment requirement exists in the processing core of the processor, and performing state adjustment on the target adjustment processing core, wherein the target state comprises one of a sleep state and a low power consumption state. A third aspect of the present disclosure proposes an electronic device comprising a processor, a memory for storing executable instructions of the processor, wherein the processor is configured to execute the instructions to implement a processing core state adjustment method as proposed in the first aspect above. A fourth aspect of the present disclosure proposes a computer readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform a processing core state adjustment method as proposed in the first aspect above. A fifth aspect of the present disclosure proposes a chip comprising one or more interface circuits and one or more processors, the interface circuits being configured to receive a signal and to send the signal to the processors, the signal comprising computer instructions stored in a memory, which when executed by the processors, cause the chip to perform a method for processing core state adjustment as proposed in the first aspect above. According to the method and the device for adjusting the state of the processing core, whether the processor has the core state adjustment requirement or not is identified according to the running state parameters of the processor, the target adjustment processing core and the corresponding target adjustment state which need to be adjusted are further determined, the data range used when the target adjustment processing core and the target adjustment state are determined is enlarged, the acquisition precision and accuracy of the target adjustment processing core and the target adjustment state are improved, the state adjustment precision of the processing core is further improved, the scene adaptability of the state adjustment method of the processing core is improved, the response speed of the state adjustment of the processing core is improved under the scene of realizing the state adjustment of the processing core based on hardware equipment, the software cost is reduced, the running stability of a system is improved, and the state adjustment method of the processing core is optimized. It should be understood that the description herein