Energy saving method, central processing unit and computing equipment
By obtaining the CPU core occupancy rate and adjusting the non-core operating frequency, the problem of high power consumption of computing devices in high performance mode is solved, and the energy-saving effect of reducing power consumption at low occupancy is achieved.
Patent Information
- Application Number
- CN202310639142.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
AI Technical Summary
Existing computing devices are in high-power consumption state at all times in high-performance mode, making it difficult to effectively reduce power consumption.
By obtaining the occupancy rate of the CPU core and adjusting the non-core operating frequency to a relatively low first frequency when the occupancy rate is less than or equal to the preset threshold, the CPU power consumption is reduced.
While ensuring CPU performance, the power consumption of computing equipment can be effectively reduced and energy-saving effects can be achieved.
Smart Images

Figure CN119065485A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an energy-saving method, a central processing unit and a computing device. Background Art
[0002] The working modes of the central processing unit (CPU) usually include high-performance mode, energy-saving mode, balanced mode, and custom mode. In order to ensure the performance of the computing device, the CPU usually runs in high-performance mode. In high-performance mode, the computing device is always in a high-power consumption state.
[0003] Therefore, how to effectively reduce the power consumption of computing devices has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide an energy-saving method, a central processing unit, and a computing device, which can effectively reduce the power consumption of the computing device.
[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0006] In a first aspect, a power saving method is provided for a computing device, the computing device comprising a CPU, the CPU comprising a core and a non-core, the core running at a base frequency or an overclocked frequency, the method comprising: obtaining the occupancy rate of the core; determining a first frequency corresponding to the occupancy rate of the core, when the occupancy rate of the core is less than or equal to a preset threshold, the first frequency is less than a second frequency, the second frequency being a high frequency in the operating frequency range of the non-core; adjusting the operating frequency of the non-core to the first frequency.
[0007] In this solution, the computing device includes a CPU, and the CPU includes a core and a non-core. When the CPU runs in high-performance mode, the core runs at a base frequency or an overclocked frequency. When the core runs at a base frequency or an overclocked frequency, the occupancy rate of the core is obtained, and the first frequency corresponding to the occupancy rate of the core is determined. Since the first frequency is less than the second frequency when the occupancy rate of the core is less than or equal to a preset threshold, the operating frequency of the non-core is adjusted to the first frequency. Compared with the related art in which the core runs at a base frequency or an overclocked frequency, the non-core runs at a high frequency (i.e., the second frequency) in the operating frequency range, the operating frequency of the non-core can be reduced when the core is at a low occupancy rate (i.e., less than or equal to a preset threshold), so that when the core runs at a base frequency or an overclocked frequency and the core is at a low occupancy rate, the power consumption of the CPU is effectively reduced, thereby effectively reducing the power consumption of the computing device, and further achieving energy saving effects.
[0008] In one possible implementation, a correspondence table is stored in a computing device, and the correspondence table includes multiple occupancies and frequencies corresponding to each of the multiple occupancies; determining a first frequency corresponding to the occupancy of a core includes: obtaining the correspondence table; and determining, based on the core occupancy and the correspondence table, that the frequency corresponding to the core occupancy is the first frequency.
[0009] In this implementation, a correspondence table is pre-stored in the computing device, so that after the core occupancy is obtained, the frequency corresponding to the core occupancy is determined as the first frequency according to the core occupancy and the correspondence table. Since the correspondence between the core occupancy and the first frequency is pre-established, different core occupancies can correspond to appropriate frequencies, thereby avoiding the CPU performance degradation caused by the non-core operating frequency being too low, and further helping to achieve the effective reduction of CPU power consumption while ensuring CPU performance.
[0010] In another possible implementation, after determining that the frequency corresponding to the core occupancy rate is the first frequency, the method further includes: refreshing the Advanced Configuration and Power Management ACPI table, the refreshed ACPI table including the first frequency; adjusting the non-core operating frequency to the first frequency, including: adjusting the non-core operating frequency to the first frequency based on the ACPI table.
[0011] In this implementation, a specific method for adjusting the operating frequency of the non-core is provided. Specifically, the ACPI table is refreshed by BIOS so that the refreshed ACPI table includes the first frequency, so that the first frequency is determined by reading the ACPI table, and then the operating frequency of the non-core is adjusted to the first frequency, and the implementation process is simple and convenient.
[0012] In another possible implementation, the CPU is a CPU that runs a basic input and output system BIOS and an operating system OS; determining a first frequency corresponding to the core occupancy rate includes: during the process of the CPU running the BIOS, the BIOS determines the first frequency corresponding to the core occupancy rate; adjusting the non-core operating frequency to the first frequency includes: during the process of the CPU running the BIOS, the BIOS sends an interrupt signal to the operating system OS; during the process of the CPU running the OS, the OS adjusts the non-core operating frequency to the first frequency in response to the interrupt signal.
[0013] In this implementation, after the BIOS determines the first frequency corresponding to the core occupancy rate, it triggers the OS to adjust the non-core operating frequency to the first frequency by sending an interrupt signal to the OS. Since the OS in the related art has the function of adjusting the non-core operating frequency, sending an interrupt signal to the OS by the BIOS to trigger the OS to perform the operation of adjusting the non-core operating frequency helps to fully utilize the execution capability of the OS, so that there is no need to separately set a control program for adjusting the non-core operating frequency.
[0014] In another possible implementation, the interrupt signal includes an SCI signal or an SMI signal.
[0015] In this implementation, the interrupt signal includes an SCI signal or an SMI signal, which helps to improve the diversity of interrupt signal types.
[0016] In another possible implementation, refreshing the advanced configuration and power management ACPI table includes: during the process of the CPU running the BIOS, the BIOS refreshes the advanced configuration and power management ACPI table; the OS responds to the interrupt signal and adjusts the non-core operating frequency to the first frequency, including: the OS responds to the interrupt signal and adjusts the non-core operating frequency to the first frequency based on the ACPI table.
[0017] This implementation provides a specific method for the OS to adjust the non-core operating frequency to the first frequency. Specifically, the ACPI table is refreshed by the BIOS so that the refreshed ACPI table includes the first frequency, and the OS adjusts the non-core operating frequency by reading the first frequency in the ACPI table. Since the OS has the function of reading the ACPI table, by writing the first frequency into the ACPI table, the OS adjusts the non-core operating frequency by reading the ACPI table, and the implementation process is simple and convenient.
[0018] In another possible implementation, determining the first frequency corresponding to the core occupancy rate includes: during the CPU running the BIOS, the BIOS determines the first frequency corresponding to the core occupancy rate; adjusting the non-core operating frequency to the first frequency includes: during the CPU running the BIOS, the BIOS adjusts the non-core operating frequency to the first frequency.
[0019] In this implementation method, after the BIOS determines the first frequency, the BIOS adjusts the non-core operating frequency to the first frequency. In this way, the BIOS does not need to send an interrupt signal to the OS to trigger the OS to perform the operation of adjusting the non-core operating frequency. This not only helps to improve the efficiency of adjusting the non-core operating frequency, but also helps to avoid affecting the task currently being executed by the OS.
[0020] In another possible implementation, determining the first frequency corresponding to the core occupancy includes: if the core occupancy is less than or equal to a preset threshold and the current operating frequency of the non-core is greater than or equal to the second frequency, determining the first frequency corresponding to the core occupancy.
[0021] This implementation method not only helps to reselect a lower frequency for the non-core when the current operating frequency of the non-core is too high (i.e., higher than the frequency corresponding to the current occupancy of the core) so as to reduce the current operating frequency of the non-core and thus reduce the power consumption of the CPU, but also helps to avoid determining the frequency corresponding to the core occupancy too frequently and increasing the workload.
[0022] In another possible implementation, when the core occupancy rate is greater than a preset threshold, the first frequency is greater than or equal to the second frequency.
[0023] This implementation method sets the first frequency to be greater than or equal to the second frequency when the core occupancy rate is greater than a preset threshold. In this way, when the core occupancy rate is high (i.e., greater than the preset threshold), the non-core can continue to run at a higher frequency (such as the first frequency greater than or equal to the second frequency), thereby helping to ensure the performance of the core at high occupancy rate.
[0024] In another possible implementation, determining the first frequency corresponding to the core occupancy includes: if the core occupancy is greater than a preset threshold and the current operating frequency of the non-core is less than the second frequency, determining the first frequency corresponding to the core occupancy.
[0025] In this implementation, when the core occupancy rate is greater than a preset threshold, that is, the core is at a high occupancy rate, and the current operating frequency of the non-core is less than the second frequency, that is, the operating frequency of the non-core is low, the operating frequency to be used is re-determined for the non-core, that is, the operating frequency to be used is greater than or equal to the second frequency, thereby helping to ensure that when the core occupancy rate is greater than the preset threshold, the non-core runs at a higher frequency, avoiding the non-core operating frequency being unable to match the core requirements, resulting in the non-core operating frequency being too low. The operating frequency affects the CPU performance, which in turn helps to ensure the performance of the core at high occupancy rates.
[0026] In another possible implementation, obtaining the core occupancy rate includes: obtaining the core occupancy rate at a preset time interval.
[0027] This implementation method pre-sets a suitable time interval, and obtains the core occupancy rate according to the preset time interval. In this way, if the preset threshold interval is set to be smaller, the corresponding frequency for the changed core occupancy rate can be determined in time after the core occupancy rate changes, and then the non-core can be adjusted in time to run at the frequency corresponding to the current core occupancy rate. For example, when the core is at a high occupancy rate, the non-core operating frequency is increased as soon as possible to ensure the performance of the CPU. When the core is at a low occupancy rate, the non-core operating frequency is lowered as soon as possible to reduce the CPU function and ensure energy saving. If the preset time interval is set to be larger, frequent acquisition of occupancy rate can be avoided, which increases the workload.
[0028] In another possible implementation, when the core occupancy rate is less than or equal to a preset threshold, the first frequency is less than the second frequency; adjusting the non-core operating frequency to the first frequency includes: if the core occupancy rate is less than or equal to the preset threshold and the current operating frequency of the non-core is greater than the first frequency, adjusting the non-core operating frequency to the first frequency.
[0029] This implementation method not only helps to adjust the non-core operating frequency to the first frequency in time when the current operating frequency of the non-core is too high (i.e., higher than the frequency corresponding to the current occupancy rate of the core) to reduce the current operating frequency of the non-core, thereby reducing the power consumption of the CPU, but also helps to avoid too frequent adjustment of the non-core operating frequency and increase in workload.
[0030] In another possible implementation, when the core occupancy rate is greater than a preset threshold, the first frequency is greater than or equal to the second frequency; the non-core operating frequency is adjusted to the first frequency, including: if the core occupancy rate is greater than the preset threshold and the current operating frequency of the non-core is less than the first frequency, the non-core operating frequency is adjusted to the first frequency.
[0031] This implementation helps to avoid the situation where the operating frequency of the non-core cannot match the requirements of the core when the core is operating at a high occupancy rate, resulting in the performance of the core being affected due to the non-core operating frequency being too low.
[0032] In another possible implementation, the correspondence table includes multiple correspondences, and the multiple correspondences include at least one of a first correspondence, a second correspondence, a third correspondence, a fourth correspondence, a fifth correspondence, and a sixth correspondence; wherein the first correspondence includes a correspondence between a first occupancy rate and a minimum frequency that can be used by the non-core, and the first occupancy rate is greater than or equal to 0% and less than or equal to 50%; the second correspondence includes a correspondence between a second occupancy rate and a sum of a minimum frequency that can be used by the non-core and 200MHz, and the second occupancy rate is greater than 50% and less than or equal to 60%; the third correspondence includes a correspondence between a third occupancy rate and a third frequency, and the third occupancy rate is greater than 60% and less than or equal to 70%, the third frequency is greater than or equal to 40%*non-core base frequency, and less than or equal to 50%*non-core base frequency; the fourth corresponding relationship includes the corresponding relationship between the fourth occupancy rate and the fourth frequency, the fourth occupancy rate is greater than 70% and less than or equal to 80%, the fourth frequency is greater than 50%*non-core base frequency, and less than or equal to 60%*non-core base frequency; the fifth corresponding relationship includes the corresponding relationship between the fifth occupancy rate and the fifth frequency, the fifth occupancy rate is greater than 80% and less than or equal to 90%, the fifth frequency is greater than 60%*non-core base frequency, and less than or equal to 70%*non-core base frequency; the sixth corresponding relationship includes the corresponding relationship between the sixth occupancy rate and the non-core base frequency, the sixth occupancy rate is greater than 90% and less than or equal to 100%.
[0033] In this implementation, by setting a suitable corresponding relationship, it is helpful to reduce the power consumption of the CPU while maintaining the performance of the CPU unchanged.
[0034] In a second aspect, an energy-saving device is provided, the device comprising: a functional unit for executing any one of the methods provided in the first aspect, the actions executed by each functional unit are implemented by hardware or by hardware executing corresponding software. For example, the energy-saving device may include an acquisition unit, a determination unit, and an adjustment unit; the acquisition unit is used to acquire the occupancy rate of the core; the determination unit is used to determine the first frequency corresponding to the occupancy rate of the core; wherein the first frequency is less than the second frequency, and the second frequency is the working frequency used by the non-core when the CPU runs in the target mode; and the adjustment unit is used to adjust the working frequency of the non-core to the first frequency.
[0035] In a third aspect, a CPU is provided, the CPU runs in a target mode, the CPU includes a core and a non-core; the CPU is used to obtain the core occupancy rate; the CPU is also used to determine a first frequency corresponding to the core occupancy rate; wherein the first frequency is less than a second frequency, and the second frequency is the working frequency used by the non-core when the CPU runs in the target mode; the CPU is also used to adjust the working frequency of the non-core to the first frequency.
[0036] It should be noted that, in the third aspect, the CPU can also be used to execute any possible implementation method in the first aspect.
[0037] In a fourth aspect, a computing device is provided, comprising: a CPU and a memory, wherein the CPU is connected to the memory, the memory is used to store computer-executable instructions, and the CPU executes the computer-executable instructions stored in the memory, thereby implementing any one of the methods provided in the first aspect.
[0038] In a fifth aspect, a chip is provided, the chip comprising: a CPU and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the CPU; the CPU is used to run the code instructions to execute any one of the methods provided in the first aspect above.
[0039] In a sixth aspect, a computer-readable storage medium is provided, storing computer execution instructions, which, when executed on a computer, enable the computer to execute any one of the methods provided in the first aspect.
[0040] In a seventh aspect, a computer program product is provided, comprising: computer execution instructions, which, when executed on a computer, cause the computer to execute any one of the methods provided in the first aspect.
[0041] Among them, the technical effects brought about by any implementation method in the second to seventh aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0043] Figure 2 A hierarchical schematic diagram of a computing device provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of power consumption of a CPU provided in an embodiment of the present application;
[0045] Figure 4 A flowchart of an energy-saving method provided in an embodiment of the present application;
[0046] Figure 5 A flowchart of another energy-saving method provided in an embodiment of the present application;
[0047] Figure 6 A schematic diagram of the structure of an energy-saving device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0049] In the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship between associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0050] Furthermore, in the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0051] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0052] The following is a brief introduction to the relevant terms in the embodiments of the present application.
[0053] System-supplied idle process: It can also be referred to as idle process. It refers to the system process that comes with the Windows operating system. It is a process virtualized by the core. The task of the idle process is to occupy the processor time when the operating system is not processing other processes (i.e. non-idle processes). In other words, when there are no available processes and the system is in an idle running state, the idle process is running. In other words, the idle process represents the idle state. The larger the value, the more idle the core is.
[0054] The following is an exemplary introduction to the system architecture of the embodiments of the present application.
[0055] like Figure 1, which is a schematic diagram of the structure of a computing device provided in an embodiment of the present application.
[0056] See also Figure 1 The computing device may include a CPU, and the CPU includes a core and an uncore.
[0057] The core contains the components that execute processor instructions, such as the arithmetic logic unit (ALU), floating point unit (FRU), level 1 cache (L1 cache), and level 2 cache (L2 cache).
[0058] Uncore, in terms of function, is responsible for functions other than those of the core, and plays an indispensable role in the performance and maintenance of CPU. Uncore includes quick path interconnect (QPI) controller, memory controller, L3 cache, peripheral component interconnect express (PCIE) controller, direct media interface (DMI) controller, storage controller, etc.
[0059] It should be noted that the embodiments of the present application do not limit the CPU architecture. For example, the CPU may be of X86 architecture, or may be of ARM architecture.
[0060] In the embodiment of the present application, the computing device may further include a motherboard, wherein the CPU may be installed on the motherboard.
[0061] In the embodiment of the present application, the computing device is configured with a first register, a second register and a third register.
[0062] Among them, the first register, the second register and the third register are software registers. That is to say, the first register, the second register and the third register are all registers in software form, or the first register, the second register and the third register all implement the functions of the registers in software form. It can also be understood that the first register, the second register or the third register can be a program code with register functions. The first register is used to indicate that the second register and the third register start counting. The second register is used to record the time when the core processes non-idle processes, and the third register is used to record the core clock cycle.
[0063] Taking the X86 architecture as an example, the model specific register (MSR) address of the first register may be 38Dh, the MSR address of the second register may be 30Ah (eg, 0X30Ah), and the MSR address of the third register may be 10h (eg, 0X10h).
[0064] Wherein, when the first register is in an enabled state, the second register and the third register start counting respectively, otherwise, the second register and the third register stop counting. Exemplarily, when the value in the first register is 00, 10, 11, the first register is in an enabled state. Based on this, the CPU writes 00, 10 or 11 into the first register, which can enable the first counter corresponding to the second register and the second counter corresponding to the third register to start counting, wherein the second counter is used to record the time when the core processes non-idle processes, and the third counter is used to record the core clock cycle. Afterwards, the value recorded by the first counter and the value recorded by the second counter are written into the second register and the third register respectively, so that the second register stores the time when the core processes non-idle processes, and the third register stores the core clock cycle.
[0065] It should be noted that the above 00, 10, and 11 are only exemplary descriptions, and other numerical values can also be used to indicate that the first register is in an enabled state, and the implementation of this application does not impose any restrictions on this.
[0066] It should be noted that in the embodiment of the present application, the time for the core to process a non-idle process can be considered as the time for the CPU in the related technology to process a non-idle process, and the core clock cycle can be considered as the CPU clock cycle in the related technology.
[0067] It should be noted that, depending on the CPU architecture, the first register, the second register and the third register may be different, or may be the same, and this implementation does not impose any limitation on this.
[0068] Need to explain, Figure 1 The computing device shown is only a structural diagram of a computing device that can be applied to the embodiments of the present application, and does not constitute a limitation on the computing device to which the embodiments of the present application are applicable.
[0069] Optionally, the computing device may be a network device or a terminal device.
[0070] The network device may include a server, etc. The server may be a physical server, or may be two or more physical servers that share different responsibilities and cooperate with each other to realize various functions of the server.
[0071] Exemplarily, the server may be a blade server, a high-density server, a rack server, a tower server, or the like.
[0072] Terminal devices may include mobile phones, augmented reality (AR) devices, virtual reality (VR) devices, personal digital assistants (PDA), ultra-mobile personal computers (UMPC), tablet computers, laptops, netbooks, desktop computers, all-in-one computers, etc.
[0073] In the embodiment of the present application, the computing device includes a hardware layer and a software layer, and the software layer is a program code running on the hardware layer. The software layer can be divided into several layers, and the layers communicate with each other through software interfaces.
[0074] The hardware layer includes computer hardware such as CPU and motherboard. Figure 1 shown.
[0075] The software layer includes the application layer, operating system (OS) layer, and BIOS layer from top to bottom. Figure 2 shown.
[0076] The BIOS layer is the most basic software code loaded on the computer hardware system. The BIOS layer is the bottom-level running program below the OS layer. It is an abstract layer between the computer hardware and the OS layer, used to set up the hardware and prepare for the OS layer to run.
[0077] The OS layer includes the operating system program code. The operating system can be Linux, Windows, or vxWorks, etc.
[0078] The application layer includes some program codes that run the application.
[0079] It should be noted that the BIOS layer can also be referred to as BIOS, and the OS layer can also be referred to as OS. Based on this, the BIOS in the following text can also be understood as the BIOS layer, and the OS can also be understood as the OS layer.
[0080] The following is a brief introduction to the relevant terms of the embodiments of the present application.
[0081] The core frequency is the core's operating frequency and is used to characterize the CPU's computing speed.
[0082] The core external frequency is the operating frequency of the system bus connected to the core.
[0083] The core multiplier is the multiple of the difference between the core external frequency and the core main frequency. In other words, the core main frequency = core external frequency * core multiplier.
[0084] The core base frequency is the basic frequency of the core and the maximum operating frequency that the CPU can use when the load is not high. The core base frequency is the product of the core external frequency and the maximum multiple of the core multiplier. For example, if the core external frequency is 99.95MHz and the core multiplier is 8-49 times, the core base frequency is 99.95*49=4897.55MHz (about 4.8GHz).
[0085] It can be understood that the core base frequency can also be considered as the rated frequency of the core, that is, the maximum frequency of the core before overclocking.
[0086] Overclocking refers to a technical method of increasing the core frequency by adjusting hardware settings to achieve performance that exceeds the base frequency.
[0087] Core overclocking is the ultimate performance of the core. Core overclocking can be achieved by overclocking the external frequency or overclocking the multiplier. In other words, the core overclocking is the frequency obtained by raising the external frequency of the core or the multiplier of the core. For example, the core external frequency is 99.95MHz, the core multiplier is 8-49, and the overclocking multiplier is 50 times. At this time, the core main frequency = 99.95*50 = 4997.5MHz. Since the core main frequency is obtained by overclocking, it is also called core overclocking.
[0088] Turbo frequency refers to the technical means of using Turbo Boost Technology, Thermal Velocity Boost technology, etc. to increase the core frequency, thereby achieving performance exceeding the rated frequency.
[0089] It can be understood that when the core is in a non-overclocked, non-turbo state, the core main frequency is less than or equal to the core base frequency. In other words, in a non-overclocked, non-turbo state, the core base frequency is the maximum frequency that the core can use.
[0090] It should be noted that the core main frequency, core external frequency, core multiplier, core base frequency, and core overclocking in the embodiments of the present application can be considered as the CPU main frequency, CPU external frequency, CPU multiplier, CPU base frequency, and CPU overclocking in the related technology.
[0091] The uncore base frequency refers to the maximum frequency in the frequency range supported by the uncore. In other words, the uncore base frequency is the maximum frequency that the uncore can use.
[0092] The non-core high frequency refers to the frequency belonging to the high frequency band in the frequency range supported by the non-core, wherein the high frequency band includes the maximum frequency in the non-core frequency range.
[0093] Exemplarily, the non-core high frequency is greater than or equal to the non-core base frequency multiplied by a preset percentage.
[0094] The preset percentage may be 75%.
[0095] Exemplarily, when the non-core operating frequency range is 800MHz-2400MHz, the non-core base frequency is 2400MHz, and when the preset percentage is 75%, 1800MHz≤high frequency≤2400MHz, that is, the non-core high frequency can be any frequency value between 1800MHz-2400MHz, for example, the non-core high frequency can be 2000MHz.
[0096] It should be noted that the embodiment of the present application does not limit the numerical value of the preset percentage, and the above is only an exemplary description.
[0097] The following is a brief introduction to the CPU operating mode.
[0098] The CPU operating modes include high-performance mode, energy-saving mode, balanced mode, custom mode, etc.
[0099] High-performance mode refers to the highest performance mode of the CPU in base frequency or overclocked state (such as the number of CPU operations per second). When the CPU runs in high-performance mode, the CPU performance is higher than when the CPU runs in other modes.
[0100] Energy-saving mode refers to the mode with the highest energy efficiency ratio. That is, when the CPU runs in energy-saving mode, the energy efficiency ratio of the CPU is higher than that of the CPU running in other modes. The energy efficiency ratio can also be called energy efficiency score. The energy efficiency ratio of the CPU is equal to the performance of the CPU / the power consumption of the CPU. For example, it can be the number of operations per second of the CPU / the average power consumption of the CPU.
[0101] Balanced mode means that the CPU runs in high-performance mode when the load is high, and runs in energy-saving mode when the load is low.
[0102] It should be noted that the embodiments of the present application do not limit high load and low load. For example, high load can be when the core occupancy rate is greater than 90%, and low load can be when the core occupancy rate is less than or equal to 90%.
[0103] Custom mode refers to the highest performance mode of the CPU when it is not overclocked.
[0104] It should be noted that the system architecture described in the embodiments of the present application is for the purpose of more clearly illustrating the technical solutions of the embodiments of the present application, and does not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0105] In the related art, when the CPU runs in high-performance mode, the core runs at base frequency or overclocking, and the non-core runs at high frequency (i.e., the non-core high frequency mentioned above). When the CPU runs in high-performance mode, the core operating frequency, non-core operating frequency, and CPU power consumption at different times are as follows: Figure 3 shown.
[0106] Exemplarily, the base frequency of the core is 2500 MHz and the high frequency of the uncore is 2400 MHz.
[0107] The first line is used to represent the operating frequency of the core, specifically, the operating frequency of the core at different times. The second line is used to represent the operating frequency of the non-core, specifically, the operating frequency of the non-core at different times. The third line is used to represent the power consumption of the CPU, specifically, the power consumption of the CPU at different times. The horizontal axis is used to represent time in seconds, and the vertical axis is used to represent frequency in MHz.
[0108] from Figure 3 It can be seen that when the CPU in the related art runs in high-performance mode, after the CPU starts and runs smoothly, such as after 601s, the core runs at the base frequency and the non-core runs at the high frequency, and the computing device is always in a high power consumption state.
[0109] Currently, the number of computing devices deployed in data centers is huge. For example, a data center with a power consumption of 8 megawatts (MW) usually houses up to 9,000 computing devices. The CPU's working modes usually include high-performance mode, energy-saving mode, balanced mode, and custom mode. In order to ensure the performance of the computing device, the CPU usually runs in high-performance mode. In high-performance mode, each computing device is always in a high-power consumption state.
[0110] Therefore, in high-performance mode, how to effectively reduce the power consumption of computing devices becomes a technical problem that needs to be solved urgently.
[0111] In view of this, an embodiment of the present application provides an energy-saving method for a computing device, wherein the computing device includes a CPU, and the CPU includes a core and a non-core. When the core runs at a base frequency or an overclocked frequency, the occupancy rate of the core is obtained, and a first frequency corresponding to the occupancy rate of the core is determined. Since the first frequency is less than the second frequency when the occupancy rate of the core is less than or equal to a preset threshold, the second frequency is a high frequency in the operating frequency range of the non-core. Therefore, the operating frequency of the non-core is adjusted to the first frequency, relative to the related art in which the core runs at a base frequency or an overclocked frequency, and the non-core runs at a high frequency (i.e., the second frequency) in the operating frequency range, the operating frequency of the non-core can be reduced when the core is at a low occupancy rate (i.e., less than or equal to a preset threshold), so that when the core runs at a base frequency or an overclocked frequency and the core is at a low occupancy rate, the power consumption of the CPU is effectively reduced, thereby effectively reducing the power consumption of the computing device, and further achieving energy-saving effects.
[0112] For ease of understanding, the following combination Figure 1 to Figure 2 The system architecture shown provides an exemplary introduction to the energy-saving method provided in the embodiments of the present application.
[0113] Figure 4 is a flow chart of an energy saving method according to an exemplary embodiment. In this embodiment, the energy saving method includes the following S401-S403.
[0114] In this embodiment, the operation mode of the CPU is a high-performance mode, and the core runs at a base frequency or an overclocked frequency.
[0115] S401: Obtain the core occupancy rate.
[0116] In this embodiment, the core occupancy rate refers to the percentage of resources used by the programs running on the core, so the core occupancy rate can be used to characterize the CPU resources occupied by the programs running on the core. Since the CPU resources are fixed, the higher the core occupancy rate, the more programs are running on the core.
[0117] It should be noted that the core occupancy rate may also be referred to as the core occupancy rate. That is to say, in this embodiment, the core occupancy rate and the core occupancy rate have the same meaning.
[0118] Optionally, S401 includes: obtaining the core occupancy rate at a preset time interval.
[0119] It should be noted that this embodiment does not limit the specific value of the preset time interval, and the preset time interval can be determined according to the actual operation of the CPU.
[0120] For example, if the core occupancy rate changes frequently, the preset time interval can be set relatively small, such as 1 second, 2 seconds, etc. If the core occupancy rate changes infrequently, the preset time interval can be set relatively large, such as 5 seconds, 10 seconds, etc.
[0121] In this embodiment, by presetting a suitable time interval, and obtaining the core occupancy rate according to the preset time interval, if the preset threshold interval is set to be small, after the core occupancy rate changes, the corresponding frequency can be determined in time for the changed core occupancy rate, and then the non-core can be adjusted in time to run at the frequency corresponding to the current core occupancy rate. For example, when the core is at a high occupancy rate, the non-core operating frequency is increased as soon as possible to ensure the performance of the CPU, and when the core is at a low occupancy rate, the non-core operating frequency is lowered as soon as possible to reduce the function of the CPU and ensure the energy saving effect. If the preset time interval is set to be large, frequent acquisition of occupancy rate can be avoided, which increases the workload. In this embodiment, the core occupancy rate can be obtained by BIOS.
[0122] It can be understood that the BIOS obtains the core occupancy rate, which can be considered as the BIOS obtaining the core occupancy rate during the process of the CPU running the BIOS, or it can also be considered as the CPU calling the BIOS to execute the operation of obtaining the core occupancy rate.
[0123] It should be noted that the following description of BIOS performing other operations and OS performing a certain operation (such as OS adjusting the non-core operating frequency to the first frequency) can refer to the above-mentioned description of BIOS obtaining the core occupancy rate, which will not be repeated here.
[0124] It should be noted that S401 may also be implemented by other software programs or hardware, and the above is only an exemplary description. In the following, S401 is described exemplarily by taking S401 implemented by BIOS as an example.
[0125] In the following, the process of BIOS obtaining the core occupancy rate is exemplarily described in combination with steps 1 to 3.
[0126] Optionally, step one: BIOS enables the first register to enable the second register and the third register to count.
[0127] Exemplarily, the BIOS enabling the first register may be that the BIOS sets the first bit and the second bit of the first register to 1 respectively, wherein the first bit is set to 1 to indicate that the second register starts counting, and the second bit is set to 1 to indicate that the third register starts counting.
[0128] It should be noted that this embodiment does not limit the first bit and the second bit. For example, when the first register is a 38Dh register, the first bit may be bit4, and the second bit may be bit5.
[0129] Step 2: BIOS reads the data in the second register and the data in the third register.
[0130] The data in the second register is the time for the core to process non-idle processes, and the data in the third register is the clock cycle of the core.
[0131] In this embodiment, the BIOS reads the time of the core processing non-idle processes in a unit clock cycle stored in the second register by sending a read instruction to the second register. The BIOS reads the core clock cycle stored in the third register by sending a read instruction to the third register.
[0132] It should be noted that this embodiment does not limit the manner of reading the second register and the third register, and the above is only an exemplary description.
[0133] Step 3: The BIOS determines the ratio of the time the core processes the non-idle process to the core clock cycle as the core occupancy rate.
[0134] In other words, core occupancy = the ratio of the time the core processes non-idle processes to the core clock cycle.
[0135] It should be noted that this embodiment does not limit the method for obtaining the core occupancy rate. The methods shown in steps 1 to 3 above are only exemplary. This embodiment can also use other methods in related technologies to obtain the core occupancy rate.
[0136] S402: Determine a first frequency corresponding to the core occupancy rate.
[0137] In this embodiment, corresponding frequencies are pre-set for different core occupancies, that is, the first frequency corresponding to the core occupancy is a pre-set frequency.
[0138] The first frequency increases as the core occupancy rate increases, and decreases as the core occupancy rate decreases. In addition, the frequencies corresponding to different core occupancies may be different, or may be the same, and there is no limitation on this.
[0139] In this embodiment, after the core occupancy rate is obtained, the BIOS determines the first frequency corresponding to the core occupancy rate.
[0140] It should be noted that S402 may also be implemented by other software programs or hardware, and the above is only an exemplary description. In the following, S402 is described exemplarily by taking S402 implemented by BIOS as an example.
[0141] In this embodiment, the first frequency includes multiple cases, and the following is exemplified by case 1 and case 2.
[0142] Case 1: when the core occupancy rate is less than or equal to a preset threshold, the first frequency is less than the second frequency; when the core occupancy rate is greater than the preset threshold, the first frequency is greater than or equal to the second frequency.
[0143] It should be noted that the second frequency is a fixed value, that is, when the CPU runs in high-performance mode, the operating frequency used by the non-core is a fixed value.
[0144] It should be noted that in case 1, the corresponding frequency pre-set for the core occupancy rate less than or equal to the preset threshold is less than the second frequency, and the corresponding frequency pre-set for the core occupancy rate greater than or equal to the preset threshold is greater than or equal to the second frequency.
[0145] In the related art, when the CPU runs in high-performance mode, the OS adjusts the core operating frequency to the base frequency or overclocked, and adjusts the non-core operating frequency to a high frequency according to the core operating frequency. For example, when the CPU runs in high-performance mode, the core operating frequency is 4997.5MHz, the non-core operating frequency is 2000MHz, and the second frequency is 2000MHz.
[0146] In this embodiment, there is no restriction on the specific value of the preset threshold, and the preset threshold can be set according to the actual situation. For example, if the CPU performance requirement is higher when the core occupancy rate is greater than 80%, the preset threshold can be set to 80%, and if the CPU performance requirement is higher when the core occupancy rate is greater than 90%, the preset threshold can be set to 90%.
[0147] In this embodiment, when the core occupancy rate is less than or equal to a preset threshold, the first frequency is less than the second frequency, and when the core occupancy rate is greater than the preset threshold, the first frequency is greater than or equal to the second frequency. This not only helps to ensure that when the core occupancy rate is low, the non-core operating frequency can be reduced, thereby reducing the power consumption of the CPU and achieving energy saving, but also helps to ensure that when the core occupancy rate is high, the non-core operating frequency can meet the performance requirements of the core, thereby ensuring the performance of the core at high occupancy rates.
[0148] Case 2: the first frequency is smaller than the second frequency.
[0149] Case 2 can be considered as: when the core occupancy rate is greater than a preset threshold, or less than or equal to the preset threshold, the first frequency is less than the second frequency.
[0150] It should be noted that, in situation 2, the corresponding frequency pre-set for any core occupancy is smaller than the second frequency.
[0151] In this embodiment, when the core occupancy rate is set to be greater than a preset threshold, or less than or equal to a preset threshold, the first frequency is lower than the second frequency. In this way, when the core occupancy rate is any value, the non-core operating frequency can be reduced, thereby ensuring that the CPU power consumption can be reduced when the core occupancy rate is any value, which helps to ensure that energy saving can be achieved throughout the entire process of the CPU running in target mode.
[0152] In this embodiment, after the BIOS obtains the core occupancy, regardless of the relationship between the core occupancy and the preset threshold and the relationship between the current operating frequency of the non-core and the second frequency, the operation of determining the first frequency corresponding to the core occupancy is performed.
[0153] This helps to determine different corresponding frequencies for different core occupancies, thereby achieving different operating frequencies used by the non-core when the core occupancies are different. Relative to different core occupancies, the non-core uses the same operating frequency, which can enable the non-core to use a lower operating frequency when the core occupancy is low, and a higher operating frequency when the core occupancy is high. This helps to improve the energy saving effect of the CPU while ensuring the performance of the CPU.
[0154] Exemplarily, when the core occupancy rate is less than or equal to a preset threshold value and the current operating frequency of the non-core is greater than or equal to the second frequency, the first frequency corresponding to the core occupancy rate is determined. Since the first frequency is less than the second frequency, re-determining the first frequency corresponding to the core occupancy rate helps to reduce the operating frequency of the non-core, thereby effectively reducing the power consumption of the CPU, and further effectively reducing the power consumption of the computing device, achieving energy saving effect.
[0155] Exemplarily, when the core occupancy rate is less than or equal to a preset threshold and the current operating frequency of the non-core is less than the second frequency, the first frequency corresponding to the core occupancy rate is determined. In this way, different corresponding frequencies can be determined for different core occupancies, thereby achieving different operating frequencies used by the non-core when the core occupancy rates are different, which helps to improve the matching degree between the core occupancy rate and the non-core operating frequency.
[0156] Exemplarily, when the core occupancy rate is greater than a preset threshold and the current operating frequency of the non-core is greater than or equal to the second frequency, the first frequency corresponding to the core occupancy rate is determined. Since the first frequency is less than the second frequency, re-determining the first frequency corresponding to the core occupancy rate helps to reduce the operating frequency of the non-core, thereby effectively reducing the power consumption of the CPU, and further effectively reducing the power consumption of the computing device, achieving energy saving effects.
[0157] Exemplarily, when the core occupancy is greater than a preset threshold and the current operating frequency of the non-core is less than the second frequency, the first frequency corresponding to the core occupancy is determined. In this way, different corresponding frequencies can be determined for different core occupancies, thereby achieving different operating frequencies used by the non-core when the core occupancy is different, which helps to improve the matching degree between the core occupancy and the non-core operating frequency.
[0158] In this embodiment, there are multiple implementations for determining the first frequency corresponding to the core occupancy rate. A possible implementation is described below by way of example through S402a-S402b.
[0159] In this possible implementation, a corresponding relationship table is pre-stored in the computing device, and the corresponding relationship table includes multiple occupancies and frequencies corresponding to each of the multiple occupancies. In other words, the corresponding relationship table includes multiple corresponding relationships between the multiple occupancies and the multiple frequencies. Among them, one corresponding relationship includes one occupancy and one frequency, and the one corresponding relationship can be any one of the corresponding relationships in the corresponding relationship table.
[0160] The occupancies in different corresponding relationships are different and / or the frequencies in different corresponding relationships are different.
[0161] It should be noted that the correspondence table may be in a tabular form, or may be in a non-tabular form, and this embodiment does not impose any limitation on this.
[0162] It should be noted that the occupancy rate in the corresponding relationship table is the occupancy rate of the core, and the frequency in the corresponding relationship table is the frequency of the non-core.
[0163] In this embodiment, the magnitude relationship between the frequencies in different corresponding relationships and the second frequency can refer to the above-mentioned cases 1 to 2, which will not be described in detail here.
[0164] Optionally, S402a: BIOS obtains a correspondence table.
[0165] In this embodiment, after the BIOS obtains the correspondence table, the BIOS determines a target correspondence from the correspondence table according to the core occupancy rate, wherein the target correspondence includes the core occupancy rate.
[0166] Exemplarily, the correspondence table includes correspondence a, which is a correspondence between 70% to 80% (i.e., occupancy is 70% to 80%) and (50% to 60%)*non-core base frequency (i.e., 50%*non-core base frequency to 60%*non-core base frequency). Based on this, if the occupancy of the core is 75%, correspondence a is the target correspondence.
[0167] S402b: The BIOS determines that the frequency corresponding to the core occupancy rate is the first frequency.
[0168] In this embodiment, since the target correspondence relationship includes the occupancy rate of the core, the BIOS may determine the frequency in the target correspondence relationship as the first frequency.
[0169] Exemplarily, based on the above example, that is, correspondence a is the target correspondence, if the non-core base frequency is 2400MHz, the first frequency is greater than or equal to 50%*2400MHz and less than or equal to 60%*2400MHz, that is, the first frequency is any frequency between 1200MHz and 1440MHz.
[0170] In this embodiment, by pre-storing the correspondence table in the computing device, after obtaining the core occupancy rate, the frequency corresponding to the core occupancy rate can be determined as the first frequency according to the plurality of pairs of information. Since the correspondence between the core occupancy rate and the first frequency is pre-established, different core occupancies can correspond to appropriate frequencies, which can not only avoid the CPU performance degradation due to the non-core operating frequency being too low, but also avoid the energy saving effect due to the non-core operating frequency being too high, thereby helping to effectively reduce the CPU power consumption while ensuring the CPU performance.
[0171] In this embodiment, the correspondence table includes at least one correspondence. By way of example, the correspondence table may include a first correspondence, a second correspondence, a third correspondence, a fourth correspondence, a fifth correspondence, and a sixth correspondence.
[0172] Among them, the first corresponding relationship, the second corresponding relationship, the third corresponding relationship, the fourth corresponding relationship, the fifth corresponding relationship and the sixth corresponding relationship are shown in Table 1.
[0173] Table 1
[0174] Core occupancy Uncore frequency The first correspondence 0%~50% The lowest frequency that can be used by the uncore The second correspondence 50%~60% The lowest frequency that can be used by non-core is +200MHz The third correspondence 60%~70% (40%~50%)*Non-core base frequency The fourth correspondence 70%~80% (50%~60%)*Non-core base frequency The fifth correspondence 80%~90% (60%~70%)*Non-core base frequency The sixth correspondence 90%~100% Uncore base frequency
[0175] Referring to Table 1, the first corresponding relationship includes a corresponding relationship between a first occupancy rate and a minimum frequency available to the non-core, wherein the first occupancy rate is greater than or equal to 0% and less than or equal to 50%.
[0176] The second corresponding relationship includes a corresponding relationship between the second occupancy rate and the sum of the lowest frequency available for non-core and 200 MHz, wherein the second occupancy rate is greater than 50% and less than or equal to 60%.
[0177] The third corresponding relationship includes a corresponding relationship between a third occupancy rate and a third frequency, wherein the third occupancy rate is greater than 60% and less than or equal to 70%, and the third frequency is greater than or equal to 40%*non-core base frequency and less than or equal to 50%*non-core base frequency.
[0178] The fourth corresponding relationship includes a corresponding relationship between a fourth occupancy rate and a fourth frequency interval, wherein the fourth occupancy rate is greater than 70% and less than or equal to 80%, and the fourth frequency is greater than 50%*non-core base frequency and less than or equal to 60%*non-core base frequency.
[0179] The fifth corresponding relationship includes the corresponding relationship between the fifth occupancy rate and the fifth frequency interval, wherein the fifth occupancy rate is greater than 80% and less than or equal to 90%, and the fifth frequency is greater than 60%*non-core base frequency and less than or equal to 70%*non-core base frequency.
[0180] The sixth corresponding relationship includes a corresponding relationship between a sixth occupancy rate and a non-core base frequency, wherein the sixth occupancy rate is greater than 90% and less than or equal to 100%.
[0181] It should be noted that for the first occupancy rate and the second occupancy rate, the first occupancy rate may be less than 50% and the second occupancy rate may be greater than or equal to 50%. For the related descriptions between other occupancies in the correspondence table, reference may be made to the descriptions of the first occupancy rate and the second occupancy rate, which will not be repeated here.
[0182] It should be noted that for the third frequency and the fourth frequency, the third frequency may be less than 50%*non-core base frequency, and the fourth frequency may be greater than or equal to 50%*non-core base frequency. For the related descriptions between other frequencies in the corresponding relationship table, reference may be made to the descriptions of the third frequency and the fourth frequency, which will not be repeated here.
[0183] In this embodiment, through the above six groups of corresponding relationships, at different core occupancies, not only can the CPU performance be guaranteed to remain unchanged, but also the CPU power consumption can be effectively reduced.
[0184] In this embodiment, after S402, the energy saving method further includes: refreshing an advanced configuration and power interface (ACPI) table, and the refreshed ACPI table includes the first frequency.
[0185] In this solution, after determining the first frequency corresponding to the core occupancy rate, the first frequency is recorded in the ACPI table by refreshing the ACPI table. Compared with using a newly created file to record the first frequency, using the existing ACPI table to record the first frequency is simple, convenient, and easier to implement.
[0186] S403: Adjust the operating frequency of the non-core to the first frequency.
[0187] It should be noted that the operating frequency of the non-core in S403 refers to the current operating frequency of the non-core.
[0188] For example, the first frequency is 1200 Mhz, before executing S403, the operating frequency of the non-core is 2400 Mhz, and after executing S403, the operating frequency of the non-core is 1200 Mhz.
[0189] In this embodiment, S403 may include: adjusting the operating frequency of the non-core to the first frequency based on the ACPI table.
[0190] In this embodiment, the operating frequency of the non-core is adjusted by setting based on the ACPI table. In this way, the operating frequency to be used by the non-core can be determined from the ACPI table, which is simple, convenient and easy to implement.
[0191] In this embodiment, adjusting the operating frequency of the non-core to the first frequency may include: if the current operating frequency of the non-core is not equal to the first frequency, adjusting the operating frequency of the non-core to the first frequency.
[0192] For example, if the first frequency is 1200Mhz and the current operating frequency of the non-core is 2400Mhz, that is, the current operating frequency of the non-core is not equal to the first frequency, then the operating frequency of the non-core is adjusted to 1200Mhz. If the current operating frequency of the non-core is 1200Mhz, then the operating frequency of the non-core does not need to be adjusted.
[0193] In this embodiment, the operating frequency of the non-core is adjusted to the first frequency only when the current operating frequency of the non-core is not equal to the first frequency. In this way, it is possible to avoid performing an adjustment operation when the operating frequency of the non-core is the first frequency, which helps to avoid performing invalid operations.
[0194] In this embodiment, how to adjust the core operating frequency to the first frequency includes multiple implementation methods, and the following is exemplified by methods a to b.
[0195] Method a, S403 includes the following steps 1 to 3.
[0196] Step 1: BIOS sends an interrupt signal to OS.
[0197] In this embodiment, after determining the first frequency corresponding to the core occupancy rate, the BIOS sends an interrupt signal to the OS, where the interrupt signal is used to trigger the OS to execute an operation of adjusting the non-core operating frequency to the first frequency.
[0198] In one example, the BIOS may send an interrupt signal to the OS in a software manner, and this type of interrupt signal may be referred to as a software interrupt. For example, the BIOS sets the value of the interrupt register to 1, thereby sending an interrupt signal to the OS.
[0199] In another example, the BIOS may send an interrupt signal to the OS via hardware, and this type of interrupt signal may be referred to as a hardware interrupt. For example, the BIOS pulls the output pin corresponding to the interrupt signal high for a period of time T and then pulls it low, thereby sending the interrupt signal to the OS.
[0200] It should be noted that this embodiment does not limit the specific manner in which the BIOS sends an interrupt signal to the OS, and the above two examples are only used as illustrative illustrations.
[0201] In this embodiment, the interrupt signal may include multiple types, which are described below using two examples.
[0202] In one example, the interrupt signal is a system control interrupt (SCI) signal.
[0203] In this example, since the SCI signal is a normal level interrupt, after the BIOS sends the SCI signal to the OS, the frequency adjustment operation triggered by the SCI signal is executed in parallel with other tasks that the OS needs to execute. This can avoid interrupting the process of the OS executing other tasks, thereby helping to avoid affecting other tasks that the OS needs to execute.
[0204] It should be noted that the frequency adjustment operation refers to an operation of adjusting the non-core operating frequency to the first frequency.
[0205] In another example, the interrupt signal is a system management interrupt (SMI) signal.
[0206] In this example, since the SMI signal is the highest level interrupt, triggering the OS to perform frequency adjustment operations through the SMI signal helps improve the efficiency of the OS in performing frequency adjustment operations, thereby achieving rapid adjustment of the non-core operating frequency after the core occupancy rate changes, thereby achieving rapid reduction of CPU power consumption to achieve energy saving effects.
[0207] Step 2: In response to the interrupt signal, the OS adjusts the operating frequency of the core to the first frequency.
[0208] In this embodiment, the OS includes an interrupt program corresponding to the interrupt signal. After the BIOS sends the interrupt signal to the OS, the OS responds to the interrupt signal and executes the interrupt program corresponding to the interrupt signal. The OS adjusts the operating frequency of the non-core to the first frequency by executing the interrupt program. After the operating frequency of the non-core is adjusted to the first frequency, the non-core will run at the first frequency.
[0209] In mode a, after the BIOS determines the first frequency corresponding to the core occupancy rate, it triggers the OS to adjust the non-core operating frequency to the first frequency by sending an interrupt signal to the OS. Since the OS has the function of adjusting the non-core operating frequency, sending an interrupt signal to the OS by the BIOS to trigger the OS to perform the operation of adjusting the non-core operating frequency helps to fully utilize the execution capability of the OS. In this way, there is no need to set up a control program for adjusting the non-core operating frequency separately, which helps to reduce the difficulty of implementing this solution.
[0210] There are multiple implementations for how the OS determines the first frequency, which are described below through Example 1 and Example 2.
[0211] Example 1: The OS determines the first frequency according to the ACPI table.
[0212] In this example, after determining the first frequency corresponding to the core occupancy rate, the BIOS refreshes the ACPI table, and the refreshed ACPI table includes the first frequency. Afterwards, the OS responds to the interrupt signal and adjusts the non-core operating frequency to the first frequency in the ACPI table according to the first frequency in the ACPI table.
[0213] In Example 1, the ACPI table is refreshed by BIOS, so that the refreshed ACPI table includes the first frequency, so that the OS can determine the first frequency by reading the ACPI table, and then adjust the non-core operating frequency to the first frequency. Since the OS has the function of reading the ACPI table, by writing the first frequency into the ACPI table, the OS determines the first frequency by reading the ACPI table, and the implementation process is simple and convenient.
[0214] Example 2: The OS determines the first frequency according to an interrupt program corresponding to the interrupt signal.
[0215] In this example, the OS includes multiple interrupt programs, and different interrupt programs correspond to different interrupt signals. One interrupt program includes one frequency, and different interrupt programs include different frequencies.
[0216] Based on this, after the BIOS determines the first frequency corresponding to the core occupancy rate, it sends an interrupt signal to the OS, the interrupt signal corresponds to the first interrupt program among the multiple interrupt programs, and the first interrupt program includes the first frequency. On this basis, the OS executes the first interrupt program, thereby adjusting the non-core operating frequency to the first frequency.
[0217] In Example 2, the OS determines the first frequency through different interrupt programs. In this way, the OS does not need to read the ACPI table before executing the interrupt program, which helps to increase the speed at which the OS performs frequency adjustment operations.
[0218] Mode b, S403 includes: BIOS adjusts the non-core operating frequency to the first frequency.
[0219] In method b, when BIOS determines the first frequency corresponding to the core occupancy rate, BIOS continues to adjust the non-core operating frequency to the first frequency. In this way, BIOS does not need to send an interrupt signal to OS to trigger OS to perform the operation of adjusting the non-core operating frequency. This not only helps to improve the efficiency of adjusting the non-core operating frequency, but also avoids affecting other tasks that OS needs to perform.
[0220] In this embodiment, the non-core operating frequency may also be adjusted to a sixth frequency, which is lower than the first frequency. This helps to increase the selection diversity of the non-core operating frequency while ensuring energy saving effects.
[0221] It is understandable that if the non-core operating frequency can be adjusted to be less than or equal to the first frequency, then the first frequency determined in S402 is equivalent to the upper limit of the non-core operating frequency, that is, the upper limit of the non-core operating frequency when the core runs at base frequency or overclocking.
[0222] Exemplarily, the energy-saving effect of this embodiment is exemplarily described below by taking the target computing device as an example.
[0223] When the CPU of the target computing device runs in high-performance mode and the solution of this embodiment is not used, the performance data of the CPU and the non-core operating frequency are shown in Table 2.
[0224] Table 2
[0225] Occupancy rate Operations per second Average power consumption Performance-to-power ratio Core operating frequency Uncore operating frequency 100% 12,379,198 1332 9293 3500 2100-2400 90% 11,196,386 1260 8886 3500 2400 80% 9,941,585 1189 8364 3500 2400 70% 8,691,548 1110 7833 3500 2400 60% 7,462,089 1033 7221 3500 2400 50% 6,226,729 961 6477 3500 2400 40% 4,979,291 890 5592 3500 2400 30% 3,736,564 820 4556 3500 2400 20% 2,487,796 750 3315 3500 2400 10% 1,242,212 682 1821 3500 2400 0% 0 576 0 2800 2400
[0226] See Table 2. Occupancy is used to characterize the occupancy of the core. Operations per second is also called the number of operations that the CPU can perform per second. Operations per second is used to characterize the performance of the CPU. The larger the value, the higher the performance. Average power consumption is used to characterize the power consumption of the CPU. The unit is W. The smaller the value, the lower the power consumption and the better the energy saving effect. Performance-power ratio is equal to operations per second / average power consumption. It is used to characterize the energy efficiency score of the CPU. The larger the value, the better the energy saving effect. The unit of the core operating frequency is MHz. The unit of the non-core operating frequency is MHz.
[0227] When the CPU of the target computing device runs in high-performance mode, when the solution of this embodiment is used, the performance data of the CPU and the non-core operating frequency are as shown in Table 3.
[0228] Table 3
[0229]
[0230]
[0231] It should be noted that for the relevant description of Table 3, reference can be made to the relevant description of Table 2, which will not be repeated here.
[0232] Referring to Table 2 and Table 3, when the core occupancy rate is 10%, if the solution of this embodiment is not used, the operating frequency of the non-core is 2400MHz, the operating frequency of the core is 3500MHz, the number of operations per second is 1,242,212, the average power consumption is 682W, and the performance-power ratio is 1821. If the solution of this embodiment is used, the operating frequency of the non-core is 800MHz, the operating frequency of the core is 3500MHz, the number of operations per second is 1,244,534, the average power consumption is 573W, and the performance-power ratio is 2170.
[0233] It can be seen that when the core occupancy rate is 10%, using the solution of this embodiment, the core operating frequency of the CPU remains unchanged, the non-core operating frequency of the CPU decreases by 1600 MHz (i.e., 2400-800), the performance of the CPU remains basically unchanged (increased by 2322), the average power consumption of the CPU decreases by 109 W (i.e., 682-573), and the performance-power ratio of the CPU increases by 349 (i.e., 2170-1821).
[0234] When the core occupancy rate is 70%, using the solution of this embodiment, the CPU operating frequency remains unchanged, the CPU non-core operating frequency decreases by 1200MHz (i.e., 2400-1200), the CPU performance remains basically unchanged (increased by 12781), the average power consumption of the CPU decreases by 108W (i.e., 1110-1002), and the CPU performance-power ratio increases by 850 (i.e., 8683-7833).
[0235] When the core occupancy rate is 90%, using the solution of this embodiment, the CPU operating frequency remains unchanged, the CPU performance remains basically unchanged (decreased by 8984), the average power consumption of the CPU decreases by 77W (i.e. 1260-1183), and the CPU performance-power ratio decreases by 570 (i.e. 8886-9456).
[0236] Based on the above, the solution of this embodiment, on the one hand, when the core occupancy rate is less than or equal to the preset threshold (such as 90%), it can not only effectively reduce the power consumption of the CPU and achieve energy saving effect, but also ensure that the performance of the CPU remains unchanged. On the other hand, when the core occupancy rate is greater than the preset threshold, the performance of the CPU can be not affected when the core occupancy rate is greater than the preset threshold.
[0237] The energy saving method described in the above embodiments can be referred to as a scheme for determining the first frequency corresponding to the core occupancy rate in any case. The following embodiments of the present application provide another energy saving method. Different from the above embodiments, the following embodiments can be referred to as a scheme for determining the first frequency corresponding to the core occupancy rate only when the preset conditions are partially met.
[0238] Figure 5 FIG. 5 is a flow chart of another energy-saving method according to an exemplary embodiment. In this embodiment, the energy-saving method includes the following S501 - S504 .
[0239] S501: Obtain the core occupancy rate.
[0240] It should be noted that for the relevant description of S501, reference can be made to the above-mentioned S401, which will not be repeated here.
[0241] S502: If the core occupancy rate is less than or equal to a preset threshold, and the current operating frequency of the non-core is greater than or equal to a second frequency, determine a first frequency corresponding to the core occupancy rate.
[0242] When the core occupancy rate is less than or equal to a preset threshold, the first frequency is less than the second frequency.
[0243] In this embodiment, after the BIOS obtains the core occupancy rate and the current operating frequency of the non-core, it determines whether to determine the first frequency corresponding to the core occupancy rate based on the relationship between the core occupancy rate and the preset threshold, and the relationship between the current operating frequency of the non-core and the second frequency.
[0244] If the core occupancy rate is less than or equal to the preset threshold and the current operating frequency of the non-core is greater than or equal to the second frequency, it means that the current core occupancy rate is low and the current operating frequency of the non-core is high. At this time, determining the first frequency corresponding to the core occupancy rate helps to re-select a lower frequency for the non-core when the current operating frequency of the non-core is too high, so as to reduce the current operating frequency of the non-core, thereby reducing the power consumption of the CPU and achieving energy saving effect.
[0245] It should be noted that the current operating frequency of the non-core may also be obtained by the OS and reported to the BIOS.
[0246] In addition, when the CPU is running in high-performance mode, the first frequency is determined only when the core occupancy is less than or equal to a preset threshold and the current operating frequency of the non-core is greater than or equal to the second frequency. This not only helps to reduce the power consumption of the CPU when running in high-performance mode, but also helps to avoid determining the frequency corresponding to the core occupancy too frequently, which increases the workload.
[0247] It can be understood that when the core occupancy rate is less than or equal to the preset threshold value and the current operating frequency of the non-core is less than the second frequency, it means that the current operating frequency of the core is already less than the operating frequency used by the non-core when the CPU is running in high-performance mode in the related art, and therefore, the current power consumption of the CPU is already lower than the power consumption when the CPU is running in high-performance mode in the related art. For example, referring to Table 1, when the second frequency is 2000MHz, the core occupancy rate is 75%, and the current operating frequency of the non-core is 45%*non-core base frequency (such as 2400MHz) or 65%*non-core base frequency.
[0248] Since the core occupancy rate is less than or equal to the preset threshold and the current operating frequency of the non-core is less than the second frequency, the CPU power consumption can be reduced even if the frequency is not reselected for the non-core. Therefore, when the core occupancy rate is less than or equal to the preset threshold and the current operating frequency of the non-core is less than the second frequency, the first frequency corresponding to the core occupancy rate is not determined, which can reduce the workload while ensuring the reduction of CPU power consumption.
[0249] It should be noted that for other related instructions about S502, reference can be made to the above-mentioned S402, which will not be repeated here.
[0250] Optionally, S503: if the core occupancy rate is greater than a preset threshold and the current operating frequency of the non-core is less than a second frequency, determine a first frequency corresponding to the core occupancy rate.
[0251] When the core occupancy rate is greater than or equal to a preset threshold, the first frequency is greater than or equal to the second frequency.
[0252] In this embodiment, after the BIOS obtains the core occupancy rate, if the core occupancy rate is greater than a preset threshold and the current operating frequency of the non-core is less than the second frequency, it means that the current occupancy rate of the core is high, while the current operating frequency of the non-core is low. At this time, determining the first frequency corresponding to the core occupancy rate helps to reselect a higher frequency for the non-core when the current operating frequency of the non-core is too low, so as to increase the current operating frequency of the non-core, thereby avoiding the situation where the non-core operating frequency cannot meet the performance requirements of the core when the core is running at a high occupancy rate, resulting in the non-core operating frequency being too low and affecting the CPU performance.
[0253] It can be understood that when the core occupancy rate is greater than the preset threshold and the current operating frequency of the non-core is greater than or equal to the second frequency, it means that the current operating frequency of the non-core can meet the performance requirements when the core is at a high occupancy rate, that is, the current operating frequency of the non-core can guarantee the performance of the CPU.
[0254] Since the core occupancy rate is greater than the preset threshold and the current operating frequency of the non-core is greater than the second frequency, the CPU performance can be guaranteed even if the frequency is not reselected for the non-core. Therefore, when the core occupancy rate is greater than the preset threshold and the current operating frequency of the non-core is greater than the second frequency, the first frequency corresponding to the core occupancy rate is not determined, which can reduce the workload while ensuring the CPU performance.
[0255] It should be noted that for other related instructions about S503, reference can be made to the above-mentioned S402, which will not be repeated here.
[0256] S504: Adjust the operating frequency of the non-core to the first frequency.
[0257] It should be noted that for the relevant description of S504, reference can be made to the above-mentioned S403, which will not be repeated here.
[0258] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the energy-saving device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0259] The embodiment of the present application can divide the energy-saving device into functional modules according to the above method. For example, the energy-saving device can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0260] For example, Figure 6 A possible structural diagram of the energy-saving device (referred to as energy-saving device 600) involved in the above embodiment is shown. The actions performed by the energy-saving device 600 are implemented by the CPU of the computing device or by the CPU executing corresponding software. The CPU includes a core and a non-core. The core runs at a base frequency or overclocking. The base frequency is the rated frequency of the core, and the overclocking is the frequency obtained by raising the external frequency or multiplication of the core. The energy-saving device includes an acquisition unit 601, a determination unit 602, and an adjustment unit 603. The acquisition unit 601 is used to obtain the occupancy rate of the core. For example, Figure 4 S401 shown, and Figure 5 S501 shown. The determining unit 602 is used to determine a first frequency corresponding to the core occupancy rate; wherein, when the core occupancy rate is less than or equal to a preset threshold, the first frequency is less than a second frequency, and the second frequency is a high frequency in the non-core operating frequency range. For example, Figure 4 S402 shown, and Figure 5 S502-S503 shown. The adjustment unit 603 is used to adjust the non-core operating frequency to the first frequency. For example, Figure 4 S403 shown, and Figure 5 S504 shown.
[0261] Optionally, a correspondence table is stored in the computing device, and the correspondence table includes multiple occupancies and frequencies corresponding to each of the multiple occupancies; the determination unit 602 is specifically used to: obtain the correspondence table; and determine, based on the core occupancy and the correspondence table, that the frequency corresponding to the core occupancy is the first frequency.
[0262] Optionally, after determining that the frequency corresponding to the core occupancy rate is the first frequency, the determination unit 602 is also used to: refresh the advanced configuration and power management ACPI table, the refreshed ACPI table includes the first frequency; the adjustment unit 603: based on the ACPI table, adjust the non-core operating frequency to the first frequency.
[0263] Optionally, the CPU is a CPU that runs a basic input and output system BIOS and an operating system OS; the determination unit 602 is specifically used to: determine a first frequency corresponding to the core occupancy rate during the CPU running the BIOS; the adjustment unit 603 is specifically used to: send an interrupt signal to the operating system OS during the CPU running the BIOS; and adjust the non-core operating frequency to the first frequency in response to the interrupt signal during the CPU running the OS.
[0264] Optionally, the interrupt signal includes a system control interrupt SCI signal or a system management interrupt SMI signal.
[0265] Optionally, the adjustment unit 603 is also used to: refresh the advanced configuration and power management ACPI table during the CPU running BIOS, and the refreshed ACPI table includes the first frequency; the adjustment unit 603 is specifically used to: respond to an interrupt signal, based on the ACPI table, adjust the non-core operating frequency to the first frequency.
[0266] Optionally, the determination unit 602 is specifically used to: determine the first frequency of the non-core according to the core occupancy rate during the CPU running the BIOS; the adjustment unit 603 is specifically used to: adjust the non-core operating frequency to the first frequency during the CPU running the BIOS.
[0267] Optionally, when the core occupancy rate is greater than a preset threshold, the first frequency is greater than or equal to the second frequency.
[0268] Optionally, the acquisition unit 601 is specifically configured to: acquire the core occupancy rate at a preset time interval.
[0269] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any energy-saving device 600 provided above and the description of its beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0270] The embodiment of the present application also provides a computing device, which includes a processor and a memory, the processor is connected to the memory, the memory stores a computer-executable instruction, and the energy-saving method in the above embodiment is implemented when the processor executes the computer-executable instruction. The embodiment of the present application does not impose any restrictions on the specific form of the computing device. For example, the computing device can be a terminal device or a network device. Among them, the terminal device can be called: terminal, user equipment (user equipment, UE), terminal equipment, access terminal, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user device, etc. The terminal device can be a mobile phone, augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, tablet computer, laptop computer, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc. The network device can be a server, etc. Among them, the server can be a physical or logical server, or it can be two or more physical or logical servers that share different responsibilities and cooperate with each other to realize the functions of the server.
[0271] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on a computing device, the computing device is enabled to execute any of the energy-saving methods executed by the computing devices provided above.
[0272] For the explanation of the relevant contents and description of the beneficial effects of any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, which will not be repeated here.
[0273] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned computing device. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gatearray, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0274] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computing device, the computing device executes any one of the energy-saving methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more servers that can be integrated with the medium. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0275] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.
[0276] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0277] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0278] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for energy saving, It is characterized in that For use in a computing device, the computing device includes a central processing unit (CPU), the CPU includes a core and a non-core, the core runs at a base frequency or an overclocked frequency; the method includes: Obtaining the occupancy rate of the core; Determine a first frequency corresponding to the occupancy rate of the core; when the occupancy rate of the core is less than or equal to a preset threshold, the first frequency is less than a second frequency, and the second frequency is a high frequency in the operating frequency range of the non-core; The non-core operating frequency is adjusted to the first frequency.
2. The method according to claim 1, It is characterized in that A corresponding relationship table is stored in the computing device, and the corresponding relationship table includes a plurality of occupancies and a frequency corresponding to each of the plurality of occupancies; The determining a first frequency corresponding to the occupancy rate of the core includes: Obtaining the corresponding relationship table; According to the occupancy rate of the core and the corresponding relationship table, a frequency corresponding to the occupancy rate of the core is determined as the first frequency.
3. The method according to claim 2, It is characterized in that After determining that the frequency corresponding to the occupancy rate of the core is the first frequency, the method further includes: refreshing an advanced configuration and power management ACPI table, wherein the refreshed ACPI table includes the first frequency; The adjusting the non-core operating frequency to the first frequency includes: adjusting the non-core operating frequency to the first frequency based on the ACPI table.
4. The method according to any one of claims 1 to 3, It is characterized in that The CPU is a CPU that runs a basic input and output system BIOS and an operating system OS; The determining the first frequency corresponding to the occupancy rate of the core comprises: during the process of the CPU running BIOS, the BIOS determining the first frequency corresponding to the occupancy rate of the core; The adjusting the non-core operating frequency to the first frequency includes: during the process of the CPU running the BIOS, the BIOS sends an interrupt signal to the operating system OS; during the process of the CPU running the OS, the OS responds to the interrupt signal and adjusts the non-core operating frequency to the first frequency.
5. The method according to claim 4, It is characterized in that The interrupt signal includes a system control interrupt SCI signal or a system management interrupt SMI signal.
6. The method according to any one of claims 1 to 3, It is characterized in that The determining of the first frequency corresponding to the occupancy rate of the core comprises: during the process of the CPU running BIOS, the BIOS determining the first frequency corresponding to the occupancy rate of the core; The adjusting the operating frequency of the non-core to the first frequency includes: during the process in which the CPU runs the BIOS, the BIOS adjusts the operating frequency of the non-core to the first frequency.
7. The method according to any one of claims 1 to 6, It is characterized in that When the occupancy rate of the core is greater than the preset threshold, the first frequency is greater than or equal to the second frequency.
8. The method according to any one of claims 1 to 6, It is characterized in that The obtaining the occupancy rate of the core includes: The occupancy rate of the core is obtained at preset time intervals.
9. A central processing unit CPU, It is characterized in that include: core and uncore, the core running at base frequency or overclocked; The CPU is used to obtain the occupancy rate of the core; The CPU is further configured to determine a first frequency corresponding to the occupancy rate of the core; when the occupancy rate of the core is less than or equal to a preset threshold, the first frequency is less than a second frequency, and the second frequency is a high frequency in the operating frequency range of the non-core; The CPU is further configured to adjust the operating frequency of the non-core to the first frequency.
10. A computing device, It is characterized in that include: The CPU according to claim 10.
Citation Information
Cited By
MCU dynamic power consumption adjusting method and system based on load prediction
CN121900606A
