Central processing unit frequency modulation method and computing device

By obtaining CPU utilization through the BMC and sending it to the BIOS, the BIOS adjusts the CPU frequency based on the utilization and timing parameters, which solves the problem of the BIOS being unable to obtain CPU utilization, realizes dynamic frequency adjustment, and reduces server power consumption.

CN117687496BActive Publication Date: 2026-11-17XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311541851.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2026-11-17
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

During the operation of some operating systems, the BIOS cannot obtain the CPU utilization rate, thus making it impossible to dynamically adjust the CPU frequency according to the CPU utilization rate, and consequently, it is impossible to reduce server power consumption.

Method used

The CPU utilization rate is obtained through the out-of-band management controller (BMC) and sent to the BIOS. The BIOS determines the target operating frequency based on the obtained CPU utilization rate and timing parameters, and adjusts the CPU frequency of the operating system.

Benefits of technology

It enables dynamic adjustment of CPU frequency regardless of the type of operating system, thereby reducing server energy consumption and improving the accuracy and efficiency of energy management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117687496B_ABST
    Figure CN117687496B_ABST
Patent Text Reader

Abstract

This application discloses a method for adjusting the frequency of a central processing unit (CPU) and a computing device, belonging to the field of computer technology. The method is executed by the Input / Output System (BIOS), which runs on the CPU. The method includes: sending an acquisition command to the BIOS (BMC), the acquisition command instructing the BIOS to acquire the current CPU utilization rate; acquiring the current CPU utilization rate from the BIOS; determining the target operating frequency of the CPU based on the current CPU utilization rate; and sending the target operating frequency to the operating system (OS) running on the CPU, so that the OS adjusts the CPU's operating frequency to the target operating frequency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method for adjusting the frequency of a central processing unit and a computing device. Background Technology

[0002] With the rapid development of technologies such as cloud computing, 5G, and AI, the demand for servers providing computing power is increasing. To meet various complex computing needs, the central processing unit (CPU) integrates more and more CPU cores and dedicated acceleration modules, leading to increasingly higher server energy consumption. How to effectively reduce server energy consumption while ensuring application performance has become an important research direction.

[0003] However, some operating systems cannot enable the BIOS to obtain CPU utilization during operation, thus making it impossible to dynamically adjust the CPU frequency according to the CPU utilization, and consequently, to reduce server power consumption. Summary of the Invention

[0004] This application provides a method for adjusting the frequency of a central processing unit (CPU) and a computing device, which can dynamically adjust the CPU frequency according to the CPU utilization rate regardless of the type of operating system, thereby reducing server energy consumption. The technical solution is as follows:

[0005] Firstly, a method for adjusting the frequency of a central processing unit (CPU) is provided. This method is executed by the Input / Output System (BIOS), which runs on the CPU. The method includes: sending a fetch command to the BMC (Browser Control Center), the fetch command instructing the BMC to fetch the current CPU utilization rate; fetching the current CPU utilization rate from the BMC; determining the target operating frequency of the CPU based on the current CPU utilization rate; and sending the target operating frequency to the operating system (OS) running on the CPU, so that the OS adjusts the CPU's operating frequency to the target operating frequency.

[0006] Understandably, the BIOS obtains CPU utilization. Based on the current CPU utilization and a utilization threshold, the BIOS can periodically determine the target performance level (P) of the CPU. This target level indicates the target operating frequency of the CPU. The BIOS can then inform the OS of this periodically determined target level, allowing the OS to dynamically adjust the CPU's performance level (P), i.e., the CPU's operating frequency, based on the real-time CPU utilization. Therefore, it's possible to dynamically adjust the CPU's operating frequency based on CPU utilization, thereby reducing power consumption.

[0007] In one possible implementation, the CPU utilization rate is obtained by the BMC from the management engine ME or the management software firmware iBMA.

[0008] It is understandable that the CPU utilization rate obtained from the management engine ME, or the CPU utilization rate obtained from the management software firmware iBMA, is real-time, rather than a locally saved CPU utilization rate. This can reduce the time error of the CPU utilization rate and more accurately determine the target operating frequency of the CPU based on the current CPU utilization rate obtained from the BIOS.

[0009] In one possible implementation, before obtaining the current CPU utilization from the BMC, the method further includes: obtaining timing parameters; the timing parameters are used to indicate the period for obtaining CPU utilization; and sending an acquisition command to the BMC based on the timing parameters.

[0010] Understandably, the BIOS can obtain timing parameters, which are used to indicate the period for obtaining CPU utilization. Since CPU utilization changes in real time with the workload and usage habits, the timing parameters can be obtained based on these changes, thus allowing for the determination of the optimal period for obtaining CPU utilization.

[0011] In one possible implementation, obtaining CPU utilization based on timing parameters includes: sending timing parameters to the out-of-band management controller (BMC); the BMC including a target timer; the target timer being used to trigger the acquisition of CPU utilization according to the period indicated by the timing parameters; and acquiring CPU utilization when the target timer is triggered.

[0012] Understandably, the target timer is used to acquire CPU utilization according to the period indicated by the timing parameters; when the target timer triggers, the CPU utilization is acquired. Since CPU utilization changes in real time, it is necessary to acquire CPU utilization periodically, which can improve the accuracy of determining the target operating frequency based on CPU utilization.

[0013] In one possible implementation, the CPU adjusts its operating frequency by adjusting the performance P-state level; the target operating frequency of the CPU is determined according to the CPU utilization rate, including: determining the target P-state level of the CPU according to the correspondence between the CPU utilization rate and the P-state level; the target level indicates the target operating frequency.

[0014] It's understandable that the CPU performance P-state indicates the CPU's operating frequency. Furthermore, each P-state level corresponds to a CPU utilization threshold. Therefore, determining the target CPU operating frequency based on CPU utilization means determining the target P-state level, which in turn indicates the target operating frequency. By using CPU utilization, or utilization thresholds, it's possible to dynamically adjust the CPU's operating frequency based on CPU utilization, thereby reducing energy consumption.

[0015] Secondly, a method for adjusting the frequency of a central processing unit (CPU) is provided, executed by an out-of-band management controller (BMC). The method includes: acquiring timing parameters; the timing parameters indicating the period for acquiring CPU utilization; triggering a target timer according to the period indicated by the timing parameters, so that the input / output system BIOS acquires the CPU utilization when the target timer is triggered; receiving an acquisition command sent by the BIOS, the acquisition command instructing the BMC to acquire the current CPU utilization; and sending the current CPU utilization to the BIOS; wherein the BIOS determines the target operating frequency of the CPU based on the CPU utilization and sends the target operating frequency to the operating system (OS) running on the CPU, so that the OS adjusts the CPU operating frequency to the target operating frequency.

[0016] Understandably, the BMC can configure a target timer based on the acquired timing parameters. The BMC periodically triggers the acquisition of CPU utilization according to the period indicated by the timing parameters. The BMC sends the acquired CPU utilization to the BIOS, which uses this information to determine the CPU's target operating frequency and sends this target frequency to the operating system (OS) running on the CPU. The OS then adjusts the CPU's operating frequency to the target frequency. Since the CPU's performance level (P) can indicate the target operating frequency, it is possible to dynamically adjust the CPU's operating frequency based on its utilization, thereby reducing power consumption.

[0017] In one possible implementation, the CPU utilization rate is obtained by the BMC from the management engine ME or the management software firmware iBMA.

[0018] It is understandable that the CPU utilization rate is obtained by the BIOS from the management engine ME or from the management software firmware iBMA. The CPU utilization rate obtained at this time is real-time, not the locally saved CPU utilization rate. This can reduce the time error of the CPU utilization rate and more accurately determine the target operating frequency of the CPU based on the CPU utilization rate obtained from the BIOS.

[0019] In one possible implementation, obtaining timing parameters includes obtaining timing parameters from the BIOS.

[0020] Understandably, the timing parameters in the BIOS can be dynamically adjusted. These parameters indicate the period for acquiring CPU utilization. Since CPU utilization changes in real time with the workload and usage habits, the timing parameters can be obtained based on these changes, thus allowing for the optimal period for acquiring CPU utilization.

[0021] In one possible implementation, the CPU adjusts its operating frequency by adjusting the performance P state level; the target operating frequency is represented by the target level; the target level is determined by the BIOS according to the correspondence between CPU utilization and P state level.

[0022] It's understandable that the CPU performance P-state indicates the CPU's operating frequency. Furthermore, each P-state level corresponds to a CPU utilization threshold. Therefore, determining the target CPU operating frequency based on CPU utilization means determining the target P-state level, which in turn indicates the target operating frequency. By using CPU utilization, or utilization thresholds, it's possible to dynamically adjust the CPU's operating frequency based on CPU utilization, thereby reducing energy consumption.

[0023] Thirdly, embodiments of this application provide a frequency modulation device for a central processing unit (CPU). This application can divide the CPU frequency modulation device into functional modules based on the methods provided in the first and second aspects described above. For example, each function can be divided into its own functional modules, or two or more functions can be inherited into one processing module. For instance, the CPU frequency modulation method executed by the BIOS in the first aspect of this application can divide the CPU frequency modulation device into a detection module and a configuration module according to its functions. The CPU frequency modulation method executed by the BMC in the second aspect of this application can divide the CPU frequency modulation device into a data acquisition module and a triggering module according to its functions. The descriptions of possible technical solutions and beneficial effects of the above-described functional modules can be found in the technical solutions provided in the first or second aspects and their corresponding possible implementations, and will not be repeated here.

[0024] Fourthly, embodiments of this application provide a computing device, which includes: a processor, an out-of-band management controller (BMC), and a memory; the processor is coupled to the memory; the processor is used to run a Basic Input / Output System (BIOS), and the memory is used to store computer instructions, which are loaded and executed by the processor or the BMC to enable the computing device to implement the frequency modulation method of the central processing unit described above.

[0025] Fifthly, embodiments of this application provide a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the frequency modulation method of a central processing unit as described above.

[0026] Sixthly, embodiments of this application provide a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A terminal's processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the terminal to perform the frequency modulation method of the central processing unit provided in various optional implementations of the above aspects.

[0027] For a detailed description of aspects three through six and their various implementations in this application, please refer to the detailed descriptions in aspects one and two and their various implementations; and for a detailed analysis of the beneficial effects of aspects three through six and their various implementations in aspects one and two and their various implementations, please refer to the beneficial effect analysis in aspects one and two and their various implementations, which will not be repeated here.

[0028] These or other aspects of this application will become more readily apparent in the following description. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of a frequency modulation system structure for a central processing unit, as shown in an embodiment of this application;

[0030] Figure 2 This is a schematic diagram of the hardware structure of a server involved in an embodiment of this application;

[0031] Figure 3 This is a schematic flowchart of a frequency modulation method for a central processing unit on the BIOS side provided in an embodiment of this application;

[0032] Figure 4 It is based on Figure 3 The illustrated embodiment presents a logic diagram of a frequency modulation method for a central processing unit;

[0033] Figure 5 This is a schematic flowchart of a frequency modulation method for a central processing unit on the BMC side provided in an embodiment of this application;

[0034] Figure 6 It is based on Figure 5 The illustrated embodiment provides a logic diagram of a frequency modulation method for a central processing unit;

[0035] Figure 7 This is a schematic flowchart of a complete frequency modulation method for a central processing unit provided in an embodiment of this application;

[0036] Figure 8 This is a schematic diagram of a frequency modulation device for a BIOS-side central processing unit provided in an embodiment of this application;

[0037] Figure 9 This is a schematic diagram of the frequency modulation device structure of a BMC-side central processing unit provided in an embodiment of this application. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0039] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0040] First, the application scenarios of the embodiments of this application will be introduced by way of example.

[0041] With the rapid development of technologies such as cloud computing, 5G, and AI, the demand for servers that provide computing power is increasing. In order to meet various complex computing needs, the central processing unit (CPU) integrates more and more CPU cores and dedicated acceleration modules, which leads to increasingly higher CPU energy consumption.

[0042] Currently, the most common and effective method for reducing server power consumption while maintaining high performance is through dynamic CPU frequency adjustment. This is achieved by the operating system (OS) triggering an interrupt to the module special register (MSR) 0x38, enabling the MSR register to calculate the current CPU utilization through the basic input / output system (BIOS). The BIOS then uses this current CPU utilization and the CPU utilization threshold corresponding to each performance level (P state) to recommend the appropriate P performance state for the current CPU. This allows for dynamic adjustment of the CPU frequency, keeping the CPU in a low-frequency, high-utilization state, thereby achieving lower power consumption while maintaining high server performance.

[0043] However, during the operation of some operating systems, the MSR 0x38 register may be occupied, preventing the BIOS from obtaining the CPU utilization rate. Therefore, the existing dynamic frequency adjustment technology will fail when the server is running certain operating systems, and it will be unable to dynamically adjust the CPU frequency according to the CPU utilization rate, thus failing to reduce the server's power consumption.

[0044] In view of this, subsequent embodiments of this application provide a method for adjusting the frequency of a central processing unit (CPU). The out-of-band management controller (BMC) can obtain timing parameters configured in the BIOS. The BMC triggers a timer according to the time period indicated by the timing parameters. When the BIOS receives the timer trigger instruction, it sends an instruction to the BMC to obtain the CPU utilization rate. Based on the obtained current CPU utilization rate, the BIOS determines the target operating frequency of the CPU and sends the target operating frequency to the operating system (OS) running on the CPU, so that the OS adjusts the CPU's operating frequency to the target operating frequency. This solves the technical problem that dynamic frequency adjustment technology fails under certain operating systems, achieves CPU frequency adjustment, and has lower power consumption.

[0045] Secondly, the system architecture of the embodiments of this application will be described by way of example.

[0046] The solution illustrated in this application embodiment can be executed by a computing device, which can be a server. This server includes a hardware layer and a software layer, with the software layer consisting of program code running on the hardware layer. The software layer can be further divided into several layers, which communicate with each other through software interfaces. From top to bottom, the software layer includes the application layer, the operating system (OS) and basic input / output system (BIOS), and the driver layer, such as... Figure 1 As shown.

[0047] The application layer consists of a series of program codes that run the application.

[0048] An OS is a system that runs on a CPU. This OS can be Linux, Windows, or VxWorks, among others.

[0049] The BIOS, which can be stored in a separate Flash memory chip (hereinafter referred to as the BIOS chip), is run by the CPU by calling the BIOS program code stored in the Flash chip. The BIOS is used to configure the hardware and prepare for the OS to run. The main functions of the BIOS are power-on, self-test, CPU initialization, memory initialization, detection of input / output devices and bootable devices, and finally, booting the OS.

[0050] The driver layer, including board support packages and drivers, provides the interface for the application layer, OS, and BIOS to operate devices in the hardware layer; in other words, the driver layer is the "interface layer between the application layer, OS, and BIOS and the hardware layer".

[0051] The hardware layer includes computer hardware such as the central processing unit (CPU) 201, memory 202, BIOS chip 205, and baseboard management controller (BMC) 206. The BMC 206, also known as the out-of-band controller, is an out-of-band processor independent of the CPU 201. The out-of-band controller may include external monitoring and management units of the computer device, management systems in management chips outside the processor, computer device baseboard management units, and system management modules (SMMs). The connections between these hardware components are as follows: Figure 2 As shown.

[0052] Figure 2 This is a schematic diagram of the hardware structure of a server provided in an embodiment of this application. The server can be an x86 architecture server, specifically a blade server, a high-density server, a rack server, or a high-performance server, etc. The server includes a processor 201, a memory 202, a network interface 203, a bus 204, a BIOS chip 205, and a BMC 206.

[0053] The processor 201 may include one or more processing units.

[0054] The memory 202 is used to store data, and the memory 202 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, or optical memory.

[0055] The memory 202 is used to interact with the processor 201 and send the interrupt information generated during the interaction to the BIOS chip 205.

[0056] Network interface 203 is a wired interface (port), such as a FECI or GE interface. Alternatively, network interface 203 may be a wireless interface. It should be understood that network interface 203 includes multiple physical ports.

[0057] Bus 204, the aforementioned processor 201, memory 202, network interface 203, BISO chip 205 and BMC 206 are usually interconnected through bus 204, or interconnected in other ways.

[0058] Processor 201 can be used to execute interrupt information, enabling the input / output system BIOS to obtain the CPU utilization rate and determine the target operating frequency of the CPU based on the CPU utilization rate, so as to adjust the CPU operating frequency to the target operating frequency.

[0059] Processor 201 can execute timing instructions triggered by the BMC timer, enabling the I / O system BIOS to obtain the CPU utilization rate and determine the target operating frequency of the CPU based on the CPU utilization rate. This allows the CPU operating frequency to be adjusted to the target operating frequency.

[0060] The BIOS chip 205 can obtain the CPU utilization rate and determine the target operating frequency of the CPU based on the CPU utilization rate. It can also send the target operating frequency to the operating system (OS) running on the CPU, so that the OS can adjust the CPU's operating frequency to the target frequency.

[0061] The BMC 206 can acquire timing parameters. The BMC triggers the target timer according to the period indicated by the timing parameters, enabling the I / O system BIOS to obtain CPU utilization when the target timer is triggered. The timing parameters indicate the period for acquiring CPU utilization. The BIOS uses this to determine the target operating frequency of the CPU based on the CPU utilization and sends the target operating frequency to the operating system (OS) running on the CPU, so that the OS adjusts the CPU's operating frequency to the target frequency.

[0062] It should be noted that this BMC is completely independent of the server's OS and can communicate with the aforementioned BIOS and OS through the server's out-of-band management interface.

[0063] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0064] For ease of understanding, the frequency modulation method of the central processing unit provided in this application is described below with reference to the accompanying drawings. This frequency modulation method of the central processing unit is applicable to... Figure 1 and Figure 2 The server shown.

[0065] Figure 3 A schematic flowchart of a frequency modulation method for a central processing unit (CPU) according to an embodiment of this application is shown. This CPU frequency modulation method is executed by the Input / Output System (BIOS) and includes the following steps:

[0066] S101, get the current CPU utilization.

[0067] In one possible implementation, a get command is sent to the BMC.

[0068] The get command is used to instruct the BMC to obtain the current CPU utilization.

[0069] For example, the BIOS sends a command to the BMC via the Intelligent Platform Management Interface (IPMI) to obtain the current CPU utilization, instead of the CPU utilization that is already stored locally.

[0070] In one possible implementation, the input / output system BIOS can obtain the CPU utilization from the management engine (ME).

[0071] The Management Engine (ME) is an embedded controller located in the Platform Controller Hub (PCH) chip, providing specific management functions. The PCH chip is also known as the Southbridge chip.

[0072] For example, the I / O system BIOS can obtain CPU utilization data sent by the BMC from the Management Engine (ME) or the in-baseboard management agent (iBMA). iBMA is a custom-developed management software firmware used to supplement the BMC's management capabilities. iBMA can be remotely installed on the OS via its management interface.

[0073] For example, the Input / Output System BIOS sends command notifications via the Intelligent Platform Management Interface (IPMI). Upon receiving the command notification, the BMC obtains the current CPU utilization from the Management Engine (ME) or iBMA via the Platform Environment Control Interface (PECI). In other words, the Input / Output System BIOS obtains the CPU utilization from the Management Engine (ME) or iBMA in real time via command notifications; it does not directly retrieve the locally stored CPU utilization, which is obtained by the BMC.

[0074] Understandably, the BIOS obtains CPU utilization in real time, which reduces the time error in obtaining CPU utilization. By obtaining CPU utilization in real time, the target operating frequency of the CPU can be determined more accurately.

[0075] In one possible implementation, the BIOS can obtain timing parameters.

[0076] The timing parameter can be used to indicate the time period for acquiring CPU utilization.

[0077] For example, a frequency modulation parameter option can be added to the BIOS installation interface of the input / output system. The frequency modulation parameter option can be used to configure timing parameters.

[0078] For example, the frequency adjustment parameter option can configure the timing parameter as TcoTimeout value*06s, where TcoTimeoutvalue*06s is the timer parameter code, which indicates that the period for obtaining CPU utilization is 0.6 seconds.

[0079] In one possible implementation, the input / output system BIOS obtains the CPU utilization rate based on timing parameters.

[0080] For example, the input / output system BIOS sends configured timing parameters to a timer in the BMC, so that the target timer can trigger the BIOS to obtain the CPU utilization rate according to the period indicated by the timing parameters.

[0081] For example, during the BIOS driver execution phase, after the BIOS reports the end of post (EOP) flag to the BMC, it configures the interval of the timer in the BMC according to the timing parameters obtained by the BIOS. The timer can trigger the BIOS to obtain the CPU utilization rate within the period indicated by the timing parameters.

[0082] One possible implementation is to add a dynamic energy efficiency switch option to the BIOS installation interface of the input / output system.

[0083] Before acquiring CPU utilization, the state of the dynamic power efficiency switch indicates to the BIOS whether to acquire CPU utilization. If the dynamic power efficiency switch is enabled, the BIOS can receive interrupt messages and begin acquiring CPU utilization; if the dynamic power efficiency switch is disabled, it instructs the BIOS to continue starting the computing device.

[0084] S102 determines the target operating frequency of the CPU based on the current CPU utilization rate.

[0085] The CPU's target operating frequency is an energy-efficient frequency determined based on the CPU's load while running the current task. The Performance P state indicates the CPU's frequency value. Based on the CPU's utilization threshold for each Performance P state and the CPU utilization rate obtained from the BIOS, the target Performance P state level can be determined, and the target level indicates the target operating frequency.

[0086] In one possible implementation, the BIOS can obtain the CPU utilization threshold for each performance level P state.

[0087] For example, a frequency adjustment parameter option can be added to the BIOS installation interface of the input / output system. The frequency adjustment parameter option can also configure the CPU utilization threshold for each performance level P state.

[0088] For example, the I / O system BIOS can configure the CPU performance state P0 utilization threshold to be 95%, CPU performance state P1 utilization threshold to be 85%, and CPU performance state P2 utilization threshold to be 75%. If the I / O system BIOS obtains a CPU utilization rate of 72%, it can determine that the current target CPU state is P2. Because the target state indicates the target operating frequency, the frequency corresponding to the target state is the target operating frequency. Therefore, based on the CPU utilization threshold corresponding to each performance state P and the CPU utilization rate obtained by the BIOS, the CPU's target operating frequency can be determined.

[0089] S103 sends the target operating frequency to the operating system (OS) running on the CPU, so that the OS can adjust the CPU's operating frequency to the target operating frequency.

[0090] The target level indicates the target operating frequency. The BIOS can determine the target level of the performance P state based on the CPU utilization threshold corresponding to each performance P state and the CPU utilization obtained by the BIOS.

[0091] For example, the BIOS informs the operating system (OS) of the target gear through a system control interrupt (SCI) message. The OS executes the interrupt function, adjusts the CPU's P state to the target gear by adjusting the input / output port values, and then adjusts the CPU frequency to the target operating frequency.

[0092] Figure 4 This diagram illustrates the logic of a frequency modulation method for a central processing unit provided in an embodiment of this application. It is executed by the input / output system BIOS, such as... Figure 4 :

[0093] Before booting the computing device and entering the OS, the BIOS acquires timing parameters and a CPU utilization threshold (S401). The BIOS sends the timing parameters to the BMC, enabling the timers in the BMC to trigger interrupts according to the period indicated by the target timing parameters. The CPU utilization threshold is the highest CPU utilization value for each performance level P. During the BIOS driver execution phase, the BIOS sends the EOP flag to the BMC (S402). When the BIOS receives a system management interrupt (SMI) from the BMC timer (S403), the BIOS executes the interrupt function. The BIOS sends a fetch command to the BMC, which can be an IPMI command. The CPU utilization in the BMC is then acquired (S404). Based on the acquired CPU utilization and the CPU utilization threshold, the BIOS determines the target performance level P for the CPU (S405). The BIOS triggers an SCI interrupt to inform the OS of the target performance level, allowing the OS to set performance P to the target level (S406).

[0094] In summary, the BIOS periodically triggers an SMI interrupt via the BMC timer to obtain CPU utilization. Based on the obtained CPU utilization and a utilization threshold, the BIOS can periodically determine the target performance level (P) of the CPU, which indicates the target operating frequency. The BIOS can then inform the OS of this periodically determined target level, allowing the OS to dynamically adjust the CPU performance level (P), i.e., the CPU's operating frequency, based on the real-time CPU utilization. Therefore, it is possible to dynamically adjust the CPU's operating frequency according to its utilization, thereby reducing power consumption.

[0095] Figure 5 A schematic flowchart of a frequency modulation method for a central processing unit (CPU) provided in an embodiment of this application is shown. This CPU frequency modulation method is executed by an out-of-band management controller (BMC) and includes the following steps:

[0096] S201, Get timing parameters.

[0097] The timing parameter is used to indicate the period for acquiring CPU utilization.

[0098] In one possible implementation, the timing parameters are obtained from the BIOS.

[0099] For example, timing parameters can be obtained from the frequency adjustment parameter options in the BIOS installation interface.

[0100] For example, to obtain the timing parameter TcoTimeout value*06s configured in the BIOS frequency adjustment parameter option, TcoTimeout value*06s is a timer parameter code used to indicate that the period for obtaining CPU utilization is 0.6 seconds.

[0101] S202, trigger the target timer according to the period indicated by the timing parameters.

[0102] The BIOS is used to determine the target operating frequency of the CPU based on the obtained CPU utilization rate, and then send the target operating frequency to the operating system (OS) running on the CPU, so that the OS can adjust the CPU's operating frequency to the target operating frequency.

[0103] In one possible implementation, the BMC acquires the EOP flag, configures the target timer according to the timing parameters, and triggers the SMI interrupt at regular intervals.

[0104] This involves triggering an SMI interrupt to the BIOS, so that the BIOS can obtain the CPU utilization rate when the timer is triggered.

[0105] For example, when the BMC receives the EOP flag reported by the BIOS during the execution phase, it configures the BMC target timer according to the acquired timing parameter TcoTimeout value * 0.6s. The BMC target timer can pull the general purpose input / output (GPIO) pin, causing the BMC to trigger an SMI interrupt.

[0106] S203, the BMC triggers an SMI interrupt to the BIOS so that the I / O system BIOS can obtain the CPU utilization rate.

[0107] For example, the BMC triggers an SMI interrupt to the BIOS. After receiving the acquisition command from the BIOS, the BMC obtains the CPU utilization by sending a PECI interface command to the ME or iBMA. The BMC then sends the obtained CPU utilization to the BIOS.

[0108] In one possible implementation, the BMC can determine the state of the dynamic frequency modulation switch.

[0109] Before the BMC triggers the SMI interrupt, the BMC determines the status of the dynamic energy efficiency switch. If the dynamic frequency modulation switch is on, the BMC is instructed to trigger the SMI interrupt; if the dynamic frequency modulation switch is not on, the BMC is instructed to continue starting the computing device.

[0110] In other words, the BMC obtains the CPU utilization rate by sending PECI interface commands to the ME or iBMA. At this time, the CPU utilization rate sent to the BIOS is obtained in real time based on timing parameters. The BMC does not directly send the locally obtained CPU utilization rate to the BIOS.

[0111] Understandably, the BMC sends the CPU utilization rate obtained in real time based on timing parameters to the BIOS, which can reduce the time error of the sent CPU utilization rate and more accurately determine the target operating frequency of the CPU based on the CPU utilization rate sent to the BIOS.

[0112] Figure 6 This diagram illustrates the logic of a frequency modulation method for a central processing unit provided in an embodiment of this application. It is executed by the out-of-band management controller (BMC), such as... Figure 6 As shown,

[0113] Before booting the computing device and entering the OS, the BMC obtains timing parameters from the BIOS (S601). The BMC detects the EOP flag of the BIOS during the driver execution phase (S602), and determines the target timer interval based on the timing parameters (S603). The BMC determines the status of the dynamic energy efficiency switch (S604). If the dynamic frequency modulation energy efficiency switch is enabled, it instructs the BMC to trigger an SMI interrupt (S605); if the dynamic frequency modulation energy efficiency switch is not enabled, it instructs the computing device to continue booting (S606). After receiving the acquisition command sent by the BIOS, which can be an IPMI command (S607), the BMC obtains the CPU utilization rate from the ME or iBMA by sending a PECI command (S608). The BMC sends the CPU utilization rate to the BIOS (S609), which the BIOS uses to determine the target operating frequency of the CPU based on the obtained CPU utilization rate, and sends the target operating frequency to the operating system OS running on the CPU, so that the OS adjusts the CPU operating frequency to the target operating frequency.

[0114] In summary, the BMC can configure the target timer based on the acquired timing parameters. The BMC triggers the SMI interrupt periodically according to the timing parameters. After receiving the IPMI command from the BIOS, the BMC sends a PECI command to obtain the CPU utilization from the ME or iBMA. The BMC sends the obtained CPU utilization to the BIOS, which uses it to determine the target operating frequency of the CPU and sends the target operating frequency to the operating system (OS) running on the CPU, so that the OS can adjust the CPU's operating frequency to the target frequency. Since the target performance level (P) of the CPU can indicate the target operating frequency, it is possible to dynamically adjust the CPU's operating frequency based on the CPU utilization, thereby reducing power consumption.

[0115] Figure 7 A schematic flowchart of a frequency modulation method for a central processing unit provided in an embodiment of this application is shown. The method includes the following steps:

[0116] S301, add frequency tuning parameter option to BIOS installation menu.

[0117] The frequency adjustment parameter option can be used to set timing parameters, which set the CPU utilization threshold for each CPU performance level (P). The timing parameter indicates the period for acquiring CPU utilization.

[0118] In one possible implementation, a dynamic energy efficiency switch could also be added to the BIOS installation menu.

[0119] The status of the dynamic energy efficiency switch can indicate whether the CPU utilization rate is being acquired.

[0120] For example, the BMC determines the status of the dynamic energy efficiency switch. If the dynamic frequency modulation switch is on, it indicates that the CPU utilization rate should be obtained; if the dynamic frequency modulation switch is not on, it indicates that the computing device should continue to start.

[0121] S302, BMC obtains timing parameters for configuring the target timer.

[0122] The target timer is used to trigger the acquisition of CPU utilization according to the period indicated by the timing parameters.

[0123] For example, during the BIOS driver execution phase DXE, after receiving the EOP flag reported by the BIOS, the BMC sets the target timer according to the timing parameters, so that the target timer can be triggered according to the period indicated by the timing parameters to obtain the CPU utilization.

[0124] S303, BMC triggers SMI interrupt to BIOS.

[0125] Among them, the SMI interrupt can indicate the CPU utilization rate.

[0126] For example, an SMI interrupt can instruct the BIOS to perform an operation to obtain CPU utilization.

[0127] S304, the BIOS executes the SMI interrupt function and sends a fetch command to the BMC.

[0128] The command to retrieve the information can be an IPMI command.

[0129] For example, after the BMC target timer triggers an interrupt, the BIOS is instructed to obtain the CPU utilization rate. The BIOS informs the BMC via an IPMI command message.

[0130] S305, BMC sends PECI command to ME or iBMA to obtain CPU utilization.

[0131] It's understandable that the CPU utilization rate obtained by the BMC via the PECI command in the ME or iBMA is real-time, not the CPU utilization rate already obtained locally by the BMC.

[0132] S306: The BIOS obtains the CPU utilization rate and determines the target operating frequency.

[0133] The target frequency is determined by the BIOS based on the correspondence between CPU utilization and the P state. The target frequency indicates the target operating frequency of the CPU.

[0134] For example, the BMC will send the CPU utilization rate obtained in ME or iBMA through the PECI command back to the BIOS. Based on the obtained CPU utilization rate and the CPU utilization rate threshold for each CPU performance level, the BIOS can determine the target CPU level.

[0135] For example, the BIOS's frequency adjustment parameter options can configure the CPU performance state P0 utilization threshold to 95%, CPU performance state P1 utilization threshold to 85%, and CPU performance state P2 utilization threshold to 75%. If the BIOS obtains a CPU utilization rate of 72%, it can be determined that the CPU's current target level is P2. Because the target level indicates the target operating frequency, the CPU's target operating frequency can be determined based on the utilization threshold corresponding to each performance state P and the CPU utilization rate obtained by the BIOS.

[0136] S307, the BIOS triggers an SCI interrupt to inform the OS of the target operating frequency.

[0137] The target setting indicates the CPU's target operating frequency. The BIOS informs the OS of the determined target operating frequency via an SCI interrupt.

[0138] For example, the BIOS triggers an SCI interrupt to inform the OS of the target performance level (P) of the CPU.

[0139] S308, the OS adjusts the CPU frequency to the target operating frequency.

[0140] The target setting indicates the CPU's target operating frequency. Therefore, adjusting the CPU to the target setting will achieve the goal of adjusting it to the target operating frequency.

[0141] For example, the OS adjusts the CPU performance P state to the target level.

[0142] For example, the OS can adjust the CPU's performance P state to the target level by adjusting the I / O port values.

[0143] In summary, a frequency adjustment parameter option is added to the BIOS installation menu. This option is used to set timing parameters. The frequency adjustment parameter option can also set a CPU utilization threshold. The BMC obtains the timing parameters to configure the target timer. The BMC timer can periodically trigger an SMI interrupt, which instructs the BIOS to obtain the CPU utilization. The BIOS sends IPMI commands to the BMC, which in turn causes the BMC to obtain the CPU utilization from the ME or iBMA. The BIOS can obtain the CPU utilization from the BMC. Based on the periodically obtained CPU utilization and utilization threshold, the BIOS can periodically determine the target performance level (P) of the CPU. The target level indicates the target operating frequency of the CPU. The BIOS can inform the OS of the periodically determined target level, allowing the OS to dynamically modify the CPU performance level (P), i.e., the CPU operating frequency, according to the CPU utilization. Therefore, it is possible to periodically and dynamically adjust the CPU operating frequency based on the CPU utilization, thereby reducing power consumption.

[0144] The foregoing primarily describes the solutions of the embodiments of this application from a methodological perspective. It is understood that, in order to achieve the aforementioned functions, the computing device includes at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0145] This application embodiment can divide the frequency modulation device of the central processing unit into functional units according to the above method example. For example, each function can be divided into different functional units, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0146] For example, Figure 8 A schematic diagram of the frequency modulation device structure of the BIOS-side central processing unit provided in an embodiment of this application is shown. Figure 8 As shown, the frequency modulation device of the BIOS-side central processing unit is used in a computing device. The frequency modulation device 400 of the BIOS-side central processing unit includes:

[0147] The detection module 401 is used to send an acquisition command to the BMC, which instructs the BMC to acquire the current CPU utilization rate. The module retrieves the current CPU utilization rate from the BMC.

[0148] Configuration module 402 is used to determine the target operating frequency of the CPU based on the current CPU utilization. The target operating frequency is then sent to the operating system (OS) running on the CPU, so that the OS adjusts the CPU's operating frequency to the target frequency.

[0149] In one possible implementation, the detection module 401 is also used to acquire timing parameters; the timing parameters are used to indicate the period for acquiring CPU utilization; and based on the timing parameters, an acquisition command is sent to the BMC.

[0150] In one possible implementation, the detection module 401 is further configured to send timing parameters to the out-of-band management controller (BMC); the BMC includes a target timer; the target timer is configured to trigger the acquisition of CPU utilization according to the period indicated by the timing parameters; and the CPU utilization is acquired when the target timer is triggered.

[0151] In one possible implementation, the configuration module 402 is further configured to determine the target operating frequency of the CPU according to the CPU utilization rate, including: determining the target P state level of the CPU according to the correspondence between the CPU utilization rate and the P state level; the target level indicates the target operating frequency.

[0152] For a detailed description of the above optional methods, please refer to the foregoing. Figure 3 , Figure 4The method embodiments described herein will not be repeated here. Furthermore, the explanations and descriptions of the beneficial effects of any of the BIOS-side central processing unit frequency modulation devices provided above can be found in the corresponding method embodiments described above, and will not be repeated here.

[0153] For example, Figure 9 A schematic diagram of the frequency modulation device structure of the BMC-side central processing unit provided in an embodiment of this application is shown. Figure 9 As shown, the frequency modulation device of the BMC-side central processing unit is used in a computing device. The frequency modulation device 800 of the BMC-side central processing unit includes:

[0154] The acquisition module 801 is used to acquire timing parameters; the timing parameters are used to indicate the period for acquiring CPU utilization.

[0155] The trigger module 802 is used to trigger the target timer according to the period indicated by the timing parameters, so that the input / output system BIOS can obtain the CPU utilization rate when the target timer is triggered. It receives an acquisition command sent by the BIOS, which instructs the BMC to acquire the current CPU utilization rate; and sends the current CPU utilization rate to the BIOS. The BIOS determines the target operating frequency of the CPU based on the CPU utilization rate and sends the target operating frequency to the operating system (OS) running on the CPU, so that the OS adjusts the CPU operating frequency to the target operating frequency.

[0156] In one possible implementation, the acquisition module 801 is also used to obtain timing parameters from the BIOS.

[0157] In one possible implementation, the trigger module 802 is also used to trigger the target timer according to the period indicated by the timing parameters, so that the input / output system BIOS can obtain the CPU utilization from the management engine ME or the management software firmware iBMA.

[0158] For a detailed description of the above optional methods, please refer to the foregoing. Figure 5 , Figure 6 The method embodiments described herein will not be repeated here. Furthermore, the explanations and descriptions of the beneficial effects of any of the BMC-side central processing unit frequency modulation devices provided above can be found in the corresponding method embodiments described above, and will not be repeated here.

[0159] This application embodiment also provides a computing device, which includes: a processor, an out-of-band management controller (BMC), and a memory; the processor is coupled to the memory; the processor is used to run a basic input / output system (BIOS), and the memory is used to store computer instructions, which are loaded and executed by the processor or the BMC to enable the computing device to implement the frequency modulation method of the central processing unit described above.

[0160] This application also provides a computer-readable storage medium storing at least one computer instruction, which is loaded and executed by a processor to implement the frequency modulation method of the central processing unit as described in the above embodiments. For explanations and descriptions of the beneficial effects of any of the computer-readable storage media provided above, please refer to the corresponding embodiments above; further details will not be repeated here.

[0161] This application also provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform any of the methods described 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, all or part of the flow or function according to the embodiments of this application is generated. 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. For example, computer instructions may be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, 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 may include one or more data storage devices such as servers or data centers that can be integrated with the medium. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.

[0162] It should be noted that the devices for storing computer instructions or computer programs provided in the embodiments of this application, such as, but not limited to, the aforementioned memory, computer-readable storage medium, and communication chip, are all non-transitory. Those skilled in the art should recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.

[0163] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A frequency modulation method of a central processing unit, characterized by, The method is executed by the Input / Output System (BIOS), which runs on the Central Processing Unit (CPU). The method includes: Send an acquisition command to the BMC, the acquisition command being used to instruct the BMC to acquire the current CPU utilization rate; The current CPU utilization rate is obtained from the BMC, which is obtained by the BMC from the management engine ME or the management software firmware iBMA; Determine the target operating frequency of the CPU based on the current CPU utilization rate; The target operating frequency is sent to the operating system (OS) running on the CPU, so that the OS adjusts the CPU's operating frequency to the target operating frequency.

2. The method of claim 1, wherein, Before obtaining the current CPU utilization from the BMC, the method further includes: Obtain timing parameters; the timing parameters are used to indicate the period for obtaining the CPU utilization rate; Based on the timing parameters, a retrieval command is sent to the BMC.

3. The method of claim 2, wherein, The step of obtaining the CPU utilization rate based on the timing parameters includes: The timing parameters are sent to the out-of-band management controller (BMC); the BMC includes a target timer; the target timer is used to trigger the acquisition of the CPU utilization rate according to the period indicated by the timing parameters; When an interrupt triggered by the target timer is received, the CPU utilization rate is obtained.

4. The method according to any one of claims 1 to 3, characterized in that, The CPU adjusts its operating frequency by adjusting the performance level (P state). Determining the target operating frequency of the CPU based on the CPU utilization rate includes: Based on the correspondence between CPU utilization and the P state level, the target P state level of the CPU is determined; the target level indicates the target operating frequency.

5. A method of frequency modulation of a central processing unit, characterized by The method is executed by the out-of-band management controller (BMC), and the method includes: Obtain timing parameters; the timing parameters are used to indicate the period for obtaining CPU utilization. The target timer is triggered according to the period indicated by the timing parameters, so that the input / output system BIOS can obtain the CPU utilization when the target timer is triggered; Receive an acquisition command sent by the BIOS, the acquisition command being used to instruct the BMC to acquire the current CPU utilization rate, the CPU utilization rate being acquired by the BMC from the management engine ME or management software firmware iBMA; Send the current CPU utilization rate to the BIOS; The BIOS is used to determine the target operating frequency of the CPU according to the CPU utilization rate, and send the target operating frequency to the operating system OS running on the CPU, so that the OS adjusts the operating frequency of the CPU to the target operating frequency.

6. The method of claim 5, wherein, The acquisition of timing parameters includes: The timing parameters are obtained from the BIOS.

7. The method according to claim 5 or 6, characterized in that, The CPU adjusts its operating frequency by adjusting the performance P state level; the target operating frequency is represented by the target level; the target level is determined by the BIOS according to the correspondence between the CPU utilization rate and the P state level.

8. A computing device, comprising: The computing device includes: a processor, an out-of-band management controller (BMC), and a memory; the processor is coupled to the memory; the processor is used to run a basic input / output system (BIOS), and the memory is used to store computer instructions, which are loaded and executed by the processor or the BMC to enable the computing device to implement the frequency modulation method of the central processing unit as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and equipment for adjusting processor frequency

    CN103488532A

  • CPU frequency adjusting method and system and storage medium

    CN115686178A