Reboot method and apparatus for server, and storage medium and server
By comparing the initialization status of the target channel and setting a restart flag during server startup, the problem of connection bus fault reports caused by server restarts was solved, achieving more efficient restart operations and stability.
Patent Information
- Application Number
- PCT/CN2025/083217
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-28
- Filing Date
- 2025-03-18
- Publication Date
- 2025-12-04
AI Technical Summary
Server restarts can cause false alarms due to faulty connections between processors. Current technology cannot accurately pinpoint the fault information, leading to server instability.
During server startup, the target restart flag is set by comparing the current initialization state of the target channel with the historical initialization state, and a cold restart or hot restart is performed when necessary to avoid reporting connection bus failures incorrectly.
It reduced the false alarm rate of connection bus failure, improved the accuracy and stability of the server restart process, reduced downtime, and improved the testing efficiency of power restart stress test.
Smart Images

Figure CN2025083217_04122025_PF_FP_ABST
Abstract
Description
Method, device, storage medium and server for restarting server
[0001] Cross-reference to related applications
[0002] The present application claims priority from the Chinese patent application No. 202410671166.X filed on May 28, 2024, and entitled "Method, device, storage medium and server for restarting server", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] Embodiments of the present application relate to the field of computers, and in particular, to a method, device, storage medium and server for restarting server, and computer program product. BACKGROUND
[0004] The core of the server supporting the number of processors lies in the use of the interconnection bus between processors, and the bus interconnection of multiple processors is involved in the multiple processor server of two or more processors. In the event of interconnection bus failure, such as reduced rate, reduced bandwidth, link training failure and other problems, it will cause the server to be unstable, and problems such as processor loss, abnormal downtime and other problems will occur. In order to accurately locate the fault information, the BIOS (Basic Input / Output System) usually transmits each possible fault information to the BMC (Baseboard Management Controller) through the IPMI (Intelligent Platform Management Interface) protocol for recording. However, when doing power restart stress testing frequently through the IPMI tool, it usually causes abnormal initialization of the interconnection channel, which makes the BISO think that the interconnection bus has failed and reports to the BMC end, but the actual result is not a real interconnection channel problem. SUMMARY
[0005] Embodiments of the present application provide a method, device, storage medium and server for restarting server, and computer program product, to at least solve the problem of false reporting of connection bus failure between processors caused by server restart in the related art.
[0006] According to one embodiment of the present application, a method for restarting a server is provided, comprising: the server comprising at least two processors, a basic input / output system, a target bus between the processors establishing a target channel, a target processor included in the at least two processors being connected to the basic input / output system, comprising: in a case where the basic input / output system enters an initialization stage of the target channel in a process of starting the server, comparing a current initialization state of the target channel with a historical initialization state to obtain a comparison result, wherein the historical initialization state is an initialization state of the target channel in a process of starting the server last time; in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, setting a target restart flag; in a case where the target channel is initialized and the server needs to be restarted, performing a restart operation on the server based on a target type of the target restart flag and a value of the target restart flag.
[0007] In one example embodiment, in a case where the target type of the target restart flag is a cold start type, comparing the current initialization state of the target channel with the historical initialization state comprises: determining whether a start type of the server last time is the cold start type; in a case where the start type of the server last time is a non-cold start type, comparing the current initialization state of the target channel with the historical initialization state.
[0008] In one example embodiment, the method further comprises: in a case where the start type of the server last time is the cold start type, initializing the target channel.
[0009] In one example embodiment, performing the restart operation on the server based on the target type of the target restart flag and the value of the target restart flag comprises: in a case where the target type is the cold start type and the value of the target restart flag is a first value, performing a cold restart operation, wherein the restart operation comprises the cold restart operation.
[0010] In one example embodiment, after performing the cold restart operation, the method further comprises: setting the value of the target restart flag to a second value, wherein the second value is different from the first value.
[0011] In one example embodiment, performing the restart operation on the server based on the target type of the target restart flag and the value of the target restart flag comprises: in a case where the target type is the cold start type and the value of the target restart flag is a value other than the first value, performing a hot restart operation, wherein the restart operation comprises the hot restart operation.
[0012] In an example embodiment, after the target restart flag is set, the method further includes, in a case where the target channel initialization is completed and the server does not need to be restarted, initializing other functional modules included in the server except the target channel to enter an operating system of the server after the other functional modules are initialized.
[0013] In an example embodiment, in a case where the target type of the target restart flag is a hot start type, before the basic input output system enters an initialization stage of the target channel, the method further includes sending, to the baseboard management controller, a first instruction of prohibiting responding to a power restart through the target protocol to instruct the baseboard management controller not to execute a power restart instruction when the power restart instruction is received.
[0014] In an example embodiment, in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the method further includes sending error information that the target channel has an error to a baseboard management controller of the server to instruct the baseboard management controller to perform an alarm operation.
[0015] In an example embodiment, performing a restart operation on the server based on the target type of the target restart flag and the value of the target restart flag includes, in a case where the target type is a hot start type and the value of the target restart flag is a first value, performing a hot restart operation, wherein the restart operation includes the hot restart operation.
[0016] In an example embodiment, in a case where the target type of the target restart flag is a hot start type, the target channel initialization is completed, and the server does not need to be restarted, a second instruction of allowing responding to a power restart is sent to a baseboard management controller of the server through the target protocol to instruct the baseboard management controller to execute a power restart instruction when the power restart instruction is received.
[0017] In an example embodiment, in a case where the target type of the target restart flag is a cold start type, before the basic input output system enters an initialization stage of the target channel, the method further includes sending, to the baseboard management controller, a first instruction of prohibiting responding to a power restart through the target protocol to instruct the baseboard management controller not to execute a power restart instruction when the power restart instruction is received.
[0018] In an example embodiment, performing a restart operation on the server based on the target type of the target restart flag and the value of the target restart flag includes, in a case where the target type is a cold start type and the value of the target restart flag is a first value, performing a cold restart operation, wherein the restart operation includes the cold restart operation.
[0019] In an example embodiment, the second instruction allowing the server to respond to a power restart is sent to a baseboard management controller of the server through the target protocol to instruct the baseboard management controller to execute a power restart instruction when the power restart instruction is received.
[0020] In an example embodiment, when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the method further includes: sending error information indicating that the target channel has an error to a baseboard management controller of the server to instruct the baseboard management controller to perform an alarm operation.
[0021] Before performing the restart operation on the server based on the target type of the target restart flag and the value of the target restart flag, the method further includes at least one of the following: determining that the server needs to be restarted when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state; and determining that the server needs to be restarted when the value of the target restart flag is the first value.
[0022] In an example embodiment, the target channel includes one of the following: a hyper interconnect channel, a cache coherent interconnect protocol channel, and a Gen-Z standard based channel.
[0023] In an example embodiment, setting the target restart flag includes: setting the target type of the target restart flag and the value of the target restart flag.
[0024] According to another embodiment of the present application, a server restart device is provided, the server including at least two processors, a basic input and output system, a target channel being established between the processors through a target bus, and a target processor included in the at least two processors being connected to the basic input and output system, the server restart device including: a comparison module configured to, in a process of starting the server, compare a current initialization state of the target channel with a historical initialization state of the target channel in a case where the basic input and output system enters an initialization stage of the target channel to obtain a comparison result, the historical initialization state being an initialization state of the target channel in a last process of starting the server; a setting module configured to, in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, set a target restart flag; and a restart module configured to, in a case where the target channel is initialized and the server needs to be restarted, perform a restart operation on the server based on a target type of the target restart flag and a value of the target restart flag.
[0025] According to still another embodiment of the present application, a computer non-volatile readable storage medium is further provided, the computer non-volatile readable storage medium storing a computer program, wherein the computer program is set to execute the steps in any of the above method embodiments when running.
[0026] According to yet another embodiment of the present application, a server is also provided, comprising a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.
[0027] According to yet another embodiment of the present application, a computer program product is also provided, comprising a computer program, which, when executed by a processor, implements the steps in any of the above method embodiments.
[0028] According to the present application, the server comprises at least two processors and a basic input / output system, a target channel is established between the processors through a target bus, a target processor included in the at least two processors is connected with the basic input / output system, in a case where the basic input / output system enters an initialization stage of the target channel in a process of starting the server, a comparison result is obtained by comparing a current initialization state of the target channel with a historical initialization state, wherein the historical initialization state is an initialization state of the target channel in a last process of starting the server, in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, a target restart flag bit is set, and in a case where the target channel initialization is completed and the server needs to be restarted, a restart operation of the server is performed based on a target type of the target restart flag bit and a value of the target restart flag bit. Since in a case where the basic input / output system enters the initialization stage of the target channel in the process of starting the server, the current initialization state of the target channel can be compared with the historical initialization state to obtain the comparison result, in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, instead of reporting an error, the target restart flag bit is set and the initialization of the target channel is continued, and in a case where the target channel initialization is completed and the server needs to be restarted, the restart operation of the server is performed based on the target type of the target restart flag bit and the data, which avoids the case that the connection bus between the processors is reported to be faulty due to the server restart. Therefore, the problem that the connection bus between the processors is reported to be faulty due to the server restart in the related art can be solved, and the effect of reducing the error reporting rate of the connection bus is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0029] FIG. 1 is a hardware structure block diagram of a server device of a restart method of a server according to an embodiment of the present application;
[0030] FIG. 2 is a flowchart of a restart method of a server according to an embodiment of the present application;
[0031] FIG. 3 is a server mainboard design diagram according to an embodiment of the present application;
[0032] FIG. 4 is a flowchart of a restart method of a server according to an example embodiment of the present application;
[0033] FIG. 5 is a swimlane diagram of a restart method of a server according to an example embodiment of the present application;
[0034] FIG. 6 is a flowchart of a restart method of a server according to an example embodiment of the present application;
[0035] FIG. 7 is a swimlane diagram of a restart method of a server according to an example embodiment of the present application;
[0036] FIG. 8 is a structural block diagram of a restart apparatus of a server according to an example embodiment of the present application. DETAILED DESCRIPTION
[0037] Hereinafter, the example embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with the example embodiments.
[0038] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.
[0039] The method embodiments provided in the example embodiments of the present application can be executed in a server device or a similar computing apparatus. Taking an example of running on a server device, FIG. 1 is a hardware structural block diagram of a server device of a restart method of a server according to an example embodiment of the present application. As shown in FIG. 1, the server device can include one or more (only one is shown in FIG. 1) processors 102 (the processor 102 can include but is not limited to a processing device such as a microcontroller unit MCU or a field-programmable gate array FPGA, etc.) and a memory 104 configured to store data, wherein the server device can further include a transmission device 106 configured to have a communication function and an input and output device 108. It can be understood by those skilled in the art that the structure shown in FIG. 1 is only schematic, and does not limit the structure of the server device. For example, the server device can further include more or less components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.
[0040] The memory 104 can be configured to store computer programs, for example, software programs of application software and modules, such as a computer program corresponding to the server restart method in the embodiments of the present application. The processor 102 performs various functional applications and data processing, i.e., implements the above method, by running the computer programs stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can include memories remotely arranged with respect to the processor 102, which can be connected to the server device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0041] The transmission device 106 is configured to receive or send data via a network. The optional example of the above network can include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is configured to communicate with the Internet in a wireless manner.
[0042] In the embodiments, a server restart method is provided. The server includes at least two processors, a basic input / output system, and a target bus. The target bus establishes a target channel between the processors. A target processor included in the at least two processors is connected to the basic input / output system. FIG. 2 is a flowchart of the server restart method according to the embodiments of the present application. As shown in FIG. 2, the flowchart includes the following steps:
[0043] In step S202, in a case where the basic input / output system enters an initialization stage of the target channel during a server startup process, a comparison result is obtained by comparing a current initialization state of the target channel with a historical initialization state. The historical initialization state is an initialization state of the target channel in a last server startup process.
[0044] In step S204, in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, a target restart flag bit is set.
[0045] In step S206, in a case where the target channel initialization is completed and the server needs to be restarted, a server restart operation is performed based on a target type of the target restart flag bit and a value of the target restart flag bit.
[0046] In the above embodiment, the server can include at least two processors, for example, including two processors, four processors, eight processors, etc., and the processors can be connected through a target bus. The target bus can include a UPI (Ultra Path Interconnect) bus, an XGMI (based on the Gen-Z standard) bus, a CCIX (Cache Coherent Interconnect for Accelerators) bus, etc. That is, the target channel can be a UPI channel, an XGMI channel, a CCIX channel, etc. The target processor of the at least two processors can be connected with a basic input and output system BIOS, and the target processor can also be connected with a baseboard management controller BMC. Among them, the server motherboard design diagram can refer to FIG. 3, as shown in FIG. 3, the server includes two processors, CPU0 and CPU1, and the CPU0 and the CPU1 can be connected through a UPI bus, an XGMI bus or a CCIX bus. The CPU0 can be connected with the basic input and output system BIOS as a target processor, and the CPU0 can also be connected with the baseboard management controller BMC.
[0047] In the above embodiment, the above method can be applied in power-on reset stress test of the server, and the power-on reset stress test of the server can be performed by an IPMI (Intelligent Platform Management Interface) tool. When the IPMI tool performs the power-on reset stress test, especially when the server is started and the power-on reset stress test is triggered within 7 seconds, the BIOS checks the link state of the last start and the link state of the current start during the start process. If the link state of the last start and the link state of the current start are consistent, no processing is performed and the start is continued. If the link state of the last start and the link state of the current start are inconsistent, the BIOS transmits error information to the BMC side through the IPMI protocol. After receiving the fault error, the BMC side records and alarms the UPI link failure fault information. However, after the IPMI tool performs the power-on reset stress test function in the UPI link initialization stage, the UPI link initialization is not completed, and the related topology information of the UPI after the restart is not frequently updated, so that the result of the UPI re-initialization after the restart is inconsistent with the result of the UPI link after the last restart, thereby causing the fault information to be reported and mistakenly considering that a serious problem occurs. Therefore, in the process of starting the server, the current initialization state of the target channel is compared with the historical initialization state of the target channel in the case that the basic input and output system enters the initialization stage of the target channel, and a comparison result is obtained. In the case that the comparison result indicates that the two are inconsistent, the fault is not reported, but a target restart flag bit is set, and the target channel is continued to be initialized. After the initialization is completed, in the case that it is determined that the server needs to be restarted, the server is restarted according to the target type and data of the target restart flag bit. That is, after the UPI link initialization error, a global variable is added to record, and the BIOS continues the initialization process, and performs the restart operation after the initialization is completed. The target type of the target restart flag bit can include a cold start type and a hot start type. The cold start type is used to indicate that the server performs cold start, and the hot start type is used to indicate that the server performs hot start. The cold start can be a process of restarting the server and loading the operating system and other necessary software. In the cold start process, the server performs self-checking, hardware initialization, system booting and the like, and finally loads the completed server to restore the normal running state. In this process, the values of the registers in the server are cleared. The hot start refers to restarting the server software or operating system without shutting down the server, so that the new configuration or update takes effect without affecting the existing services and connections. In this process, the values of the registers in the server are saved. The server is updated and maintained without affecting the user experience.
[0048] In the above embodiment, the value of the target restart flag bit can be 0 or 1, and can also be other values, which are not limited in the present application. The value of the target flag bit can be used to indicate whether the server needs to restart and the type of restart. Therefore, the mapping relationship between the value of the target restart flag bit and whether the server needs to restart and the type of restart can be set in advance. For example, when the value of the target restart flag bit is 1, it indicates that the server needs to restart, and when the value of the target restart flag bit is 0, it indicates that the server does not need to restart.
[0049] In the above embodiment, setting the target restart flag bit can include setting the value of the target restart flag bit and the target type. Whether the server needs to restart can be determined according to the comparison result. For example, when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, it is determined that the server needs to restart. Whether the server needs to restart can also be determined according to the value of the target restart flag bit. For example, when the value of the target restart flag bit is 1, it is determined that the server needs to restart.
[0050] According to the present application, the server includes at least two processors and a basic input output system. The target bus is used to establish a target channel between the processors. The target processor included in the at least two processors is connected to the basic input output system. In the process of starting the server, in the case that the basic input output system enters the initialization stage of the target channel, the current initialization state of the target channel is compared with the historical initialization state to obtain a comparison result, where the historical initialization state is the initialization state of the target channel in the last process of starting the server. In the case that the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, a target restart flag bit is set. In the case that the initialization of the target channel is completed and the server needs to restart, a restart operation is performed on the server based on the target type of the target restart flag bit and the value of the target restart flag bit. In the process of starting the server, in the case that the basic input output system enters the initialization stage of the target channel, the current initialization state of the target channel can be compared with the historical initialization state to obtain a comparison result. In the case that the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, instead of reporting an error, a target restart flag bit is set and the initialization of the target channel is continued. In the case that the initialization of the target channel is completed and the server needs to restart, a restart operation is performed on the server based on the target type of the target restart flag bit and the value of the target restart flag bit, which avoids the case that the connection bus between the processors is reported to be faulty due to the server restart. Therefore, the problem that the connection bus between the processors is reported to be faulty due to the server restart in the related art can be solved, and the effect of reducing the error reporting rate of the connection bus is achieved.
[0051] The execution subject of the above steps can be a server, such as a basic input output system (BIOS) in the server, but is not limited thereto.
[0052] In one example embodiment, when the target type of the target restart flag is a cold start type, comparing the current initialization state of the target channel with the historical initialization state includes: determining whether the start type of the server at the last start is a cold start type; and comparing the current initialization state of the target channel with the historical initialization state when the start type of the server at the last start is not a cold start type. In this embodiment, it can be determined whether the start type of the server at the last start is a cold start type. If the last start is a cold start, i.e., the server is started from a shutdown state, the BIOS can continue the UPI initialization action until completion. This is because a cold start causes the system interrupt state to be lost, and various hardware devices and system parameters need to be reinitialized to ensure that the system can operate normally. Therefore, the BIOS checks and performs the UPI initialization action at the cold start to ensure that the system can start and operate normally. If the last start is not a cold start type, the value in the register is not cleared, and therefore it can be determined whether the current initialization state is consistent with the historical initialization state. If the current initialization state is consistent with the historical initialization state, the initialization is continued, and if the current initialization state is inconsistent with the historical initialization state, the target restart flag can be set.
[0053] In the above embodiment, when the target channel is a UPI channel, the BIOS checks whether the last start is a cold start at the UPI initialization stage when the server is started. If the last start is a cold start, the UPI initialization action is continued until the UPI initialization is completed. If the last start is not a cold start, it is checked whether the UPI initialization at this start is consistent with the UPI initialization before the restart. If the UPI initialization at this start is consistent with the UPI initialization before the restart, the UPI initialization action is continued until the UPI initialization is completed. If the UPI initialization at this start is inconsistent with the UPI initialization before the restart, the global variable cold start flag is set to 1 and the UPI initialization action is continued.
[0054] In the above embodiment, by determining whether the start type of the server at the last start is a cold start type, and in the case of determining that it is not a cold start type, comparing the current initialization state with the historical initialization state, and in the case of determining that it is a cold start type, continuing the target channel initialization, the data integrity when the server is started is ensured.
[0055] In one example embodiment, the method further comprises initializing the target channel in a case that the type of the last start of the server is the cold start type. In this embodiment, when it is determined that the type of the last start of the server is the cold start type, the values of the registers in the server need to be cleared, and therefore, the target channel needs to be initialized to enable the server to reinitialize various hardware devices and system parameters to ensure that the system can operate normally.
[0056] In one example embodiment, performing a restart operation on the server based on the target type of the target restart flag and the value of the target restart flag comprises performing a cold restart operation in a case that the target type is the cold start type and the value of the target restart flag is a first value, wherein the restart operation comprises the cold restart operation. In this embodiment, in a case that the server needs to be restarted, the target restart flag can be determined, and when the target type of the target restart flag is the cold restart type and the value of the target restart flag is the first value, the cold restart operation is performed. The first value can be a value indicating the cold restart operation, and can be 1. Of course, the first value can also be other values, which are not limited in the present application. The value indicating the cold restart operation can be a preset value.
[0057] In the above embodiment, when the target type of the target restart flag is the cold restart type and the value of the target restart flag is the first value, the cold restart operation is performed, which can help the server to be reinitialized, and further verify whether the target channel has failed, thereby reducing the false positive rate of the failure of the target channel.
[0058] In one example embodiment, after the cold restart operation is performed, the method further comprises setting the value of the target restart flag to a second value, wherein the second value is different from the first value. In this embodiment, after the cold restart operation is performed, the value of the target restart flag can be set to the second value, wherein the second value can be a value different from the first value, for example, when the first value is 1, the second value can be 0. By setting the target restart flag to the second value, when the server is started, the BIOS in the target channel initialization stage can determine that the last start of the server is the cold start, and therefore, the initialization of the target channel can be continued. After the initialization is completed, it can be determined according to the second value of the target restart flag that the target server does not need to be restarted, and then other functional modules can be initialized, and after the initialization of the other functional modules is completed, the operating system is operated to complete the start of the server.
[0059] In the above embodiment, after the cold restart operation is performed, the value of the target restart flag is set to the second value, and therefore, when the server is started next time, it is not necessary to determine whether the current initialization state is consistent with the historical initialization state, and the test efficiency of the power restart test of the server is improved.
[0060] In an example embodiment, performing a restart operation on the server based on the target type of the target restart flag and the value of the target restart flag comprises: performing a hot restart operation when the target type is a cold start type and the value of the target restart flag is other than the first value, wherein the restart operation comprises the hot restart operation. In this embodiment, when the target restart flag is a cold start type and the value of the target restart flag is other than the first value, such as when the target restart flag is 0, the server can be instructed to perform a hot restart operation.
[0061] In the above embodiment, when the value of the target restart flag is not the first value, it indicates that the current initialization state is consistent with the historical initialization state, so there is no need for a cold restart, only a hot restart is needed, thus the downtime of the server can be reduced, the service can be restored more quickly, and the hot restart does not interrupt the running processes and services, so the stability of the system can be maintained and the instability factors caused by restarting can be avoided. The hot restart only reloads the necessary components and configuration information, without wasting additional system resources and time, so it is more efficient.
[0062] In an example embodiment, after setting the target restart flag, the method further comprises: initializing other functional modules included in the server other than the target channel when the target channel initialization is completed and the server does not need to be restarted, so as to enter the operating system of the server after the initialization of the other functional modules is completed. In this embodiment, if the server does not need to be restarted, the other functional modules can be continued to be initialized, and the operating system of the server can be entered after the initialization of the other functional modules is completed.
[0063] In the above embodiment, when the target channel is a UPI channel, after the UPI initialization is completed, it can be determined whether a restart is needed, if not, the other functional modules are continued to be initialized, and if a restart is needed, the target restart flag is determined, if the value of the target cold restart flag is set to 1, a cold restart operation can be performed and the value of the target restart flag is set to 0, and if the global cold restart flag is not set to 1, a hot restart can be performed.
[0064] FIG. 4 is a flowchart of a server restart method according to an example embodiment of the present application, as shown in FIG. 4, the flowchart comprises:
[0065] Step S402, the server is powered on and started.
[0066] Step S404, the BIOS enters the UPI initialization stage.
[0067] Step S406, it is judged whether the server is cold start last time, when the result of the judgment is that the server is cold start last time, step S408 is executed, when the result of the judgment is that the server is not cold start last time, step S410 is executed.
[0068] Step S408, UPI initialization continues until UPI is completed.
[0069] Step S410, it is judged whether the UPI initialization link this time is consistent with the UPI initialization link last time, when the result of the judgment is that the UPI initialization link this time is consistent with the UPI initialization link last time, step S408 is executed, when the result of the judgment is that the UPI initialization link this time is not consistent with the UPI initialization link last time, step S412 is executed.
[0070] Step S412, the global variable cold start flag (corresponding to the target restart flag described above) is set to 1.
[0071] Step S414, UPI initialization continues until UPI initialization is completed.
[0072] Step S416, it is judged whether restart is needed, when the result of the judgment is that restart is needed, step S418 is executed, when the result of the judgment is that restart is not needed, step S424 is executed.
[0073] Step S418, it is judged whether the global variable cold start flag is 1, when the result of the judgment is that the global variable cold start flag is 1, step S420 is executed, when the result of the judgment is that the global variable cold start flag is not 1, step S422 is executed.
[0074] Step S420, cold start action is executed, and the cold start flag is set to 0.
[0075] Step S422, the global cold start flag is not set to 1, then hot restart is performed.
[0076] Step S424, BIOS continues to initialize other function modules.
[0077] Step S426, start entering the operating system.
[0078] Figure 5 is a restart method swim lane diagram of a server according to an optional embodiment of the present application, as shown in Figure 5, steps S404-S422 are operations performed by the basic input output system (BIOS), step S402 is an operation performed by the server, and step S424 is an operation performed by the operating system (OS).
[0079] In an example embodiment, when the target type of the target restart flag is a hot restart type, before the basic input output system enters the initialization stage of the target channel, the method further comprises: sending, by the target protocol, a first instruction of prohibiting responding to power restart to the baseboard management controller, to instruct the baseboard management controller not to execute the power restart instruction when the power restart instruction is received. In this embodiment, the BIOS can send a command through the IPMI protocol before the target channel is initialized, to inform the BMC that the power restart stress test command does not need to be executed, and after the target channel initialization is completed, the BIOS sends the target channel initialization completion information through the IPMI protocol, to inform the BMC to execute the power restart stress test function.
[0080] In the above embodiment, before the basic input output system BIOS enters the initialization stage of the target channel, a first instruction of prohibiting responding to power restart can be sent to the baseboard management control BMC through the target protocol, so that the server does not execute the power restart operation when the instruction of executing power restart is received, so that the target channel has enough time to complete the initialization operation, and thus the UPI fault information false alarm problem during the execution of the power restart stress test can be avoided, and the false alarm rate is reduced.
[0081] In an example embodiment, when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the method further comprises: sending error information that the target channel has an error to the baseboard management controller of the server, to instruct the baseboard management controller to execute an alarm operation. In this embodiment, when the target type of the target restart flag is a hot restart type, before the BIOS enters the target channel initialization action when the server is started, the BIOS can inform the BMC management firmware through the IPMI protocol that the IPMI command power restart stress test function does not need to be responded to at this time; the BIOS continues to start and enters the target channel initialization function stage, and checks whether the link initialization of the target channel this time is consistent with the link initialization of the target channel of the last start; if the link initialization of the target channel this time is consistent with the link initialization of the target channel of the last start, the initialization is continued, and if the link initialization of the target channel this time is inconsistent with the link initialization of the target channel of the last start, the target restart flag is set, the target type of the target restart flag is set to a hot start type, and the error information is reported to the BMC end. The error information can be used to indicate that the target channel has an error or a fault.
[0082] In the above embodiment, when the server starts, before the BIOS enters the target channel initialization action, the BIOS notifies the BMC management firmware through the IPMI protocol that the power-on reset function does not need to respond to the IPMI command at this time. After entering the target channel initialization, if the comparison result shows that the current initialization state is inconsistent with the historical initialization state, at this time the server has not performed the power-on reset operation, and therefore it can be considered that the target channel has failed, and therefore error information is sent to the baseboard management controller BMC, achieving the effect of timely error reporting.
[0083] In one example embodiment, performing a restart operation on the server based on the target type of the target restart flag and the value of the target restart flag includes: in the case where the target type is a hot start type and the value of the target restart flag is a first value, performing a hot restart operation, wherein the restart operation includes the hot restart operation. In this embodiment, after the target channel initialization is completed, it can be determined whether the server needs to be restarted. The determination of whether the server needs to be restarted can include determining whether to restart according to the comparison result, and when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, it is determined that the server needs to be restarted, and when they are consistent, it is determined that the server does not need to be restarted. When it is determined that the server needs to be restarted, the target type and the value of the target restart flag can be determined, and in the case where the target type is a hot start type and the value is a first value, a hot restart operation can be performed. After the server performs the hot restart, a first instruction to prohibit responding to the power-on reset can be sent to the baseboard management controller through the target protocol before the BIOS enters the target channel initialization, to instruct the baseboard management controller not to execute the power-on reset instruction when receiving the power-on reset instruction. The BIOS continues to start and enter the target channel initialization function stage, checks whether the current initialization state is consistent with the target channel link initialization link of the last start, i.e., the historical initialization state; if the target channel link initialization this time is consistent with the target channel link initialization link of the last start, the initialization continues, and if the target channel link initialization this time is inconsistent with the target channel link initialization link of the last start, the hot restart flag is set to a first value, such as 1, and error information is reported to the BMC end. After the initialization is completed, it is determined whether to perform a hot restart operation; if the hot restart flag is set to 1, a hot restart operation is performed and the above steps are continued.
[0084] In the above embodiment, when the target type of the target restart flag is a hot start type and the value is a first value, a hot restart operation can be performed, so that the downtime of the server can be reduced, the service can be recovered more quickly, and the hot restart does not interrupt the running processes and services, so that the stability of the system can be maintained and the instability factors caused by the restart can be avoided. The hot restart only reloads necessary components and configuration information, without wasting additional system resources and time, and is more efficient.
[0085] In an example embodiment, when the target type of the target restart flag is a hot restart type, the target channel initialization is completed, and the server does not need to restart, a second instruction allowing the server to respond to a power restart is sent to a baseboard management controller of the server through a target protocol, so as to instruct the baseboard management controller to execute a power restart instruction when the power restart instruction is received. In this embodiment, when the target type of the target restart flag is a hot restart type, the BIOS can inform the BMC management firmware through the IPMI protocol that the power restart stress test function does not need to be responded to at this time before the BIOS enters the target channel initialization action when the server starts. The BIOS continues to start and enters the target channel initialization function stage, and checks whether the link initialization of the target channel this time is consistent with the link initialization of the target channel of the last start. If the link initialization of the target channel this time is consistent with the link initialization of the target channel of the last start, the initialization continues, and if the link initialization of the target channel this time is not consistent with the link initialization of the target channel of the last start, the target restart flag is set. When the target type of the target restart flag is a hot restart type, it is determined whether the server needs to restart, and when the server does not need to restart, the BIOS can send information to the BMC end through the IPMI protocol to inform the BMC that the power restart stress test command can be executed, and at this time, there is no UPI failure reporting problem caused by the power restart stress test function.
[0086] In the above embodiment, when it is determined that the server does not need to restart, the baseboard management controller BMC can be timely informed to perform power restart stress test, and the test efficiency of the server power restart stress test is improved.
[0087] In an example embodiment, when the target type of the target restart flag is a cold restart type, before the basic input output system enters the initialization stage of the target channel, the method further comprises: sending a first instruction prohibiting the server to respond to a power restart to a baseboard management controller through a target protocol, so as to instruct the baseboard management controller not to execute a power restart instruction when the power restart instruction is received. In this embodiment, when the server starts, the BIOS can inform the BMC management firmware through the IPMI protocol that the power restart stress test function does not need to be responded to at this time before the BIOS enters the target channel initialization action. The BIOS continues to start and enters the target channel initialization function stage, and checks whether the link initialization of the target channel this time is consistent with the link initialization of the target channel of the last start. If the link initialization of the target channel this time is consistent with the link initialization of the target channel of the last start, the initialization continues, and if the link initialization of the target channel this time is not consistent with the link initialization of the target channel of the last start, the target restart flag is set, the target type of the target restart flag is set to a cold restart type, and error information is reported to the BMC end.
[0088] In one example embodiment, performing a restart operation on the server based on the target type of the target restart flag and the value of the target restart flag includes: in a case where the target type is a cold start type and the value of the target restart flag is a first value, performing a cold restart operation, wherein the restart operation includes the cold restart operation. After the target channel initialization is completed, it can be determined whether the server needs to be restarted. The determination of whether the server needs to be restarted can include determining whether the server needs to be restarted according to the comparison result, and determining that the server needs to be restarted when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, and determining that the server does not need to be restarted when the comparison result indicates that the current initialization state is consistent with the historical initialization state. When it is determined that the server needs to be restarted, the target type and the value of the target restart flag can be determined, and in a case where the target type is a cold start type and the value is a first value, a cold restart operation can be performed. After the server performs the cold restart, a first instruction for prohibiting a power restart can be sent to the baseboard management controller through the target protocol before the BIOS enters the target channel initialization, so as to instruct the baseboard management controller not to perform a power restart instruction when the power restart instruction is received. The BIOS continues to start and enter the target channel initialization function stage, checks whether the current initialization state is consistent with the target channel link initialization link of the last start, i.e., the historical initialization state, and if the current target channel link initialization is consistent with the target channel link initialization link of the last start, the initialization is continued, and if the current target channel link initialization is inconsistent with the target channel link initialization link of the last start, the cold restart flag is set to a first value, such as 1, and error information is reported to the BMC end. After the initialization is completed, it is determined whether a restart operation is needed; if the cold restart flag is set to 1, a cold restart operation is performed and the above steps are continued.
[0089] In the above embodiment, when the target type of the target restart flag is a cold start type and the value is a first value, a cold restart operation can be performed, which can help the server to reinitialize and further verify whether the target channel has failed, thereby reducing the false positive rate of the target channel failure.
[0090] In one example embodiment, after the target channel initialization is completed and the server does not need to be restarted, a second instruction allowing the server to respond to a power restart is sent to the baseboard management controller of the server through the target protocol, so as to instruct the baseboard management controller to execute the power restart instruction when the power restart instruction is received. In this embodiment, when the target type of the target restart flag is the cold restart type, before the BIOS enters the target channel initialization action when the server is started, the BIOS can notify the BMC management firmware through the IPMI protocol that the power restart stress test function does not need to be responded to the IPMI command at this time; the BIOS continues to start and enters the target channel initialization function stage, and checks whether the link initialization of the target channel this time is consistent with the link initialization of the target channel in the last start; if the link initialization of the target channel this time is consistent with the link initialization of the target channel in the last start, the initialization is continued, and if the link initialization of the target channel this time is inconsistent with the link initialization of the target channel in the last start, the target restart flag is set. In the case that the target type of the target restart flag is the cold start type, it is judged whether the server needs to be restarted, and when the server does not need to be restarted, the BIOS can send information to the BMC end through the IPMI protocol to notify the BMC that the power restart stress test command can be executed, and at this time, there is no UPI failure reporting problem caused by the power restart stress test function.
[0091] In the above embodiment, when it is determined that the server does not need to be restarted, the baseboard management controller BMC can be notified in time to perform the power restart stress test, and the test efficiency of the server power restart stress test is improved.
[0092] In one example embodiment, in the case that the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the method further comprises: sending error information that the target channel has an error to the baseboard management controller of the server, so as to instruct the baseboard management controller to perform an alarm operation. In this embodiment, when the target type of the target restart flag is the cold restart type, before the BIOS enters the target channel initialization action when the server is started, the BIOS can notify the BMC management firmware through the IPMI protocol that the power restart stress test function does not need to be responded to the IPMI command at this time; the BIOS continues to start and enters the target channel initialization function stage, and checks whether the link initialization of the target channel this time is consistent with the link initialization of the target channel in the last start; if the link initialization of the target channel this time is consistent with the link initialization of the target channel in the last start, the initialization is continued, and if the link initialization of the target channel this time is inconsistent with the link initialization of the target channel in the last start, the target restart flag is set, the target type of the target restart flag is set to the cold start type, and the error information is reported to the BMC end. The error information can be used to indicate that the target channel has an error or a fault.
[0093] In the above embodiment, when the server starts, before the BIOS enters the target channel initialization action, the BIOS notifies the BMC management firmware through the IPMI protocol that the power-on reset pressure measurement function does not need to respond to the IPMI command at this time. After entering the target channel initialization, if the comparison result shows that the current initialization state is inconsistent with the historical initialization state, at this time the server has not performed the power-on reset operation, therefore, it can be considered that the target channel has failed, therefore, error information is sent to the baseboard management controller BMC, achieving the effect of timely error reporting.
[0094] Before the target type based on the target reset flag and the value of the target reset flag perform the restart operation on the server, the method further comprises at least one of the following: in the case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, determining that the server needs to be restarted; in the case where the value of the target reset flag is a first value, determining that the server needs to be restarted. In this embodiment, whether the server needs to be restarted can be determined according to the comparison result, and whether the server needs to be restarted can also be determined according to the value of the target reset flag. When the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the server needs to be restarted, and the server can also be determined to need to be restarted when the value of the target reset flag indicates a value indicating that the server needs to be restarted. The first value can be a value indicating that the server needs to be restarted determined in advance. Conversely, the second value can be a value indicating that the server does not need to be restarted determined in advance.
[0095] In an example embodiment, the target channel comprises one of the following: a hyper interconnection channel, a cache coherence interconnection protocol channel, and a channel based on the Gen-Z standard. In this embodiment, the restart method of the server can be applied to different types of servers, and therefore the target channel can be a channel supported by different types of services. For example, a UPI (Ultra Path Interconnect) channel, a CCIX (Cache Coherent Interconnect for Accelerators) channel, an XGMI (eXplicit Gen-Z Memory Interconnect) channel, etc.
[0096] In an example embodiment, setting the target reset flag comprises setting the target type of the target reset flag and the value of the target reset flag. In this embodiment, the target type of the target reset flag can include a cold start type and a hot start type. The value of the target reset flag can include a first value and a second value, and the first value can be used to indicate that the server needs to be restarted.
[0097] In one example embodiment, in a process of server startup, in a case where a basic input output system enters an initialization stage of a target channel, a comparison result is obtained by comparing a current initialization state of the target channel with a historical initialization state, wherein the historical initialization state is an initialization state of the target channel in a last server startup process; in a case where the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, suspected failure information indicating that the suspected target channel sends a failure is sent to a baseboard management controller. After receiving the suspected failure information, the baseboard management controller can save the suspected failure information. After saving the suspected failure information, the baseboard management controller can obtain log information of the server, determine whether the server is executing a task that can cause the target channel to fail according to the log information, for example, whether the server is executing a power restart stress test, and delete the suspected failure information in a case where it is determined according to the log information that the server is executing the task that can cause the target channel to fail. In a case where it is determined according to the log information that the server is not executing the task that can cause the target channel to fail, an alarm operation is performed to prompt that the target channel fails in the server.
[0098] In the above embodiment, in a case where the baseboard management controller receives the suspected failure information, instead of directly performing an alarm, the suspected failure information is saved, log information is obtained, it is determined whether the server is executing a task that can cause the target channel to fail, the suspected failure information is deleted in a case where the server is executing the task, and an alarm is performed in a case where the server is not executing the task. Therefore, a false alarm caused by executing the task that can cause the target channel to fail can be effectively ruled out, and the false alarm rate of the target channel failure is effectively reduced.
[0099] FIG. 6 is a flowchart of a server restart method according to an example embodiment of the present application. As shown in FIG. 6, the flowchart includes the following steps:
[0100] Step S602, the server is powered on and starts.
[0101] Step S604, the BIOS enters before a UPI initialization stage.
[0102] Step S606, the BIOS informs the BMC not to perform a power restart stress test instruction action through an IPMI protocol.
[0103] Step S608, the BIOS enters the UPI initialization stage.
[0104] Step S610, it is determined whether the UPI initialization link this time is consistent with the UPI initialization link last time, and in a case where the determination result is that the UPI initialization link this time is consistent with the UPI initialization link last time, step S612 is performed, and in a case where the determination result is that the UPI initialization link this time is inconsistent with the UPI initialization link last time, step S614 is performed.
[0105] Step S612, the UPI initialization continues until the UPI initialization is completed.
[0106] Step S614, the restart flag is set to 1, and the BIOS delivers the error information to the BMC through the IPMI protocol.
[0107] Step S616, the UPI initialization continues until the UPI initialization is completed.
[0108] Step S618, it is judged whether a restart is needed, and when the result of the judgment is that a restart is needed, step S620 is executed, and when the result of the judgment is that a restart is not needed, step S624 is executed.
[0109] Step S620, it is judged whether the restart flag is 1, and when the result of the judgment is that the restart flag is 1, step S622 is executed, and when the result of the judgment is that the restart flag is not 1, step S624 is executed.
[0110] Step S622, a restart action is executed, and the restart flag is set to 0.
[0111] Step S624, the BIOS informs the BMC to execute the power restart test instruction action through the IPMI protocol.
[0112] Figure 7 is a restart method swim lane diagram two of a server according to an optional embodiment of the present application, as shown in Figure 7, steps S604-S622 are executed by the BIOS.
[0113] In the foregoing embodiment, when the server is started, the BIOS will check the UPI link state of this time with the UPI link state of the last start when the BIOS enters the UPI initialization stage, and report error information according to the checking result. However, when the BMC performs power restart stress test through the IPMI protocol, the restart stage is just located in the UPI initialization checking UPI link state stage, which causes the UPI stage to be not completed before the restart command is executed, resulting in the next UPI fault alarm information being transmitted to the BMC end. To solve the above problem, a global cold restart flag can be introduced. According to whether the UPI link checking is consistent at the start, if the UPI initialization link of this time is inconsistent with the UPI initialization link of the last time, the cold restart flag is set to 1, and the restart stage is judged whether to restart and perform the restart operation. Through the cold restart mode, the UPI initialization operation is performed again to solve the problem of false UPI fault caused by the BMC performing power restart stress test through the IPMI protocol. BIOS can also notify the BMC end not to perform the power restart stress test instruction through the IPMI interaction protocol between BIOS and BMC before entering the UPI initialization stage. After the BIOS enters the UPI initialization stage, the UPI link checking mechanism is continued. According to the checking result, it is confirmed whether to restart, and at the same time, the real UPI fault information is transmitted to the BMC end. Until the UPI link initialization is completed, whether to restart according to the confirmed result. If the restart flag is 0 and no restart is needed, BIOS notifies the BMC that the power restart stress test command instruction received by the BMC end can be executed through the IPMI protocol.
[0114] In the foregoing embodiment, the BIOS can send the IPMI protocol to notify the BMC not to execute the power restart stress test instruction received by the BMC end at this time before the UPI initialization stage. After the UPI initialization stage is ended and no restart is needed, the BIOS sends the IPMI protocol to notify the BMC end to execute the power restart stress test instruction received by the BMC end to solve the technical problem of false UPI fault caused by power restart stress test. Or the BIOS can set a global variable cold restart flag according to the actual result of UPI link checking during the UPI initialization stage to confirm whether to perform the UPI link initialization again through the cold restart mode to solve the technical problem of false UPI fault caused by the BMC executing the power restart stress test instruction received by the BMC end. The accuracy of the UPI link checking result is effectively guaranteed, the UPI link data information is ensured to be accurate and correct during the start process, and the interconnection stability and reliability of the multi-processor system are improved.
[0115] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platform, of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method of each embodiment of the present application.
[0116] In the embodiment, a server restart device is also provided, the server comprising at least two processors, a basic input / output system, a target bus being established between the processors, and a target channel being established between the processors, a target processor included in the at least two processors being connected to the basic input / output system. The device is configured to implement the above-mentioned embodiments and optional implementation manners, which have been described above. As used below, the term "module" can be implemented by software and / or a combination of hardware. Although the device described in the following embodiments is preferably implemented by software, the implementation of hardware or a combination of software and hardware is also possible and is contemplated.
[0117] FIG. 8 is a structural block diagram of a server restart device according to an embodiment of the present application. As shown in FIG. 8, the device comprises:
[0118] A comparison module 82 is configured to compare a current initialization state of the target channel with a historical initialization state of the target channel to obtain a comparison result in a case that the basic input / output system enters an initialization stage of the target channel in a process of starting the server, wherein the historical initialization state is an initialization state of the target channel in a last process of starting the server.
[0119] A setting module 84 is configured to set a target restart flag in a case that the comparison result indicates that the current initialization state is inconsistent with the historical initialization state.
[0120] A restart module 86 is configured to perform a restart operation on the server based on a target type of the target restart flag and a value of the target restart flag in a case that the target channel is initialized and the server needs to be restarted.
[0121] In an example embodiment, the comparison module 82 can compare the current initialization state of the target channel with the historical initialization state by determining whether the startup type of the server at the last startup is the cold startup type, and comparing the current initialization state of the target channel with the historical initialization state in the case that the startup type of the server at the last startup is not the cold startup type.
[0122] In an example embodiment, the apparatus can be further configured to initialize the target channel in the case that the startup type of the server at the last startup is the cold startup type.
[0123] In an example embodiment, the restart module 86 can perform the restart operation on the server based on the target type of the target restart flag and the value of the target restart flag by performing a cold restart operation in the case that the target type is the cold startup type and the value of the target restart flag is the first value, wherein the restart operation comprises the cold restart operation.
[0124] In an example embodiment, the apparatus can be further configured to set the value of the target restart flag to a second value after performing the cold restart operation, wherein the second value is different from the first value.
[0125] In an example embodiment, the restart module 86 can perform the restart operation on the server based on the target type of the target restart flag and the value of the target restart flag by performing a hot restart operation in the case that the target type is the cold startup type and the value of the target restart flag is other than the first value, wherein the restart operation comprises the hot restart operation.
[0126] In an example embodiment, the apparatus can be further configured to initialize other functional modules included in the server except the target channel to enter the operating system of the server after the initialization of the other functional modules is completed in the case that the target channel initialization is completed and the server does not need to be restarted after setting the target restart flag.
[0127] In an example embodiment, in the case that the target type of the target restart flag is the hot startup type, the apparatus can be further configured to send a first instruction to prohibit the response power restart to the baseboard management controller through the target protocol before the basic input output system enters the initialization stage of the target channel, to instruct the baseboard management controller not to perform the power restart instruction when the power restart instruction is received.
[0128] In one exemplary embodiment, if the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the device may also be configured to send an error message indicating that there is an error in the target channel to the baseboard management controller of the server, so as to instruct the baseboard management controller to perform an alarm operation.
[0129] In an exemplary embodiment, the restart module 86 can perform a restart operation on the server based on the target type and the value of the target restart flag bit in the following manner: when the target type is a hot restart type and the value of the target restart flag bit is a first value, a hot restart operation is performed, wherein the restart operation includes a hot restart operation.
[0130] In one exemplary embodiment, the apparatus may also be configured to send a second instruction allowing a power restart response to the baseboard management controller of the server via the target protocol when the target type of the target restart flag is a hot start type, the target channel initialization is complete, and the server does not need to be restarted, so as to instruct the baseboard management controller to execute the power restart instruction upon receiving the power restart instruction.
[0131] In one exemplary embodiment, if the target type of the target restart flag is a cold start type, the device may also be configured to send a first instruction to the board management controller via the target protocol to prohibit response to power restart before the basic input / output system enters the initialization phase of the target channel, so as to instruct the board management controller not to execute the power restart instruction when it receives the power restart instruction.
[0132] In an exemplary embodiment, the restart module 86 can perform a restart operation on the server based on the target type and the value of the target restart flag bit in the following manner: when the target type is a cold start type and the value of the target restart flag bit is a first value, a cold restart operation is performed, wherein the restart operation includes a cold restart operation.
[0133] In one exemplary embodiment, the apparatus may also be configured to send a second instruction allowing a power restart response to the baseboard management controller of the server via the target protocol after the target channel initialization is completed and the server does not need to be restarted, so as to instruct the baseboard management controller to execute the power restart instruction upon receiving the power restart instruction.
[0134] In one exemplary embodiment, if the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the device may also be configured to send an error message indicating that there is an error in the target channel to the baseboard management controller of the server, so as to instruct the baseboard management controller to perform an alarm operation.
[0135] Before performing a restart operation on the server based on the target type and the value of the target restart flag, the device may also be configured to perform at least one of the following: determine that the server needs to be restarted if the comparison result indicates that the current initialization state is inconsistent with the historical initialization state; or determine that the server needs to be restarted if the value of the target restart flag is the first value.
[0136] In one exemplary embodiment, the target channel includes one of the following: a hyper-interconnect channel, a cache coherence interconnect protocol channel, or a Gen-Z standard-based channel.
[0137] In an exemplary embodiment, the setting module 84 can set the target restart flag bit by setting the target type of the target restart flag bit and the value of the target restart flag bit.
[0138] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0139] Embodiments of this application also provide a computer non-volatile readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0140] In one exemplary embodiment, the aforementioned computer-readable non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0141] Embodiments of this application also provide a server, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0142] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0143] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0144] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0145] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0146] The above description is merely an optional embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for restarting a server, characterized in that, The server includes at least two processors and a basic input / output system. The processors establish a target channel via a target bus, and the target processor among the at least two processors is connected to the basic input / output system. include: During the server startup process, when the basic input / output system enters the initialization phase of the target channel, the current initialization state of the target channel is compared with the historical initialization state to obtain a comparison result. The historical initialization state is the initialization state of the target channel during the previous server startup process. If the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, set the target restart flag. If the target channel initialization is complete and the server needs to be restarted, the server is restarted based on the target type and the value of the target restart flag.
2. The method according to claim 1, characterized in that, When the target type of the target restart flag is a cold start type, comparing the current initialization state of the target channel with its historical initialization state includes: Determine whether the server was a cold start type during its last startup; If the server's startup type during the last startup was not the cold start type, compare the current initialization state of the target channel with the historical initialization state.
3. The method according to claim 2, characterized in that, The method further includes: If the server was started with a cold start type during its last startup, the target channel is initialized.
4. The method according to claim 1, characterized in that, The process of performing a restart operation on the server based on the target type and the value of the target restart flag includes: When the target type is a cold start type and the value of the target restart flag is a first value, a cold restart operation is performed, wherein the restart operation includes the cold restart operation.
5. The method according to claim 4, characterized in that, After performing a cold restart, the method further includes: Set the value of the target restart flag to a second value, wherein the second value is different from the first value.
6. The method according to claim 1, characterized in that, The process of performing a restart operation on the server based on the target type and the value of the target restart flag includes: If the target type is a cold start type and the value of the target restart flag is a value other than the first value, a warm restart operation is performed, wherein the restart operation includes the warm restart operation.
7. The method according to claim 1, characterized in that, After setting the target restart flag, the method further includes: Once the target channel initialization is complete and the server does not need to be restarted, initialize the other functional modules included in the server besides the target channel, so as to enter the operating system of the server after the initialization of the other functional modules is completed.
8. The method according to claim 1, characterized in that, If the target type of the target restart flag is a warm start type, the method further includes the following steps before the basic input / output system enters the initialization phase of the target channel: The target protocol sends a first instruction to the baseboard management controller to prohibit response to power restart, instructing the baseboard management controller not to execute the power restart instruction upon receiving it.
9. The method according to claim 8, characterized in that, If the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the method further includes: The error message indicating that the target channel has an error is sent to the baseboard management controller of the server, so as to instruct the baseboard management controller to perform an alarm operation.
10. The method according to claim 8, characterized in that, The process of performing a restart operation on the server based on the target type and the value of the target restart flag includes: When the target type is a hot restart type and the value of the target restart flag is a first value, a hot restart operation is performed, wherein the restart operation includes the hot restart operation.
11. The method according to claim 8, characterized in that, If the target type in the target restart flag is a hot start type, the target channel initialization is complete, and the server does not need to be restarted, a second instruction allowing a power restart is sent to the baseboard management controller of the server via the target protocol, instructing the baseboard management controller to execute the power restart instruction upon receiving it.
12. The method according to claim 1, characterized in that, If the target type of the target restart flag is a cold start type, the method further includes the following steps before the basic input / output system enters the initialization phase of the target channel: The target protocol sends a first instruction to the baseboard management controller to prohibit response to power restart, instructing the baseboard management controller not to execute the power restart instruction upon receiving it.
13. The method according to claim 12, characterized in that, The process of performing a restart operation on the server based on the target type and the value of the target restart flag includes: When the target type is a cold start type and the value of the target restart flag is a first value, a cold restart operation is performed, wherein the restart operation includes the cold restart operation.
14. The method according to claim 12, characterized in that, If the target channel initialization is complete and the server does not need to be restarted, the method further includes: sending a second instruction to the baseboard management controller of the server via the target protocol, allowing a power restart response, to instruct the baseboard management controller to execute the power restart instruction upon receiving it.
15. The method according to claim 12, characterized in that, If the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, the method further includes: The error message indicating that the target channel has an error is sent to the baseboard management controller of the server, so as to instruct the baseboard management controller to perform an alarm operation.
16. The method according to claim 1, characterized in that, Before performing a restart operation on the server based on the target type and the value of the target restart flag, the method further includes at least one of the following: If the comparison result indicates that the current initialization state is inconsistent with the historical initialization state, it is determined that the server needs to be restarted; If the value of the target restart flag is the first value, it is determined that the server needs to be restarted.
17. The method according to any one of claims 1 to 16, characterized in that, The target channel includes one of the following: Hyper-Interconnect channel, Cache Consistency Interconnect Protocol channel, or Gen-Z standard-based channel.
18. The method according to claim 1, characterized in that, The setting of the target restart flag includes: The target type and the value of the target restart flag are set.
19. A server restart device, characterized in that, The server includes at least two processors and a basic input / output system. The processors establish a target channel via a target bus, and the target processor among the at least two processors is connected to the basic input / output system. include: The comparison module is configured to compare the current initialization state of the target channel with the historical initialization state during the server startup process, when the basic input / output system enters the initialization phase of the target channel, and obtain a comparison result, wherein the historical initialization state is the initialization state of the target channel during the previous server startup process; The setting module is configured to set a target restart flag when the comparison result indicates that the current initialization state is inconsistent with the historical initialization state; The restart module is configured to perform a restart operation on the server based on the target type and the value of the target restart flag when the target channel initialization is completed and the server needs to be restarted.
20. A computer-defined non-volatile readable storage medium, characterized in that, The computer non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 18.
21. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 18.
22. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 18.
Citation Information
Patent Citations
Server self-starting method and device, readable storage medium and electronic equipment
CN115658113A
Server starting process control method and system, terminal and storage medium
CN117130672A
Server restarting method and device, storage medium and electronic equipment
CN117573435A
Interconnection link control method and device, storage medium and electronic equipment
CN117971741A
Server restarting method and device, storage medium and server
CN118245292A