Configuration method and configuration device of central processing unit, storage medium, electronic equipment and computer program product
By receiving configuration trigger instructions in the server and reading target configuration information from external memory to configure the central processor, the problem of low matching between CPU configuration and application scenarios is solved, and rational resource utilization and cost reduction are achieved.
Patent Information
- Application Number
- CN202510391230.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-03-31
AI Technical Summary
In the prior art, the CPU configuration of the server has a low degree of matching with the application scenario, resulting in waste of resources and increased application costs.
By receiving the configuration trigger instruction of the central processor, the target configuration information is read from the external memory, and the central processor is configured based on the information to meet different application scenarios.
It improves the matching degree between CPU configuration and application scenarios, realizes the rational utilization of resources, and reduces power consumption and application costs.
Smart Images

Figure CN119902821A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of parameter configuration technology, and in particular to a configuration method for a central processing unit, a configuration device for a central processing unit, a computer-readable storage medium, an electronic device, and a computer program product. Background Art
[0002] With the rise of AI (Artificial Intelligence) technology and cloud services, the requirements for servers are getting higher and higher.
[0003] In the related technology, during the production process, each server is configured with CPU (Central Processing Unit) parameters according to the hardware assembly. During the factory application process, the technicians select the server according to the construction requirements of the application scenario. However, due to the limitations of server types, the matching degree with the application scenario requirements is low. Users usually choose servers with CPU configurations higher than the application requirements, which increases power consumption, wastes resources and increases application costs. Summary of the invention
[0004] The present application provides a configuration method, a configuration device, a storage medium, an electronic device and a computer program product of a central processing unit, so as to at least solve the problem in the related art that the CPU configuration of the server is not well matched with the application scenario, which easily causes waste of resources and increases application costs.
[0005] The present application provides a configuration method for a central processing unit, comprising the following steps: receiving a configuration trigger instruction of the central processing unit; in response to the configuration trigger instruction, reading target configuration information of the central processing unit from an external memory, wherein the target configuration information is within a preset allowable configuration range so as to be stored in the external memory; and configuring the central processing unit according to the target configuration information.
[0006] The present application also provides a configuration device for a central processing unit, including: a receiving module for receiving a configuration trigger instruction of the central processing unit; an acquisition module for reading target configuration information of the central processing unit from an external memory in response to the configuration trigger instruction, wherein the target configuration information is within a preset allowable configuration range to be stored in the external memory; and a configuration module for configuring the central processing unit according to the target configuration information.
[0007] The present application also provides a computer-readable storage medium on which a configuration program of a central processing unit is stored. When the configuration program of the central processing unit is executed by a processor, the configuration method of the central processing unit is implemented.
[0008] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned central processing unit configuration methods when executing the computer program.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned central processing unit configuration methods when executed by a processor.
[0010] Through the present application, when a configuration trigger instruction is received, the target configuration information of the central processing unit is read from the external memory to configure the parameters of the central processing unit to meet different application scenarios and improve the matching of the configuration of the central processing unit with the requirements of the application scenarios. Therefore, the problem of low matching between the CPU configuration of the server and the application scenario in the related technology can be solved, and the effect of realizing rational utilization of resources, reducing power consumption and application costs without changing the CPU hardware can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0012] Figure 1 A flowchart of a method for configuring a central processing unit provided in an embodiment of the present application; Figure 2 A schematic diagram of a system architecture provided for a specific embodiment of the present application; Figure 3 A flowchart of a method for configuring a central processing unit provided in a specific embodiment of the present application; Figure 4 A connection diagram of a configuration device for a central processing unit provided in an embodiment of the present application; Figure 5 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0014] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0015] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0016] With the rise of AI technology and cloud services, the use of servers is increasing. The problem of server power consumption needs to be solved urgently. It is important in many aspects. Specifically, it is analyzed from the following aspects: (1) Operating costs: Power consumption directly determines the electricity consumption of the server during operation. Data centers usually have a large number of servers, and electricity costs are an important part of their operating costs. The higher the power consumption of the server, the more electricity bills need to be paid; high-power servers usually require more powerful cooling systems to ensure their stable operation, which will increase the hardware procurement and installation costs.
[0017] (2) Performance and stability: Power consumption is closely related to server performance. To a certain extent, improving server performance often requires increasing power consumption, but if power consumption is too high, it may cause the server to overheat, leading to performance degradation. Excessive power consumption will cause server hardware to be in a high-temperature environment for a long time, accelerating hardware aging and damage, and reducing the service life and stability of the server. For example, high temperature can cause the metal interconnect structure of electronic components to migrate, resulting in circuit short circuits or open circuits, increasing the probability of server failure.
[0018] (3) Business expansion and planning: Servers with lower power consumption generate relatively less heat. When the space in the computer room is limited, servers can be deployed more densely to improve the utilization rate of the computer room space. For some data centers with limited space, this can expand the business scale and increase the number of servers deployed to meet the needs of business growth without increasing too much site costs.
[0019] (4) Power capacity planning: Lower server power consumption means that during the construction and operation of a data center, the capacity demand for the power supply system is relatively low. This can reduce the investment and upgrade costs of power infrastructure and reduce the pressure on power supply. When planning a data center, a reasonable assessment of server power consumption will help accurately plan power capacity and avoid limiting business development due to insufficient power supply.
[0020] (5) Environment and sustainability: With the rapid development of information technology, the number of servers is increasing and their energy consumption is also rising. Reducing server power consumption can improve the utilization efficiency of energy resources.
[0021] Therefore, it is particularly important to meet the business needs of servers while saving power consumption to the maximum extent.
[0022] In order to solve at least one of the above technical problems, an embodiment of the present application proposes a configuration method of a central processing unit (CPU), which adjusts the CPU configuration without changing the CPU entity, thereby optimizing the CPU's operating power consumption while meeting business requirements and reducing application costs. The method is described in detail below in conjunction with the execution flow of the configuration method of the central processing unit.
[0023] Figure 1 A flowchart of a method for configuring a central processing unit provided in an embodiment of the present application.
[0024] like Figure 1 As shown, the configuration method of the central processing unit of the embodiment of the present application includes the following steps: S1, receiving the configuration trigger instruction from the central processor; S2, in response to the configuration trigger instruction, reading target configuration information of the central processor from the external memory, wherein the target configuration information is within a preset allowable configuration range so as to be stored in the external memory; S3, configuring the central processing unit according to the target configuration information.
[0025] Specifically, the CPU is the computing core and control core of the computer, and is mainly responsible for interpreting and executing computer instructions, processing data, and controlling the operation of other hardware devices. The configuration trigger instruction of the CPU can be a power-on trigger or a configuration instruction sent by the user, etc., without specific limitation.
[0026] The external memory is a storage unit after receiving the target configuration information. Figure 2As shown, after the BMC (Baseboard Management Controller) receives the target configuration information, it compares the target configuration information with the preset allowable configuration range. If the configuration data of the target configuration information is within the preset allowable configuration range, the target configuration information is sent to the external memory for storage, so that the information can be called when the configuration trigger instruction is received later. The preset allowable configuration range can be set according to the hardware parameters of the central processing unit to ensure that the configured central processing unit can be used normally. The external memory can be a dynamic random access memory (DRAM), a static random access memory (SRAM), etc., which can be defined according to actual needs.
[0027] After receiving the configuration trigger instruction, this embodiment obtains the target configuration information from the external memory according to the configuration trigger instruction, and sends the target configuration information to the central processor, so that the central processor can perform parameter configuration according to the target configuration information, thereby performing custom configuration of the central processor based on customer needs, and achieving the technical effect of reducing power consumption and application costs while meeting application requirements. In addition, by storing the target configuration information received by the BMC in the external memory, data stability and data security can be further improved.
[0028] In one embodiment of the present application, the target configuration information includes target power and / or target number of cores.
[0029] Specifically, the power and core of the central processing unit (CPU) are two closely related concepts, which together determine the performance and power consumption of the CPU. Among them, the power of the CPU usually refers to its thermal design power consumption (TDP). TDP refers to the power consumption of the CPU when it reaches maximum load under standard working conditions, usually in watts (W). The core of the CPU refers to the physical processing unit inside the CPU. Each core can perform tasks independently. A multi-core CPU has multiple cores, which can process multiple tasks in parallel, thereby improving the overall processing power. The number of cores directly affects the multi-tasking capability of the CPU. For multi-core CPUs, they usually have 4 cores, 6 cores, 8 cores or even more cores, which enables them to handle complex tasks and multi-threaded applications more efficiently. The number of cores is also one of the important factors affecting the power consumption of the CPU. More cores mean more processing units working at the same time, which leads to higher power consumption.
[0030] During the configuration of the central processing unit, the CPU power consumption can be configured separately, in which case the target configuration information only includes the target power; the number of CPU cores can be configured separately, in which case the target configuration information only includes the target number of cores; the CPU power consumption and the number of CPU cores can also be configured at the same time, in which case the target configuration information includes the target power and the target number of cores to meet the needs of different application scenarios.
[0031] In the case where the target configuration information includes the target power, the target power can limit the total power upper limit of the CPU operation, or it can be matched to the operating power in each CPU core, thereby limiting the power upper limit of each CPU core. In a multi-core CPU, multiple processor cores are integrated into one chip, and each core is an independent processing unit that can perform different tasks at the same time. Therefore, the amount of tasks for each CPU core is different. Therefore, the target power can also be used to limit the operating power of a certain CPU core in a targeted manner, such as raising the power upper limit of the CPU core with higher computing requirements based on the application scenario, or lowering the upper limit of the CPU core with lower computing requirements based on the application scenario. In addition, the power can be set differently in combination with the relative position of each CPU core and the heat sink, that is, the CPU core close to the heat sink, that is, the area with better heat dissipation effect, is given a higher power upper limit, and the CPU core relatively far from the heat sink, that is, the area with poor heat dissipation effect, is given a lower power upper limit to avoid the occurrence of local overheating.
[0032] When the target configuration information includes the target number of cores, the central processing unit can determine the number of CPU cores in working state according to the target number of cores, thereby controlling the CPU cores and planning reasonable application paths and function implementations.
[0033] Therefore, this embodiment can flexibly set the target power and / or target number of cores based on application requirements to match the application scenario without changing the CPU entity, improve the rationality of resource utilization, and reduce the CPU's operating power consumption.
[0034] In one embodiment of the present application, the external memory is a general flash memory storage area of a programmable logic device.
[0035] Specifically, a programmable logic device (PLD) is a general-purpose integrated circuit whose logic functions are defined by user programming. It is suitable for the design and implementation of various digital systems, including programmable array logic (PAL), complex programmable logic device (CPLD), field-programmable gate array (FPGA), etc.
[0036] by Figure 2 For example, the target configuration information is received through the BMC. In order to avoid the failure of this key setting to take effect due to an abnormality in the BMC during operation, the target setting information is no longer passed to the BIOS (Basic Input Output System) every time through the BMC, but the setting information is passed to the BIOS by the CPLD (Complex Programmable Logic Device). That is, the BMC sends and stores the target configuration information in the UFM (Universal Flash Storage) area of the CPLD. Among them, the BMC, as the management controller of the server, can realize the management and control of the server, including the power consumption management of the server.
[0037] Since the values in the UFM area of the CPLD will not disappear or change in the case of AC (Alternating Current), DC (Direct Current), or when the CPLD firmware is upgraded, the data is stable and will not be lost, ensuring that the target configuration information can be successfully retrieved when a configuration trigger command is received.
[0038] In one embodiment of the present application, before receiving the configuration trigger instruction of the central processing unit, it also includes: obtaining the initial configuration information of the central processing unit and the target configuration information of the central processing unit; when the target configuration information is different from the initial configuration information and the target configuration information is within a preset allowable configuration range, storing the target configuration information in an external memory.
[0039] Specifically, the initial configuration information of the CPU can be general configuration information defined based on the production line of the CPU, or can be factory general configuration information with custom settings. The preset allowable configuration range is the parameter configurable range determined based on the hardware configuration of the CPU.
[0040] by Figure 2For example, after each startup of the BIOS, the number of CPU cores and power consumption of the current CPU, that is, the initial configuration information, and the range of the number of cores and power consumption supported by the CPU, that is, the preset allowable configuration range, are sent to the BMC.
[0041] When the project is shipped, the package setting tool is used to set the CPU power consumption and number of CPU cores specified by the customer for the package, that is, the target configuration information, to the BMC, and then the BMC compares the received target configuration information with the initial configuration information. If the target configuration information is the same as the initial configuration information, the target configuration information received this time can be ignored to avoid repeating the configuration process. If the target configuration information is different from the initial configuration information, the target configuration information is further compared with the preset allowable configuration range. If the target configuration information is within the preset allowable configuration range, it is considered that the hardware configuration of the central processing unit is applicable to the target configuration information, and the target configuration information is sent to the UFM area of the CPLD for storage, so as to facilitate data call when the configuration trigger instruction is received later. If the target configuration information is not within the preset allowable configuration range, it is considered that the hardware configuration of the central processing unit cannot meet the customer's customization requirements, an alarm is issued, and the target configuration information will not be sent to the UFM area of the CPLD.
[0042] When receiving the target configuration information, this embodiment filters the target configuration information through the initial configuration information of the central processing unit and the preset allowed configuration range. On the one hand, it can avoid repeated configuration, and on the other hand, it can ensure that the hardware architecture of the central processing unit is compatible with the target configuration information, so as to improve the success rate of subsequent configurations and the actual application effect of the configured central processing unit.
[0043] Furthermore, when the target configuration information is the same as the initial configuration information, a synchronization reminder may be issued to notify the technician that the configuration has been completed, thereby avoiding repeated operations by the technician.
[0044] In one embodiment of the present application, the configuration method of the central processing unit further includes: in response to a viewing instruction of the central processing unit, displaying a preset allowed configuration range and initial configuration information.
[0045] Specifically, the viewing instruction can be received through the interactive screen, so that before the technician enters the target configuration information, the preset allowable configuration range and initial configuration information of the central processing unit can be viewed in advance through the display screen, so that the target configuration information can be entered based on the preset allowable configuration range and initial configuration information, thereby speeding up the input process of the target configuration information that meets the configuration operation and accelerating the configuration progress.
[0046] For example, the technician can check the preset allowable configuration range and the initial configuration information. If it is determined that the target configuration information customized by the customer is the same as the initial configuration information, the target configuration information does not need to be input at this time, and the configuration completed button is triggered to mark the current central processing unit as configured. If it is determined that one of the target configuration information customized by the customer is the same as the initial configuration information, such as the same number of CPU cores, only the target power can be input as the target configuration information at this time, thereby speeding up the configuration progress. In addition, when it is determined that the target configuration information is different from the initial configuration information, the target configuration information can be adjusted in advance with reference to the preset allowable configuration range. For example, when the target configuration information customized by the customer is outside the preset allowable configuration range, the target configuration information can be input without input. At this time, other servers can be selected according to the target configuration information customized by the user, so as to select the central processing unit that supports the target configuration information, realize autonomous selection operation, or seek other adjustment strategies, and adjust the target configuration information to the preset allowable configuration range on the premise of meeting the requirements of the customized application scenario, thereby avoiding the input of invalid target configuration information and data processing process.
[0047] In one embodiment of the present application, when the target configuration information is different from the initial configuration information and the target configuration information is within a preset allowable configuration range, it also includes: sending and storing the target configuration information to a backup memory, so that when a configuration data call instruction is received, the target configuration information stored in the backup memory is called.
[0048] Specifically, the backup memory is used to back up and store the target configuration information sent to the external memory for subsequent data calls. The backup memory can be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), electrically erasable programmable read-only memory (EPROM), etc.
[0049] Continue with Figure 2For example, using EEPROM (Electrically Erasable Programmable read only memory) as a backup memory can ensure that data is not lost after power failure. After the BMC receives the target configuration information, it compares the target configuration information with the initial configuration information and the preset allowable configuration range. When it is determined that the target configuration information is different from the initial configuration information and the target configuration information is within the allowable configuration range, it is determined that the parameter configuration operation of the central processing unit can be performed according to the target configuration information. At this time, the BMC stores the set target configuration information in the EEPROM for backup to avoid loss when the BMC is powered off. On the other hand, it sends the set target configuration information to the CPLD, which is stored in the UFM area by the CPLD for subsequent configuration of the central processing unit.
[0050] The configuration data calling instruction is used to call the target configuration information that meets the configuration requirements. The configuration data calling instruction is used to apply the target configuration information to other tasks besides the central processing unit configuration, such as configuration data comparison, data viewing, etc. Therefore, this embodiment sets the data calling path of the target configuration information and the path for configuring the central processing unit by the target configuration information separately, that is, the data is applied except for the central processing unit configuration through the backup memory, and the data is read and the central processing unit is configured through the external memory, thereby avoiding mutual influence of data action scenarios and improving the implementation stability of the data calling and configuration process.
[0051] After storing the target configuration information in the backup memory and the external memory, this embodiment retrieves the target configuration information from the backup memory if a configuration data call instruction is received, and reads the target configuration information from the external memory if a configuration trigger instruction is received. This achieves the distinction of data application paths, improves the application stability of the target configuration information, and stably implements the configuration process of the central processing unit while improving data storage stability and security.
[0052] In one embodiment of the present application, after configuring the central processing unit based on the target configuration information, the configuration method of the central processing unit also includes: obtaining actual configuration information of the central processing unit and retrieving the target configuration information from the backup memory; when the actual configuration information is inconsistent with the target configuration information, generating a first alarm signal, and alerting the user based on the first alarm signal.
[0053] Specifically, combined Figure 2As shown, the actual configuration information can be obtained through BIOS and sent to the BMC application. After receiving the data sent by BIOS, BMC compares it with the data in EEPROM. If they are consistent, it proves that the setting is successful, and sends a SEL (System Event Log) log for recording. If the setting is unsuccessful, SEL log recording is also performed. At the same time, the system health light will be turned on, and the fan speed will be increased to 80% speed to remind the operation and maintenance and production line setting personnel that the current setting has failed and needs to be intercepted and processed for analysis.
[0054] In the above-mentioned cases where the configuration information is inconsistent, the user is alarmed by lighting the system health light and increasing the fan speed to 80%. In addition to the above-mentioned alarm methods, differentiated alarms can also be made based on the inconsistency between the actual configuration information and the target configuration information. The first alarm signal can be generated accordingly based on the inconsistency between the actual configuration information and the target configuration information, so as to control different alarm methods to remind the user. For example, in the case where the target configuration information includes the target power and the target number of cores, the actual configuration information includes the actual CPU power and the actual number of CPU cores. If the target power is consistent with the actual CPU power and the target number of cores is different from the actual number of CPU cores after information comparison, the first alarm signal generated at this time is a CPU core number configuration failure alarm signal, which can control the first warning light to light up, the first fault code to display, and the fan speed to 80%; if the target number of cores is consistent with the actual number of CPU cores and the target power is different from the actual CPU power after information comparison, the first alarm signal generated at this time is a CPU core number configuration failure alarm signal. U power configuration failure alarm signal can control the second warning light to light up, the second fault code to display, and the fan speed to 80% speed; if the target number of cores and the actual number of CPU cores, and the target power and the actual CPU power are inconsistent after information comparison, the first alarm signal generated at this time is the CPU core number and CPU power configuration failure alarm signal, which can control the first warning light and the second warning light to light up, the third fault code to display, and the fan speed to 80% speed, so as to give differentiated alarms to technicians, so that they can find the configuration fault area in time, which is convenient for subsequent fault inspection and processing.
[0055] In addition, the acquisition of the above-mentioned actual configuration information can be confirmed according to the type of target configuration information. For example, when the target configuration information only includes the target power, only the actual CPU power is obtained for subsequent information comparison and judgment; when the target configuration information only includes the target number of cores, only the actual number of CPU cores is obtained for subsequent information comparison and judgment; when the target configuration information includes the target power and the target number of cores, the actual CPU power and the actual number of CPU cores are obtained, thereby reducing the workload of data collection and data comparison and speeding up work progress.
[0056] Furthermore, when the target configuration information only includes the target power or the target number of cores, the actual CPU power and the actual number of CPU cores can also be acquired synchronously, and the actual signal of the unconfigured information type can be compared with the initial configuration information, and the actual signal of the configured signal type can be compared with the target configuration information to verify the final configuration of the central processing unit, and further generate a corresponding alarm signal based on the comparison result to trigger an alarm reminder based on the alarm signal. For example, when the target configuration information only includes the target power, the actual CPU power is compared with the target power, and the actual number of CPU cores is compared with the initial number of CPU cores. If the two are consistent, the configuration is determined to be successful. If one of them is inconsistent or both are inconsistent, the configuration is considered to have failed, and a first alarm signal is generated to remind the user. For example, when the actual CPU power is consistent with the target power, but the actual number of CPU cores is inconsistent with the initial number of CPU cores, it is considered that the power configuration process has affected the number of CPU cores of the central processing unit, and the first alarm signal generated is a CPU core number misconfiguration alarm. The corresponding warning light, fault code, etc. can be triggered based on the first alarm signal to remind the user. When the actual CPU power is inconsistent with the target power, and the actual number of CPU cores is consistent with the initial number of CPU cores, it is considered that the power configuration has failed, and the first alarm signal generated is a CPU power configuration failure alarm signal. Based on the first alarm signal, the second warning light can be controlled to light up, the second fault code can be displayed, and the fan speed can be increased to 80%.
[0057] This embodiment can generate a first alarm signal when the actual configuration information is inconsistent with the target configuration information, and remind the user of the configuration failure based on the first alarm signal, so that the user can perform subsequent processing in time.
[0058] In one embodiment of the present application, obtaining actual configuration information of a central processing unit includes: obtaining current configuration information of the central processing unit; and when the current configuration information of the central processing unit is different from the initial configuration information, using the current configuration information of the central processing unit as the actual configuration information of the central processing unit.
[0059] Specifically, combined Figure 2 As shown, after the next power-on, the CPLD receives a configuration trigger instruction and reads the preset target configuration information from the UFM area, where the target configuration information includes the target power consumption, and is transmitted to the CPU through the eSPI (Enhanced Serial Peripheral Interface) bus for power consumption setting to take effect.
[0060] Then, the current CPU power consumption of the central processing unit is monitored in real time. When it is determined that the current CPU power consumption is different from the initial CPU power consumption, the power consumption is considered to be effective and the power consumption configuration is completed. Then, the current CPU power consumption obtained is used as the actual CPU power consumption, and the current number of CPU cores obtained is used as the actual number of CPU cores and sent to the BMC for information comparison to determine whether the configuration is successful, thereby improving the configuration evaluation rate.
[0061] When the target configuration information includes target power consumption and target number of cores, whether the configuration is completed can be determined only based on whether the current CPU power consumption or the current number of CPU cores is different from the initial configuration. Alternatively, the current CPU power consumption and the current number of CPU cores can be compared with the initial configuration at the same time to determine whether the configuration is completed, and the actual configuration information can be obtained after the configuration is completed.
[0062] In addition, in order to ensure the configuration progress, the configuration cycle needs to be preset. During the configuration of the central processing unit according to the target configuration information, if the current configuration information obtained within the preset configuration cycle is always consistent with the initial configuration information, the configuration is considered to have failed, and an alarm is issued to the user to avoid wasting time due to the situation where the configuration information of the central processing unit has not changed due to a fault, thereby improving the rationality of configuration control.
[0063] In one embodiment of the present application, after configuring the central processor according to the target configuration information, the method further includes: receiving a reconfiguration instruction of the central processor; and clearing the configuration information in the backup memory and the external memory in response to the reconfiguration instruction.
[0064] Specifically, the reconfiguration instruction is a package setting change instruction received again after the central processor is configured according to the target configuration information. At this time, the EEPROM area of the motherboard and the UFM area of the CPLD are cleared through the BMC according to the reconfiguration instruction, and everything is restored to the unset state for use by other packages. Among them, other packages include target configuration information customized by users.
[0065] Then, after receiving the target configuration information again, the target configuration information received again is compared with the initial configuration information and the preset allowable configuration range, and the target configuration information that meets the requirements is stored in the EEPROM area on the one hand, and in the UFM area of the CPLD on the other hand, so as to execute the configuration process when the configuration trigger instruction is received.
[0066] When receiving a reconfiguration instruction, this embodiment clears the configuration information in the backup memory and the external memory for use by other packages.
[0067] In one embodiment of the present application, the configuration method of the central processor further includes: when the target configuration information is outside a preset allowable configuration range, generating a second alarm signal, and alerting the user based on the second alarm signal.
[0068] That is to say, the preset allowable configuration range is the parameter configuration range supported by the central processor, which can be set based on the hardware structure of the central processor. For example, when the project is shipped, the package setting tool is used to set the CPU power consumption number set by the package customer, that is, the target configuration information, to the BMC. When the user-customized target configuration information is within the preset allowable configuration range, the configuration of the central processor based on the target configuration information is allowed. At this time, the target configuration information is stored in the external memory for subsequent configuration reading applications; when the user-customized target configuration information is outside the preset allowable configuration range, that is, the set target power value is not the power consumption number supported in the preset allowable configuration range, a second alarm signal will be generated to indicate that the package setting has failed.
[0069] The second alarm signal can be distinguished and determined according to the relative relationship between the target configuration information and the preset allowable configuration range. For example, in the case where the target configuration information includes the target power and the target number of cores, if the target power is within the preset allowable configuration range and the target number of cores is outside the preset allowable configuration range, the second alarm signal generated at this time is a target number of cores setting failure alarm, which can trigger the corresponding first package setting failure reminder; if the target number of cores is within the preset allowable configuration range and the target power is outside the preset allowable configuration range, the second alarm signal generated at this time is a target power setting failure alarm, which can trigger the corresponding second package setting failure reminder.
[0070] In addition, the second alarm signal can also make further division reminders based on the numerical difference between the target configuration information and the preset allowable configuration range. For example, when the target power differs greatly from the preset allowable configuration range, the second alarm signal can be at the highest level, such as increasing the flashing frequency of the warning light corresponding to the target power setting failure alarm and adjusting the warning code color to red. Based on the alarm reminder, the user can determine that it is difficult to meet the preset allowable configuration range of the central processor through data adjustment of the target configuration information, and other central processors need to be selected, thereby avoiding subsequent redundant configuration work; when the target power differs little from the preset allowable configuration range, the second alarm signal can be at a lower level, such as controlling the warning light corresponding to the target power setting failure alarm to be always on and adjusting the warning code color to yellow. Based on the alarm reminder, the user can determine that the preset allowable configuration range of the central processor can be met through data fine-tuning of the target configuration information, so as to perform subsequent configuration adjustment work based on the alarm reminder.
[0071] This embodiment can use the second alarm signal to provide differentiated reminders for setting failure situations, so that the user can accurately identify the root cause of the package setting failure according to the alarm type, perform fault processing in a timely manner, and improve the setting progress.
[0072] In one embodiment of the present application, the configuration method of the central processing unit further includes: clearing target configuration information stored in an external memory in response to an initialization instruction; and restoring the central processing unit to initial configuration information based on the cleared external memory.
[0073] Specifically, initialization refers to the process of setting a system, variable, object, or other usable component to its initial state or initial value in computer science and software development.
[0074] Continue with Figure 2 For example, after completing the configuration of the central processing unit according to the target configuration information, if an initialization instruction is received, the target configuration information in the UFM area of the CPLD is cleared according to the initialization instruction, so that the number of cores and / or power consumption of the CPU is no longer customized, and the central processing unit is restored to the default value, that is, the initial configuration information, simplifying the initialization operation steps.
[0075] As a specific embodiment of the present application, the system architecture for executing the configuration method of the central processing unit is as follows: Figure 2 As shown, the configuration method of the central processor is as follows Figure 3 As shown, the following steps are included: S101, after the BIOS is started, the initial configuration information of the CPU and the preset allowed configuration range are sent to the BMC.
[0076] The initial configuration information of the CPU includes the number of CPU cores and power consumption currently running on the CPU, and the preset allowable configuration range of the CPU includes the number of cores and power consumption supported by the current CPU.
[0077] S102, when the project is shipped, the package setting tool is used to set the target configuration information set by the package customer to the BMC. The target configuration information may include target power consumption and / or target number of cores.
[0078] S103, determine whether the target configuration information is different from the initial configuration information. If yes, execute step S104; if no, execute step S116.
[0079] S104, determining whether the target configuration information is within a preset allowable range. If yes, executing step S105; if no, executing step S106.
[0080] S105, the BMC stores the target configuration information in the EEPROM for backup, and sends the target configuration information to the CPLD, which stores the target configuration information in the UFM area. Execute step S107.
[0081] In this step, in order to prevent this key setting from becoming ineffective due to BMC anomalies during operation, the setting information is no longer passed to the BIOS through the BMC each time, but is passed to the BIOS by the CPLD. The values AC and DC in the UFM area and the firmware of the upgraded CPLD will not disappear or change, so the data is stable and will not be lost.
[0082] In addition, BMC provides instructions to set and query the current number of CPU cores and power consumption to EEPROM for backup.
[0083] S106: Generate a second alarm signal, and warn the user based on the second alarm signal, so that the user can check the target configuration information based on the second alarm signal.
[0084] S107, when power is turned on next time, confirm that the configuration trigger instruction is received.
[0085] S108 , in response to the configuration trigger instruction, the CPLD reads target configuration information from the UFM area.
[0086] S109, transmitting the target configuration information to the CPU via the eSPI bus to make the configuration effective.
[0087] Among them, BIOS can synchronize the target configuration information to the setup option Package PL1 Power Limit and execute the Package RAPL limit Lock action to prohibit the configuration modification of the central processing unit under the OS (Operating System).
[0088] S110, obtaining current configuration information of the central processing unit; S111, determine whether the current configuration information is different from the initial configuration information. If yes, execute step S113; if no, execute step S112.
[0089] S112, determine whether the actual configuration time reaches the preset configuration time. If yes, execute step S117; if no, execute step S110.
[0090] S113, using the current configuration information as the actual configuration information of the central processing unit.
[0091] S114, the BMC receives the actual configuration information and retrieves the target configuration information from the backup memory.
[0092] S115, determine whether the actual configuration information is consistent with the target configuration information. If yes, execute step S116; if no, execute step S117.
[0093] In one embodiment, after AC operation, ipmitool (Intelligent Platform Management Interface Tool) is used to check whether BMC records abnormal alarms, including other configuration abnormalities in the package and RPAL (Robotic Process Automation) setting abnormal alarms. If the check passes, the process ends, otherwise check whether the configuration information is normal.
[0094] S116, the BMC determines that the central processor is configured successfully, and sends a SEL log for recording.
[0095] In addition, after successful configuration, when receiving the initialization command, it supports clearing the CPLD UFM area function, so that the number of CPU cores and power consumption are no longer customized and restored to the default values.
[0096] S117: The BMC determines that the CPU configuration has failed and records the failure in the SEL log. At the same time, it turns on the system health indicator and increases the fan speed to 80% to remind the user.
[0097] That is to say, after the BIOS is started, the current number of CPU cores and power consumption will be sent to the BMC, which will compare and confirm them. If they are inconsistent with the settings, an alarm will be issued and the fan speed will be increased to inform the operation and maintenance personnel that there is a setting problem.
[0098] Therefore, this embodiment can set the number of CPU cores and power consumption without changing the CPU entity when the project is shipped, so that there is no need to customize and replace the CPU again when shipping and applying, and it is convenient for modification and maintenance, which has objective economic significance.
[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0100] In summary, according to the configuration method of the central processing unit of the embodiment of the present application, when receiving the configuration trigger instruction of the central processing unit, in response to the configuration trigger instruction, the target configuration information of the central processing unit is read from the external memory, and the target configuration information is stored in the external memory and is within the preset allowable configuration range, and then the central processing unit is configured according to the target configuration information. Therefore, when receiving the configuration trigger instruction, the method configures the parameters of the central processing unit by reading the target configuration information of the central processing unit from the external memory to meet different application scenarios, so that the CPU configuration matches the application scenario, thereby solving the problem of low matching between the CPU configuration of the server and the application scenario in the related art, and achieving the effect of realizing reasonable utilization of resources, reducing power consumption and application costs without changing the CPU hardware.
[0101] The embodiment of the present application also provides a configuration device of a central processing unit, such as Figure 4 As shown, the configuration device of the central processing unit includes: a receiving module 10, an acquisition module 20 and a configuration module 30.
[0102] Among them, the receiving module 10 is used to receive the configuration trigger instruction of the central processing unit; the acquisition module 20 is used to respond to the configuration trigger instruction and read the target configuration information of the central processing unit from the external memory, wherein the target configuration information is within the preset allowable configuration range to be stored in the external memory; the configuration module 30 is used to configure the central processing unit according to the target configuration information.
[0103] According to one embodiment of the present application, the external memory is a general flash memory storage area of a programmable logic device.
[0104] According to one embodiment of the present application, before receiving the configuration trigger instruction of the central processing unit, the acquisition module 20 is also used to: obtain the initial configuration information of the central processing unit and the target configuration information of the central processing unit; when the target configuration information is different from the initial configuration information and the target configuration information is within a preset allowable configuration range, store the target configuration information in an external memory.
[0105] According to an embodiment of the present application, the acquisition module 20 is further used to: display the preset allowed configuration range and initial configuration information in response to a viewing instruction of the central processing unit.
[0106] According to one embodiment of the present application, when the target configuration information is different from the initial configuration information and the target configuration information is within a preset allowable configuration range, the acquisition module 20 is also used to: send and store the target configuration information to a backup memory, so as to call the target configuration information stored in the backup memory when a configuration data call instruction is received.
[0107] According to one embodiment of the present application, after configuring the central processing unit based on the target configuration information, the acquisition module 20 is also used to: obtain the actual configuration information of the central processing unit, and retrieve the target configuration information from the backup memory; when the actual configuration information is inconsistent with the target configuration information, generate a first alarm signal, and alarm the user based on the first alarm signal.
[0108] According to one embodiment of the present application, the acquisition module 20 acquires the actual configuration information of the central processing unit, specifically for: acquiring the current configuration information of the central processing unit; when the current configuration information of the central processing unit is different from the initial configuration information, using the current configuration information of the central processing unit as the actual configuration information of the central processing unit.
[0109] According to one embodiment of the present application, after configuring the central processor according to the target configuration information, the receiving module 10 is further used to: receive a reconfiguration instruction of the central processor; the acquisition module 20 is further used to clear the configuration information in the backup memory and the external memory in response to the reconfiguration instruction.
[0110] According to an embodiment of the present application, the acquisition module 20 is further used to: generate a second alarm signal when the target configuration information is outside a preset allowable configuration range, and alarm the user based on the second alarm signal.
[0111] According to one embodiment of the present application, the target configuration information includes target power and / or target number of cores.
[0112] According to an embodiment of the present application, the acquisition module 20 is further used to: clear the target configuration information stored in the external memory in response to the initialization instruction; and restore the central processing unit to the initial configuration information based on the cleared external memory.
[0113] For the description of the features in the embodiment corresponding to the configuration device of the central processing unit, reference can be made to the relevant description of the embodiment corresponding to the configuration method of the central processing unit, which will not be described in detail here.
[0114] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned central processing unit configuration method embodiments when running.
[0115] like Figure 5 As shown, an embodiment of the present application further provides an electronic device 100, including a memory 110 and a processor 120, wherein the memory 110 stores a computer program, and the processor 120 is configured to run the computer program to execute the steps in any of the above-mentioned central processing unit configuration method embodiments.
[0116] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0117] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned central processing unit configuration method embodiments are implemented.
[0118] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned central processing unit configuration method embodiments are implemented.
[0119] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0120] The above is a detailed introduction to a configuration method, configuration device, storage medium, electronic device and computer program product of a central processing unit provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for configuring a central processing unit, characterized in that: The following steps are involved: receiving a configuration trigger instruction from a central processing unit; In response to the configuration trigger instruction, read the target configuration information of the central processing unit from the external memory, wherein the target configuration information is within a preset allowable configuration range so as to be stored in the external memory; The central processing unit is configured according to the target configuration information.
2. The method for configuring a CPU according to claim 1, characterized in that: The external memory is a general flash memory storage area of a programmable logic device.
3. The method for configuring a CPU according to claim 1, wherein: Before receiving the configuration trigger instruction of the central processor, the method further includes: Acquiring initial configuration information of a central processing unit and target configuration information of the central processing unit; When the target configuration information is different from the initial configuration information and the target configuration information is within a preset allowable configuration range, the target configuration information is stored in the external memory.
4. The method for configuring a CPU according to claim 3, wherein: Also includes: In response to the viewing instruction of the central processing unit, the preset allowed configuration range and the initial configuration information are displayed.
5. The method for configuring a CPU according to claim 3, characterized in that: In a case where the target configuration information is different from the initial configuration information and the target configuration information is within the preset allowable configuration range, the method further includes: The target configuration information is sent and stored in a backup memory, so that when a configuration data calling instruction is received, the target configuration information stored in the backup memory is called.
6. The method for configuring a central processing unit according to claim 5, characterized in that: After configuring the central processor based on the target configuration information, the method further includes: Acquire the actual configuration information of the central processing unit, and retrieve the target configuration information from the backup memory; When the actual configuration information is inconsistent with the target configuration information, a first alarm signal is generated, and an alarm is issued to a user based on the first alarm signal.
7. The method for configuring a central processing unit according to claim 6, characterized in that: The obtaining of actual configuration information of the central processing unit includes: Obtaining current configuration information of the central processing unit; When the current configuration information of the central processing unit is different from the initial configuration information, the current configuration information of the central processing unit is used as the actual configuration information of the central processing unit.
8. The method for configuring a central processing unit according to claim 5, characterized in that: After configuring the central processor according to the target configuration information, the method further includes: receiving a reconfiguration instruction from the central processing unit; In response to the reconfiguration instruction, the configuration information in the backup memory and the external memory is cleared.
9. The method for configuring a CPU according to claim 1, wherein: Also includes: When the target configuration information is outside the preset allowable configuration range, a second alarm signal is generated, and an alarm is issued to the user based on the second alarm signal.
10. The method for configuring a central processing unit according to claim 1, characterized in that: The target configuration information includes target power and / or target number of cores.
11. The method for configuring a CPU according to claim 3, characterized in that: Also includes: In response to the initialization instruction, clearing the target configuration information stored in the external memory; The central processing unit is restored to the initial configuration information based on the cleared external memory.
12. A configuration device for a central processing unit, characterized in that: The device comprises: A receiving module, used for receiving a configuration trigger instruction from a central processing unit; An acquisition module, configured to read target configuration information of the central processing unit from an external memory in response to the configuration trigger instruction, wherein the target configuration information is within a preset allowable configuration range so as to be stored in the external memory; A configuration module is used to configure the central processing unit according to the target configuration information.
13. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the steps of the configuration method of the central processing unit as described in any one of claims 1-11 are performed.
14. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for configuring a central processing unit as claimed in any one of claims 1 to 11 when executing the computer program.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for configuring a central processing unit as claimed in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Method, device and system for controlling frequency of processors
CN103455469A
Configuring base clock frequency of processor based on usage parameters
CN114237382A
Configuration information management method and device and server
CN116700801A
Server control method and device, storage medium and electronic device
CN117131495A
Central processing unit frequency adjustment method and device, equipment and medium
CN119271031A