Frequency adjustment method and device

The BIOS-based frequency adjustment method and device dynamically adjust core and uncore frequencies according to CPU usage, addressing the issue of imprecise power management in servers, thereby reducing power consumption.

CN119088460APending Publication Date: 2024-12-06XINHUASAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411087269.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing server power management systems lack precise frequency adjustment accuracy for processors, leading to inefficient power consumption control.

Method used

A method and device that utilize a BIOS to dynamically adjust core and uncore frequencies based on CPU usage, using trigger instructions from a BMC to calculate and update frequency settings through register updates, implementing frequency adjustment strategies tailored to CPU load states.

Benefits of technology

Enhances power consumption reduction by accurately adjusting core and uncore frequencies, improving energy efficiency in servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088460A_ABST
    Figure CN119088460A_ABST
Patent Text Reader

Abstract

The invention provides a frequency adjusting method and device.The method is applied to a basic input output system BIOS, the BIOS is configured in a server, the server further comprises a baseboard management controller BMC and a central processing unit CPU, and the method comprises the steps that a trigger instruction sent by the BMC is received; obtaining a first clock cycle number and a second clock cycle number according to the trigger instruction; calculating the utilization rate of the CPU by using the first clock cycle number and the second clock cycle number; acquiring a first frequency matched with the utilization rate of the CPU from a first frequency dynamic adjustment strategy; and adjusting the current frequency of a first component included in the CPU according to the first frequency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a frequency adjustment method and device. Background Art

[0002] With the rapid development of technologies such as cloud computing, big data, and artificial intelligence, servers are constantly making breakthroughs in high-performance computing, data storage, and processing capabilities to cope with the growing amount of data and computing needs. At the same time, the power consumption of servers is also getting higher and higher. The power consumption of a single processor (for example, Intel) has reached up to 500W. Enterprises and data centers are also facing greater challenges in power consumption control and energy saving. Therefore, servers need to control the frequency of processors more flexibly and accurately to reduce power consumption as much as possible.

[0003] Currently, the server provides multiple C-state related options in the Basic Input Output System (BIOS), which can be used to control the core's operating frequency. For example, by setting multiple options, the core is kept at the lowest frequency when there is no load, and the core is awakened and reaches the highest frequency when there is load. Similarly, the uncore frequency option is also provided in the BIOS, which can be used to control the uncore's operating frequency. Similar to the core frequency adjustment, when there is no load, the uncore is kept at the lowest frequency, and when there is load, the uncore reaches the highest frequency.

[0004] In summary, although power consumption can be reduced by setting options, only two situations, core / uncore with load and without load, can be distinguished, and the core / uncore frequencies reach the highest frequency and the lowest frequency respectively, and the adjustment accuracy is rough. Summary of the invention

[0005] In view of this, the present application provides a frequency adjustment method and device to solve the problem of rough adjustment accuracy when reducing power consumption by setting options.

[0006] In a first aspect, the present application provides a frequency adjustment method, the method being applied to a basic input and output system BIOS, the BIOS being configured in a server, the server further comprising a baseboard management controller BMC and a central processing unit CPU, the method comprising:

[0007] Receiving a trigger instruction sent by the BMC;

[0008] According to the trigger instruction, obtaining a first clock cycle number and a second clock cycle number;

[0009] Calculating the CPU usage rate using the first clock cycle number and the second clock cycle number;

[0010] Acquire a first frequency matching the CPU usage from a first frequency dynamic adjustment strategy;

[0011] According to the first frequency, the current frequency of the first component included in the CPU is adjusted.

[0012] In combination with the first aspect, in a first implementation manner, before receiving the trigger instruction sent by the BMC, the method further includes:

[0013] Receive setting instructions input by the user;

[0014] According to the setting instruction, it is determined to adjust the current frequency of the first component or the second component included in the CPU.

[0015] In combination with the first implementation of the first aspect, in a second implementation, after calculating the CPU usage, the method further includes:

[0016] Acquire a second frequency matching the CPU usage from a second frequency dynamic adjustment strategy;

[0017] According to the second frequency, the current frequency of the second component included in the CPU is adjusted.

[0018] In combination with the first aspect, in a third implementation manner, the CPU further includes a first register and a second register;

[0019] The obtaining of the first clock cycle number and the second clock cycle number specifically includes:

[0020] Reading the first clock cycle number from the first register, and reading the second clock cycle number from the second register;

[0021] The calculating the CPU usage rate by using the first clock cycle number and the second clock cycle number specifically includes:

[0022] The quotient of the first clock cycle number and the second clock cycle number is used as the CPU usage rate.

[0023] In combination with the second implementation manner of the first aspect, in a fourth implementation manner, the CPU further includes a third register and a fourth register, the third register including a plurality of bits for indicating a current frequency of the first component, and the fourth register including a plurality of bits for indicating a current frequency of the second component;

[0024] The adjusting, according to the first frequency, the current frequency of the first component included in the CPU specifically includes:

[0025] Updating the values ​​of the multiple bits included in the third register to the first frequency;

[0026] The step of adjusting the current frequency of the second component included in the CPU according to the second frequency specifically includes:

[0027] The values ​​of the multiple bits included in the fourth register are updated to the second frequency.

[0028] In a second aspect, the present application provides a frequency adjustment device, which is applied to a basic input and output system BIOS, which is configured in a server, and the server also includes a baseboard management controller BMC and a central processing unit CPU, and the device includes:

[0029] A receiving unit, configured to receive a trigger instruction sent by the BMC;

[0030] A first acquisition unit, configured to acquire a first clock cycle number and a second clock cycle number according to the trigger instruction;

[0031] a calculation unit, configured to calculate a utilization rate of the CPU using the first number of clock cycles and the second number of clock cycles;

[0032] A second acquisition unit, configured to acquire a first frequency matching the CPU usage rate from the first frequency dynamic adjustment strategy;

[0033] An adjusting unit is used to adjust a current frequency of a first component included in the CPU according to the first frequency.

[0034] In combination with the second aspect, in a first implementation manner, the receiving unit is further used to receive a setting instruction input by a user;

[0035] The device further includes: a determining unit, configured to determine, according to the setting instruction, to adjust a current frequency of the first component or the second component included in the CPU.

[0036] In combination with the first implementation of the second aspect, in the second implementation, the second acquisition unit is further used to acquire a second frequency matching the usage rate of the CPU from a second frequency dynamic adjustment strategy;

[0037] The adjustment unit is further configured to adjust a current frequency of a second component included in the CPU according to the second frequency.

[0038] In combination with the second aspect, in a third implementation, the CPU further includes a first register and a second register;

[0039] The first acquisition unit is specifically configured to read the first clock cycle number from the first register, and read the second clock cycle number from the second register;

[0040] The calculation unit is specifically configured to use the quotient of the first number of clock cycles and the second number of clock cycles as the utilization rate of the CPU.

[0041] In combination with the second implementation manner of the second aspect, in a fourth implementation manner, the CPU further includes a third register and a fourth register, the third register including a plurality of bits for indicating a current frequency of the first component, and the fourth register including a plurality of bits for indicating a current frequency of the second component;

[0042] The adjustment unit is further specifically configured to update the values ​​of the multiple bits included in the third register to the first frequency;

[0043] The adjustment unit is further specifically configured to update the values ​​of the multiple bits included in the fourth register to the second frequency.

[0044] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0045] Therefore, by applying the frequency adjustment method and device provided in the present application, the BIOS receives a trigger instruction sent by the BMC; according to the trigger instruction, the BIOS obtains the first clock cycle number and the second clock cycle number; using the first clock cycle number and the second clock cycle number, the BIOS calculates the CPU utilization rate; from the first frequency dynamic adjustment strategy, the BIOS obtains a first frequency that matches the CPU utilization rate; according to the first frequency, the BIOS adjusts the current frequency of the first component included in the CPU.

[0046] In this way, when the server is running in the OS stage, the SMI interrupt of the BIOS is triggered through the BMC, so that the BIOS automatically obtains the values ​​stored in the relevant registers and calculates the CPU usage. According to the frequency dynamic adjustment strategy pre-configured in the BIOS, the frequency of the core or uncore included in the CPU is dynamically adjusted under different CPU usage rates, effectively reducing the power consumption of the server. This solves the problem of coarse adjustment accuracy when reducing power consumption by setting options. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A flow chart of a frequency adjustment method provided in an embodiment of the present application;

[0048] Figure 2 A structural diagram of a frequency adjustment device provided in an embodiment of the present application;

[0049] Figure 3 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0050] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0051] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0052] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0053] The frequency adjustment method provided in the embodiment of the present application is described in detail below. Figure 1 , Figure 1 Flow chart of the frequency adjustment method provided in the embodiment of the present application. The method is applied to BIOS, which is configured in the server, and the server also includes a baseboard management controller (English: Baseboard Management Controller, referred to as: BMC) and a central processing unit CPU. The frequency adjustment method provided in the embodiment of the present application may include the following steps.

[0054] Step 110: receiving a trigger instruction sent by the BMC;

[0055] Specifically, the CPU includes a first component and a second component. The first component is a computing core component, also called a core; the second component is other components except the computing core component, also called an uncore, such as a memory controller, a UPI, and the like.

[0056] When the server is running in the operating system (OS) stage, the core frequency and the uncore frequency can be adjusted separately to reduce the power consumption of the CPU.

[0057] In the server, the BMC is connected to the BIOS. The BMC can periodically trigger the BIOS to adjust the core frequency and the uncore frequency. The value of the above period can be configured as needed by the options provided by the BIOS, for example, 5 seconds (s).

[0058] The BMC may periodically generate and send a trigger instruction to the BIOS, and the BIOS receives the trigger instruction.

[0059] Furthermore, the BMC is physically connected to the BIOS. An SMI interrupt program has been set in the BIOS program, and the SMI interrupt program is periodically triggered by the BMC. The BMC sends a trigger instruction to the BIOS through a physical connection. The above-mentioned physical connection is also the connection between the pins included in the chips at both ends. When the BMC raises the level of the pin connected to the BIOS to a high level, the level of the pin included in the BIOS is also raised to a high level (0->1), which triggers the BIOS to execute the SMI interrupt program.

[0060] Optionally, before step 110 of the present application, the step further includes: the BIOS receives a configuration instruction input by a user, and determines, according to the configuration instruction, a step of adjusting the current frequency of the first component or the second component. Further, in the BIOS startup interface, a configuration option is displayed, the configuration option including the first component identifier and the second component identifier. Through the configuration option, the user selects the component for frequency adjustment.

[0061] Step 120: Obtain a first clock cycle number and a second clock cycle number according to the trigger instruction;

[0062] Specifically, according to the description of step 120, after the BIOS receives the trigger instruction, the BIOS obtains the first clock cycle number and the second clock cycle number according to the trigger instruction.

[0063] Optionally, in the embodiment of the present application, the CPU further includes a first register and a second register, wherein the first register is specifically the IA32_FIXED_CTR2 register; and the second register is specifically the IA32_TIME_STAMP_COUNTER register.

[0064] The specific process of the above BIOS obtaining the first clock cycle number and the second clock cycle number is as follows: the BIOS reads the first clock cycle number from the first register and reads the second clock cycle number from the second register. The first clock cycle number specifically refers to the reference clock cycle number (CPU_CLK_UNHALTED.REF_TSC) of the current CPU in an unhalted state; the second clock cycle number specifically refers to the clock cycle number (TSC) of the CPU since it was started.

[0065] Step 130: Calculate the CPU usage rate using the first clock cycle number and the second clock cycle number;

[0066] Specifically, according to the description of step 140, after the BIOS obtains the first clock cycle number and the second clock cycle number, it calculates the CPU usage rate.

[0067] Optionally, the specific process of the above BIOS calculating the CPU usage is: the BIOS uses the quotient of the first clock cycle number and the second clock cycle number, ie, CPU_CLK_UNHALTED.REF_TSC / TSC, as the CPU usage.

[0068] Step 140: Acquire a first frequency matching the CPU usage rate from a first frequency dynamic adjustment strategy;

[0069] Specifically, according to the description of step 130, after the BIOS calculates the CPU usage, it obtains the first frequency that matches the CPU usage from the first frequency dynamic adjustment strategy.

[0070] Furthermore, a plurality of frequency dynamic adjustment strategies are stored in the server, each frequency dynamic adjustment strategy corresponding to a component included in the CPU to be adjusted. For example, the first frequency dynamic adjustment strategy corresponds to the core, and the second frequency dynamic adjustment strategy corresponds to the uncore.

[0071] It is understandable that after receiving the configuration instruction input by the user, the BIOS determines that the component to be frequency adjusted is the core. After receiving the trigger instruction sent by the BMC, the BIOS can obtain the first frequency dynamic adjustment strategy corresponding to the core.

[0072] In the first frequency dynamic adjustment strategy, when the CPU is in an idle state, the core frequency is the lowest frequency supported by the CPU (for example, usually 800MHz); when the CPU is in a working state, as the CPU usage rate increases, the core frequency is gradually increased to the maximum frequency supported by the CPU.

[0073] For example, the core frequency increases by 200 MHz for every 10% increase in CPU usage; when the CPU usage reaches a preset threshold (such as 70%), the core frequency is increased to the maximum frequency of the CPU (for example, usually 2-4 GHz).

[0074] Step 150: According to the first frequency, adjust the current frequency of the first component included in the CPU.

[0075] Specifically, according to the description of step 140, after the BIOS obtains the first frequency, it adjusts the current frequency of the core according to the first frequency.

[0076] Optionally, the CPU further includes a third register, the third register including a plurality of bits (eg, bit0-bit5) for indicating the current frequency of the core. The third register may be specifically IA32_PERF_CTL, which may be used to control the frequency of the core.

[0077] The specific process of the BIOS adjusting the current frequency of the first component included in the CPU according to the first frequency is as follows: the BIOS updates the values ​​of the multiple bits included in the third register to the first frequency. In this way, the BIOS adjusts the frequency of the core by modifying the bit values ​​in the register.

[0078] Therefore, by applying the frequency adjustment method provided by the present application, the BIOS receives a trigger instruction sent by the BMC; according to the trigger instruction, the BIOS obtains the first clock cycle number and the second clock cycle number; using the first clock cycle number and the second clock cycle number, the BIOS calculates the CPU utilization rate; from the first frequency dynamic adjustment strategy, the BIOS obtains a first frequency that matches the CPU utilization rate; according to the first frequency, the BIOS adjusts the current frequency of the first component included in the CPU.

[0079] In this way, when the server is running in the OS stage, the SMI interrupt of the BIOS is triggered through the BMC, so that the BIOS automatically obtains the values ​​stored in the relevant registers and calculates the CPU usage. According to the frequency dynamic adjustment strategy pre-configured in the BIOS, the frequency of the core or uncore included in the CPU is dynamically adjusted under different CPU usage rates, effectively reducing the power consumption of the server. This solves the problem of coarse adjustment accuracy when reducing power consumption by setting options.

[0080] Optionally, in the embodiment of the present application, after the BIOS calculates the CPU usage, it also adjusts the uncore frequency according to the CPU usage.

[0081] Specifically, according to the description of step 130, after the BIOS calculates the CPU usage, it obtains the second frequency that matches the CPU usage from the second frequency dynamic adjustment strategy.

[0082] It is understandable that after receiving the configuration instruction input by the user, the BIOS determines that the component to be frequency adjusted is uncore. After receiving the trigger instruction sent by the BMC, the BIOS can obtain the second frequency dynamic adjustment strategy corresponding to uncore.

[0083] In the second frequency dynamic adjustment strategy, when the CPU is in idle state, the frequency of uncore is the lowest frequency supported by the CPU (for example, usually 800MHz); when the CPU is in working state, as the CPU utilization rate increases, the frequency of uncore is gradually increased to the maximum frequency supported by the CPU.

[0084] For example, the frequency of the uncore increases by 10% for every 10% increase in CPU usage; when the CPU usage reaches a preset threshold (such as 80%), the frequency of the core is increased to the maximum frequency of the CPU (for example, usually 2.2 GHz).

[0085] After obtaining the second frequency, the BIOS adjusts the current frequency of the uncore according to the second frequency.

[0086] Optionally, the CPU further includes a fourth register, the fourth register including a plurality of bits (eg, bit0-bit5) for indicating the current frequency of the uncore. The fourth register may be specifically UNCORE_RATIO_LIMIT, and the register may be used to control the frequency of the uncore.

[0087] The specific process of the BIOS adjusting the current frequency of the uncore included in the CPU according to the second frequency is as follows: the BIOS updates the values ​​of the multiple bits included in the fourth register to the second frequency. In this way, the BIOS adjusts the frequency of the uncore by modifying the bit values ​​in the register.

[0088] Based on the same inventive concept, the embodiment of the present application also provides a frequency adjustment device corresponding to the frequency adjustment method. Figure 2 , Figure 2 The frequency adjustment device provided in the embodiment of the present application is applied to a basic input and output system BIOS, the BIOS has been configured in a server, the server also includes a baseboard management controller BMC and a central processing unit CPU, and the device includes:

[0089] The receiving unit 210 is used to receive the trigger instruction sent by the BMC;

[0090] A first acquisition unit 220, configured to acquire a first clock cycle number and a second clock cycle number according to the trigger instruction;

[0091] A calculation unit 230, configured to calculate a utilization rate of the CPU using the first number of clock cycles and the second number of clock cycles;

[0092] A second acquisition unit 240 is used to acquire a first frequency matching the CPU usage from the first frequency dynamic adjustment strategy;

[0093] The adjustment unit 250 is used to adjust the current frequency of the first component included in the CPU according to the first frequency.

[0094] Optionally, the receiving unit 210 is further configured to receive a setting instruction input by a user;

[0095] The device further includes: a determining unit (not shown in the figure), which is used to determine to adjust the current frequency of the first component or the second component included in the CPU according to the setting instruction.

[0096] Optionally, the second acquisition unit 240 is further configured to acquire, from a second frequency dynamic adjustment strategy, a second frequency matching the CPU usage rate;

[0097] The adjustment unit 250 is further configured to adjust a current frequency of a second component included in the CPU according to the second frequency.

[0098] Optionally, the CPU further includes a first register and a second register;

[0099] The first acquiring unit 220 is specifically configured to read the first clock cycle number from the first register, and read the second clock cycle number from the second register;

[0100] The calculation unit 230 is specifically configured to use the quotient of the first clock cycle number and the second clock cycle number as the CPU usage rate.

[0101] Optionally, the CPU further includes a third register and a fourth register, the third register includes a plurality of bits for indicating a current frequency of the first component, and the fourth register includes a plurality of bits for indicating a current frequency of the second component;

[0102] The adjustment unit 250 is further specifically configured to update the values ​​of the multiple bits included in the third register to the first frequency;

[0103] The adjustment unit 250 is further specifically configured to update the values ​​of the multiple bits included in the fourth register to the second frequency.

[0104] Therefore, by applying the frequency adjustment device provided by the present application, the BIOS receives a trigger instruction sent by the BMC; according to the trigger instruction, the BIOS obtains the first clock cycle number and the second clock cycle number; using the first clock cycle number and the second clock cycle number, the BIOS calculates the CPU utilization rate; from the first frequency dynamic adjustment strategy, the BIOS obtains the first frequency that matches the CPU utilization rate; according to the first frequency, the BIOS adjusts the current frequency of the first component included in the CPU.

[0105] In this way, when the server is running in the OS stage, the SMI interrupt of the BIOS is triggered through the BMC, so that the BIOS automatically obtains the values ​​stored in the relevant registers and calculates the CPU usage. According to the frequency dynamic adjustment strategy pre-configured in the BIOS, the frequency of the core or uncore included in the CPU is dynamically adjusted under different CPU usage rates, effectively reducing the power consumption of the server. This solves the problem of coarse adjustment accuracy when reducing power consumption by setting options.

[0106] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 3 As shown, it includes a processor 310, a transceiver 320 and a machine-readable storage medium 330, the machine-readable storage medium 330 stores machine-executable instructions that can be executed by the processor 310, and the processor 310 is prompted by the machine-executable instructions to execute the frequency adjustment method provided in the embodiment of the present application. Figure 2 The frequency adjustment device shown can be used as follows Figure 3 The network device hardware structure shown is implemented.

[0107] The computer-readable storage medium 330 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 330 may also be at least one storage device located away from the processor 310.

[0108] The processor 310 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components.

[0109] In the embodiment of the present application, the processor 310 reads the machine executable instructions stored in the machine readable storage medium 330, and the machine executable instructions enable the processor 310 itself and the transceiver 320 to execute the frequency adjustment method described in the aforementioned embodiment of the present application.

[0110] In addition, an embodiment of the present application provides a machine-readable storage medium 330, which stores machine-executable instructions. When called and executed by the processor 310, the machine-executable instructions prompt the processor 310 itself and the calling transceiver 320 to execute the frequency adjustment method described in the aforementioned embodiment of the present application.

[0111] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0112] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0113] As for the frequency adjustment device and the machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0114] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A frequency adjustment method, characterized in that: The method is applied to a basic input / output system BIOS, which is configured in a server, and the server also includes a baseboard management controller BMC and a central processing unit CPU. The method includes: Receiving a trigger instruction sent by the BMC; According to the trigger instruction, obtaining a first clock cycle number and a second clock cycle number; Calculating the CPU usage rate using the first clock cycle number and the second clock cycle number; Acquire a first frequency matching the CPU usage from a first frequency dynamic adjustment strategy; According to the first frequency, the current frequency of the first component included in the CPU is adjusted.

2. The method according to claim 1, characterized in that Before receiving the trigger instruction sent by the BMC, the method further includes: Receive setting instructions input by the user; According to the setting instruction, it is determined to adjust the current frequency of the first component or the second component included in the CPU.

3. The method according to claim 2, characterized in that After calculating the CPU usage, the method further includes: Acquire a second frequency matching the CPU usage from a second frequency dynamic adjustment strategy; According to the second frequency, the current frequency of the second component included in the CPU is adjusted.

4. The method according to claim 1, characterized in that The CPU also includes a first register and a second register; The obtaining of the first clock cycle number and the second clock cycle number specifically includes: Reading the first clock cycle number from the first register, and reading the second clock cycle number from the second register; The calculating the CPU usage rate by using the first clock cycle number and the second clock cycle number specifically includes: The quotient of the first clock cycle number and the second clock cycle number is used as the CPU usage rate.

5. The method according to claim 3, characterized in that: The CPU further includes a third register and a fourth register, the third register including a plurality of bits for indicating a current frequency of the first component, and the fourth register including a plurality of bits for indicating a current frequency of the second component; The adjusting, according to the first frequency, the current frequency of the first component included in the CPU specifically includes: Updating the values ​​of the multiple bits included in the third register to the first frequency; The step of adjusting the current frequency of the second component included in the CPU according to the second frequency specifically includes: The values ​​of the multiple bits included in the fourth register are updated to the second frequency.

6. A frequency adjustment device, characterized in that: The device is applied to a basic input and output system BIOS, which is configured in a server. The server also includes a baseboard management controller BMC and a central processing unit CPU. The device includes: A receiving unit, configured to receive a trigger instruction sent by the BMC; A first acquisition unit, configured to acquire a first clock cycle number and a second clock cycle number according to the trigger instruction; a calculation unit, configured to calculate a utilization rate of the CPU using the first number of clock cycles and the second number of clock cycles; A second acquisition unit, configured to acquire a first frequency matching the CPU usage rate from the first frequency dynamic adjustment strategy; An adjusting unit is used to adjust a current frequency of a first component included in the CPU according to the first frequency.

7. The device according to claim 6, characterized in that The receiving unit is also used to receive a setting instruction input by a user; The device further includes: a determining unit, configured to determine, according to the setting instruction, to adjust a current frequency of a first component or a second component included in the CPU.

8. The device according to claim 7, characterized in that The second acquisition unit is further configured to acquire, from a second frequency dynamic adjustment strategy, a second frequency matching the CPU usage rate; The adjustment unit is further configured to adjust a current frequency of a second component included in the CPU according to the second frequency.

9. The device according to claim 6, characterized in that The CPU also includes a first register and a second register; The first acquisition unit is specifically configured to read the first clock cycle number from the first register, and read the second clock cycle number from the second register; The calculation unit is specifically configured to use the quotient of the first number of clock cycles and the second number of clock cycles as the utilization rate of the CPU.

10. The device according to claim 8, characterized in that The CPU further includes a third register and a fourth register, the third register including a plurality of bits for indicating a current frequency of the first component, and the fourth register including a plurality of bits for indicating a current frequency of the second component; The adjustment unit is further specifically configured to update the values ​​of the multiple bits included in the third register to the first frequency; The adjustment unit is further specifically configured to update the values ​​of the multiple bits included in the fourth register to the second frequency.

Citation Information

Cited By

  • Frequency control system, method and device, electronic equipment and storage medium

    CN120233858A