Method for executing hot removal operation, hot plug system, equipment, medium and product

Through the method performed by the main central processor, the status of the target device sets the information and controls the level signal of the target output pins to trigger the system control interrupt event to complete the thermal removal operation and solve the problem of the equipment replacement effect in the server business. The unprepared heat insertion of the equipment was achieved.

CN119336682AActive Publication Date: 2025-01-21INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411877796.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-01-21
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the field of server technology, when performing hot-swap operation of PCI devices, the server needs to be shut down and powered down, which affects the service operation of the server.

Method used

Through the method executed by the main central processor, obtain the status setting information of the target device, including target link identification information and target status indication information, determine the target output pin, and change its level signal according to the target status indication information to trigger The system controls interrupt events to complete the hot removal operation.

Benefits of technology

It enables hot removal of equipment without affecting server business operations, simplifies the equipment replacement process, and is applicable to any type of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336682A_ABST
    Figure CN119336682A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses a method for executing a hot removal operation, a hot plug system, equipment, a medium and a product, which are used for acquiring target link identification information, target state indication information and position information of a target universal input / output interface unit. And determining a target output pin according to the identification information of the target communication link and the position information of the target general input / output interface unit. And changing the signal state of the level signal of the target output pin according to the target state indication information, and outputting the level signal to the target system control interruption pin. And when the target central processing unit is the main central processing unit, changing the numerical value in the target system control interrupt state register according to the signal state of the level signal. And when it is detected that the numerical value is the first preset numerical value, executing a heat removal operation on the target equipment. According to the method and the device, the hot removal operation of all types of peripheral interconnection component equipment can be realized, and the influence on the operation service of the server can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a method for performing a hot removal operation, a hot plug system, a device, a medium and a product. Background Art

[0002] In the field of server technology, the core components of a server include the central processing unit (CPU), memory, non-volatile memory host controller interface (NVME), hard disk and other devices. In addition, depending on the main functions of the server, the server can also be connected to peripheral component interconnect (PCI) devices, such as PCI network cards.

[0003] During the use of the PCI device, if the PCI device fails, the user replaces the PCI device. However, when replacing the PCI device, the server needs to be shut down and powered off to replace the PCI device, which affects the service operation of the server. Summary of the invention

[0004] In view of this, the present invention provides a method, apparatus, hot plug system, computer equipment, storage medium and program product for performing hot removal operations to solve the problem that plugging and unplugging operations on devices may affect the business operations of the server.

[0005] In a first aspect, the present invention provides a method for performing a hot removal operation, the method being executed by a main central processing unit, the method comprising: Acquire state setting information corresponding to the target device, wherein the state setting information includes target link identification information and target state indication information, and the target link identification information is identification information of a communication link between the target device and a target central processor to which it is connected; Obtaining the location information of the target universal input and output interface connected to the target device; Determine a target output pin corresponding to the target device on the target universal input / output interface according to the target link identification information and the location information of the target universal input / output interface; According to the target state indication information, a signal state of a level signal of a target output pin is changed, wherein the level signal of the target output pin is output to a target system control interrupt pin of a target peripheral interconnect component slot connected to a target device; When the target CPU is the main CPU, the value in the target system control interrupt status register corresponding to the target device is changed according to the signal state of the level signal detected from the target system control interrupt pin; When it is detected that the value in the target system control interrupt status register is a first preset value, a hot removal operation is performed on the target device.

[0006] A method for performing a heat removal operation provided by the present invention has the following advantages: First, according to the acquired target link identification information and the location information of the target universal input and output interface, the target output pin is determined, and then, according to the acquired target state indication information, the signal state of the level signal of the target output pin is changed, and the level signal output by the target output pin is output to the target system control interrupt pin. When the target central processor is the main central processor, the signal state of the level signal of the target system control interrupt pin can be detected, and the value in the target system control interrupt status register can be changed. When the value in the target system control interrupt status register is detected to be the first preset value, the target device can be removed. In this way, by controlling the level signal, the value in the target system control interrupt status register is modified, and the system control interrupt event is triggered to complete the hot removal operation. For any type of device, the same method can be used to perform hot removal operations, instead of setting different hot removal methods according to the structure of the device for different types of devices, and there is no need to control the device through other control devices, such as baseboard management controllers and complex programmable logic devices.

[0007] In an optional implementation, when the target CPU is not the main CPU, the method further includes: The value in the target system control interrupt status register is obtained from the target central processor; wherein the value in the target system control interrupt status register is a value obtained after the target central processor modifies the signal state of the level signal detected by the target system control interrupt pin.

[0008] Specifically, different CPUs detect the signal state of the level signal of the system control interrupt pin on the peripheral interconnect component slot connected to them, and change the value in the corresponding system control interrupt status register, and the main CPU obtains the value in the corresponding system control interrupt status register from the target CPU for subsequent judgment. In this way, more peripheral interconnect component devices can be connected, and hot removal control of all peripheral interconnect component devices can be realized.

[0009] In an optional implementation manner, the state setting information further includes target indication information for indicating a target universal input / output interface; Get the location information of the target GPIO interface connected to the target device, including: According to the target indication information, position information corresponding to the target indication information is acquired as position information of the target universal input / output interface.

[0010] Specifically, the location information of the target universal input / output interface can be accurately determined through the target indication information.

[0011] In an optional implementation, when the target indication information includes identification information of the target central processor, acquiring, according to the target indication information, location information corresponding to the target indication information as location information of the target universal input / output interface device includes: The location information of the target universal input / output interface is obtained according to the identification information of the target central processing unit and the mapping relationship between the identification information of the pre-built central processing unit and the location information of the universal input / output interface.

[0012] Specifically, since the central processing unit generally performs related business operations on devices connected through peripheral interconnect component slots, different central processing units can be connected to different devices, and different central processing units are connected to different general purpose input and output interfaces. Therefore, the location information of the target general purpose input and output interface connected to the target device can be accurately determined through the identification information of the target central processing unit.

[0013] In an optional implementation, determining a target output pin corresponding to a target device on the target universal input / output interface according to the target link identification information and the location information of the target universal input / output interface includes: Determine the identification information of the target output pin according to the target link identification information and the mapping relationship between the pre-built link identification information and the identification information of the output pin; According to the identification information of the target output pin and the position information of the target universal input and output interface, the target output pin is determined on the target universal input and output interface.

[0014] Specifically, the target output pin can be found accurately through the pre-established mapping relationship between the link identification information and the output pin identification information. When the subsequent information changes, only the mapping relationship needs to be changed, which is more convenient.

[0015] In an optional implementation, changing the signal state of the level signal of the target output pin according to the target state indication information includes: When it is determined that the target state indication information is used to indicate removal of the target device, changing the signal state of the level signal of the target output pin to a first preset state; or, When it is determined that the target state indication information is used to indicate adding a target device, the signal state of the level signal of the target output pin is changed to a second preset state.

[0016] Specifically, the signal state of the level signal of the target output pin is changed according to the target state indication information, so that the hot plug operation of the target device can be implemented, which is relatively convenient and does not require the use of other control devices to perform the hot plug operation on the target device.

[0017] In an optional implementation, when it is determined that the target state indication information is used to indicate adding a target device, after changing the signal state of the level signal of the target output pin to a second preset state, the method further includes: Restart the server so that after the server enters the processing logic of the operating system after the restart, the target device can be hot-plugged.

[0018] Specifically, after the target device is removed, the relevant information will be deleted from the operating system and no memory resources will be allocated to the target device. Therefore, through a restart operation, memory resources can be reallocated to the target device, that is, the relevant information of the target device can be updated to the operating system. In this way, the target device can be reused, that is, a hot-plug operation of the target device can be implemented.

[0019] In an optional implementation, acquiring status setting information corresponding to the target device includes: Receive hot-swap instructions sent by the client; The hot-swap instruction is parsed to obtain status setting information.

[0020] Specifically, users can perform hot-swap operations on any device at any time through simple operations, which is more convenient.

[0021] In an optional implementation, the target peripheral interconnect component slot is a peripheral interconnect component slot of at least one peripheral interconnect component slot included in the hot-swappable system, and all devices connected to each peripheral interconnect component slot are devices of the target type, and the target type devices are used to provide resources of the target type; Get the status setting information corresponding to the target device, including: Get the remaining amount of resources of the target type; Determine whether to perform a hot-swap operation and determine the operation type of the hot-swap operation according to the remaining amount of resources and a preset threshold; When it is determined to perform a hot-swap operation, randomly select identification information of a device from identification information corresponding to at least one device connected to each peripheral interconnect component slot and in a target state, wherein the target state is a state corresponding to the operation type, and the identification information of the randomly selected device is the identification information of the target device; Obtain target link identification information according to the identification information of the target device and the mapping relationship between the device identification information and the link identification information; According to the operation type, target state indication information corresponding to the operation type is determined, wherein the target link identification information and the target state indication information constitute state setting information.

[0022] Specifically, by detecting resource requirements in real time and automatically generating status setting information, hot-swap operations on any device can be implemented with greater flexibility.

[0023] In an optional implementation, the preset threshold includes a first preset threshold and a second preset threshold, and the second preset threshold is smaller than the first preset threshold; Determine whether to perform a hot-swap operation and the type of hot-swap operation based on the remaining amount of resources and a preset threshold, including: Determining whether the remaining amount of resources is greater than a first preset threshold, and determining whether the remaining amount of resources is less than a second preset threshold; When it is determined that the remaining amount of resources is greater than a first preset threshold, determining to perform a hot plug operation, and determining the operation type to be a hot removal operation; or, When it is determined that the remaining amount of resources is less than the first preset threshold, it is determined to perform a hot plug operation, and the operation type is determined to be a hot plug operation.

[0024] Specifically, when there are more remaining resources, the hot removal operation can be performed immediately, which can save management resources for the target device and reduce resource waste. When there are fewer remaining resources, the target device can be added in time to provide sufficient resources for the business running on the server.

[0025] In an optional implementation, when it is detected that the value in the target system control interrupt status register is a first preset value, performing a hot removal operation on the target device includes: The target control method in the operating system power management is used to perform a hot removal operation on the target device according to the target link identification information.

[0026] Specifically, the operating system power management module can ensure that the hot removal operation is performed in a safe state. Before removal, it is confirmed that the target device has correctly uninstalled the driver, stopped all data transmission, and put the target device into a low power or sleep state, thereby reducing potential risks.

[0027] In a second aspect, the present invention provides a device for performing a heat removal operation, the device comprising: An acquisition module is used to acquire state setting information corresponding to a target device, wherein the state setting information includes target link identification information and target state indication information, and the target link identification information is identification information of a communication link between the target device and a target central processor connected thereto; and acquire location information of a target universal input / output interface connected to the target device; A determination module, used to determine a target output pin corresponding to a target device on the target universal input-output interface according to the target link identification information and the location information of the target universal input-output interface; a change module, for changing the signal state of the level signal of the target output pin according to the target state indication information, wherein the level signal of the target output pin is output to the target system control interrupt pin of the target peripheral interconnect component slot connected to the target device; when the target central processor is the main central processor, according to the signal state of the level signal detected from the target system control interrupt pin, changing the value in the target system control interrupt state register corresponding to the target device; The detection module is used to perform a hot removal operation on the target device when it is detected that the value in the target system control interrupt status register is a first preset value.

[0028] In a third aspect, the present invention provides a hot-swap system, the hot-swap system comprising at least one central processing unit, at least one universal input and output interface, and at least one peripheral interconnect component slot; The main central processing unit in at least one central processing unit is used to execute the method for the heat removal operation of the first aspect or any corresponding embodiment thereof.

[0029] In a fourth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for thermal removal operation of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0030] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for thermal removal operation of the first aspect or any corresponding embodiment thereof.

[0031] In a sixth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for thermal removal operation of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 is a schematic diagram of a hot-swap system according to an embodiment of the present invention; Figure 2 is a flow chart of a method for performing a heat removal operation according to an embodiment of the present invention; Figure 3 is a schematic diagram of an interface of an operating tool according to an embodiment of the present invention; Figure 4 is a schematic diagram of an interface of another operating tool according to an embodiment of the present invention; Figure 5 is a flow chart of a method for performing a hot-swap operation according to an embodiment of the present invention; Figure 6 is a structural block diagram of an apparatus for performing a heat removal operation according to an embodiment of the present invention; Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0035] The method for performing a hot removal operation provided by the present invention can be implemented by a hot-swap system, which may include at least one central processing unit (Central Processing Unit), at least one general purpose input output (General Purpose Input Output, GPIO) interface and at least one peripheral component interconnect (Peripheral Component Interconnect) slot. The hot-swap system may be a component of a server.

[0036] For example, the structure of a hot-swap system can be as follows Figure 1 As shown, the main CPU ( Figure 1 The CPU 0 in the embodiment of the present invention can be electrically connected to each GPIO device through an I2C bus, the CPU 0 is electrically connected to a plurality of peripheral interconnect component slots, each peripheral interconnect component slot connected to the CPU 0 is electrically connected to the GPIO device 0, and each peripheral interconnect component slot connected to the CPU 1 is electrically connected to the GPIO device 1. Specifically, the GPIO device may include a plurality of output pins (such as Figure 1 Each peripheral interconnect component slot may include at least one system control interrupt pin. An output pin on the general input and output interface may be electrically connected to a system control interrupt pin.

[0037] Among them, the peripheral interconnect component slot can be used to connect various peripheral interconnect component devices, such as peripheral interconnect component network card, Open Compute Project (OCP) network card, peripheral interconnect component redundant array of independent disks (RAID) card, peripheral interconnect component interface acceleration card, etc. The peripheral interconnect component slot can be a slot with different bandwidths, such as a peripheral interconnect component x1 slot (theoretical maximum bandwidth of 1GB / s), a peripheral interconnect component x4 slot (theoretical maximum bandwidth of 4GB / s), a peripheral interconnect component x8 slot (theoretical maximum bandwidth of 8GB / s), a peripheral interconnect component x16 slot (theoretical maximum bandwidth of 16GB / s), etc. Each peripheral interconnect component slot can be connected to one or more peripheral interconnect component devices, and a peripheral interconnect component device has its corresponding system control interrupt pin on the peripheral interconnect component slot to which it is connected.

[0038] CPU 0 and CPU 1 are electrically connected and can communicate and interact through the Cache Coherent Interconnect for Accelerators (CCIX) protocol, Ultra Path Interconnect (UPI) protocol, and Gemini Memory Interface (GMI) protocol. CPU 0 can use the operating system stored in the memory and interact with the Basic Input / Output System (BIOS) to complete related operations. For example, it can handle System Control Interrupt (System Control Interrupt) events. CPU 0 can interact with BIOS through Low Pin Count (LPC), Serial Peripheral Interface (SPI), and Quad Serial Peripheral Interface (QSPI).

[0039] In some optional embodiments, when there are multiple universal input / output interfaces, the peripheral interconnect component slot connected to the first central processing unit can be electrically connected to the universal input / output interface connected to the first central processing unit, wherein the first central processing unit is any one of the at least one central processing unit.

[0040] The embodiment of the present invention provides a method for performing a hot removal operation. The hot removal operation can be triggered by a system control interrupt event to implement the hot removal operation for different types of peripheral interconnect component devices.

[0041] According to an embodiment of the present invention, a method embodiment for performing a hot removal operation is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0042] In this embodiment, a method for performing a hot removal operation is provided, which can be performed by the main CPU mentioned above. Figure 2 is a flow chart of a method for performing a hot removal operation according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps: Step S201, obtaining status setting information corresponding to the target device.

[0043] The target device may be any peripheral interconnect component device. The state setting information may include target link identification information and target state indication information. The target link identification information is identification information of the communication link between the target device and the target central processor to which it is connected, for example, Figure 1 The target status indication information can be used to indicate the execution of a hot removal operation on the target device, and can also be used to indicate the execution of a hot plug operation on the target device. When the hot plug system includes multiple universal input and output interfaces, and the main central processing unit is respectively connected to each universal input and output interface, the status setting information can also include target indication information for indicating the target universal input and output interface. The target indication information can be the identification information of the target central processing unit, and can also be the identification information of the target universal input and output interface.

[0044] Specifically, the status setting information may be obtained from the client, or may be automatically generated. Accordingly, the status setting information may be obtained in the following two ways.

[0045] Method 1: Receive the hot-swap command sent by the client, parse the hot-swap command, and obtain the status setting information.

[0046] Specifically, the server may be installed with an operating tool, the client may display an interface of the operating tool, and the client and the server may interact to implement status setting operations on various peripheral interconnect component devices.

[0047] First, the interface for running the tool can be as follows Figure 3 As shown. The user can perform two levels of selection operations. First, select the target link identification information corresponding to the target device, and then set the target status indication information. For example, when a device connected to the peripheral interconnect component 3 needs to be hot-removed, the user can choose to enter 3 and then enter a value 1 (indicating that the hot removal function is enabled). The client can generate status setting information based on the user's input operation. In this case, the status setting information includes the above-mentioned target link identification information and target status indication information.

[0048] Second, the interface for running the tool can be as follows Figure 4As shown. The user can perform three levels of selection operations. First, select the identification information of the target central processor, then select the target link identification information corresponding to the target device, and then set the target status indication information. For example, when a device connected to the peripheral interconnect component 1 needs to be hot-removed, the user can choose to enter 0, then enter a value of 1, and finally enter a value of 1 (indicating that the hot removal function is enabled). The client can generate status setting information based on the user's input operation. In this case, the status setting information includes the above-mentioned identification information of the target central processor (the above-mentioned target indication information), the target link identification information, and the target status indication information.

[0049] In a second method, the main central processor can obtain the remaining amount of resources of the target type. According to the remaining amount of resources and the preset threshold, determine whether to perform a hot-swap operation and determine the operation type of the hot-swap operation. When it is determined to perform a hot-swap operation, randomly select the identification information of a device from the identification information corresponding to at least one device connected to each peripheral interconnect component slot and in the target state. Among them, the target state is a state corresponding to the operation type, and the identification information of the randomly selected device is the identification information of the target device. According to the identification information of the target device and the mapping relationship between the identification information of the device and the link identification information, obtain the target link identification information. According to the operation type, determine the target state indication information corresponding to the operation type.

[0050] The target type of resource may be a storage resource, a computing resource, etc. The operation type may be a hot-insert operation or a hot-remove operation.

[0051] Optionally, when the preset threshold includes a first preset threshold and a second preset threshold, and the second preset threshold is less than the first preset threshold, the specific process of determining whether to perform the hot plug operation and determining the operation type according to the remaining amount of resources and the preset threshold may be as follows: Determine whether the remaining amount of resources is greater than a first preset threshold, and determine whether the remaining amount of resources is less than a second preset threshold. When it is determined that the remaining amount of resources is greater than the first preset threshold, determine to perform a hot plug operation, and determine the operation type to be a hot removal operation. Alternatively, when it is determined that the remaining amount of resources is less than the first preset threshold, determine to perform a hot plug operation, and determine the operation type to be a hot insertion operation.

[0052] Step S202, obtaining the location information of the target universal input and output interface connected to the target device.

[0053] The location information may be I2C address information.

[0054] Specifically, due to the different numbers and connection relationships of various components in the hot-swap system, correspondingly, obtaining the location information of the target universal input and output interface may include the following situations: Case 1: When the number of peripheral interconnect component devices is small (for example, the number is less than or equal to the number of output pins on a universal input / output interface), the hot-swap system can only set up one universal input / output interface, and the universal input / output interface is only connected to the main central processor, and the state setting information only includes the target link identification information and the target state indication information. In this case, since the main central processor is connected to other components in the server through the I2C bus, the location information of the target universal input / output interface can be stored in the memory of the main central processor. In this way, when the state setting information is obtained, the location information of the target universal input / output interface is directly obtained from the memory.

[0055] Case 2: When the number of peripheral interconnect component devices is large (for example, the number is greater than the number of output pins on a universal input / output interface), the main central processor can be electrically connected to each universal input / output interface, and the state setting information includes target link identification information and target state indication information. The main central processor can obtain the location information of the target universal input / output interface according to the mapping relationship between the target link identification information, the pre-built link identification information, and the location information of the universal input / output interface. In this way, the target universal input / output interface to which the target device is connected is automatically determined through the target link identification information and the mapping relationship between the pre-built link identification information and the location information of the universal input / output interface, without the user having to perform more selection operations, which can simplify the user's operation.

[0056] Case 3: When the number of peripheral interconnect component devices is large (for example, greater than the number of output pins on a universal input / output interface), the main central processor can be electrically connected to each universal input / output interface, and the state setting information includes target link identification information, target state indication information, and target indication information. When the target indication information is the identification information of the target central processor, the main central processor can obtain the location information of the target universal input / output interface based on the identification information of the target central processor and the mapping relationship between the identification information of the pre-built central processor and the location information of the universal input / output interface. Alternatively, when the target indication information is the identification information of the target universal input / output interface, the main central processor can obtain the location information of the target universal input / output interface based on the identification information of the target universal input / output interface and the mapping relationship between the identification information and the location information of the pre-built universal input / output interface.

[0057] Step S203: determining a target output pin corresponding to the target device on the target universal input / output interface according to the target link identification information and the location information of the target universal input / output interface.

[0058] Specifically, step S203 may include: Step 1: Determine the identification information of the target output pin according to the target link identification information and the mapping relationship between the pre-built link identification information and the identification information of the output pin.

[0059] Step 2: determining the target output pin on the target universal input / output interface according to the identification information of the target output pin and the position information of the target universal input / output interface.

[0060] Step S204: modifying the signal state of the level signal of the target output pin according to the target state indication information.

[0061] The level signal of the target output pin is output to the target system control interrupt pin of the target peripheral interconnect component slot connected to the target device.

[0062] Specifically, when the main central processor and each universal input and output interface are electrically connected respectively, the main central processor can change the signal state of the level signal of the target output pin by running the tool. Accordingly, when it is determined that the target state indication information is used to indicate the removal of the target device, the main central processor can change the signal state of the level signal of the target output pin to a first preset state (for example, a high level state). Alternatively, when it is determined that the target state indication information is used to indicate the addition of the target device, the main central processor can change the signal state of the level signal of the target output pin to a second preset state (for example, a low level state).

[0063] In some other optional embodiments, when there are multiple universal input / output interfaces, the peripheral interconnect component slot connected to the first central processing unit can be electrically connected to the universal input / output interface connected to the first central processing unit. When the target central processing unit is not the main central processing unit, the main central processing unit can send the determined identification information of the target output pin and the location information of the target universal input / output interface to the target central processing unit, and the target central processing unit adjusts the signal state of the level signal of the target output pin.

[0064] In some optional implementations, after the signal state of the level signal of the target output pin is changed to the second preset state, the main central processor can also perform a restart operation on the server, so that after the server enters the processing logic of the operating system after the restart, a hot plug operation is performed on the target device to allocate memory resources to the target device. After restarting and entering the processing logic of the operating system, the main central processor will read the value in the system control interrupt status register corresponding to each device, and determine whether the corresponding device performs a hot removal operation or a hot plug operation based on the read value.

[0065] Step S205, when the target CPU is the master CPU, the value in the target system control interrupt status register corresponding to the target device is modified according to the signal state of the level signal detected from the target system control interrupt pin.

[0066] Specifically, when the target central processor is the main central processor, the main central processor can change the value in the target system control interrupt enable register according to the signal state of the level signal detected from the target system control interrupt pin, and change the value in the target system control interrupt status register according to the value detected from the target system control interrupt enable register.

[0067] Alternatively, when the target central processor is not the main central processor, the value in the target system control interrupt status register is obtained from the target central processor. The value in the target system control interrupt status register is a value obtained by modifying the signal state of the level signal detected by the target central processor according to the target system control interrupt pin. Specifically, the target central processor can change the value in the target system control interrupt enable register according to the signal state of the level signal detected from the target system control interrupt pin, and change the value in the target system control interrupt status register according to the value detected from the target system control interrupt enable register.

[0068] Step S206 , when it is detected that the value in the target system control interrupt status register is a first preset value, a hot removal operation is performed on the target device.

[0069] Specifically, the main central processing unit can actively identify whether the value in each system status control register is the first preset value through the operating system power management (OSPM) driver under the operating system, that is, detect whether a system control interrupt event triggers a hot removal operation. When it is detected that the value in the target system control interrupt status register is the first preset value, it can be determined that the system interrupt trigger event triggers the hot removal operation of the target device. At this time, the main central processing unit can use the target control method in OSPM to perform a hot removal operation on the target device according to the target link identification information. Among them, the target control method can be the _EJ0 control method.

[0070] Before performing the hot removal operation, the main CPU can first determine whether the target device is still in working state. When it is determined that the target device is not in working state, the target control method is called to turn off the power of the target device, release the resources related to the target device, and remove the reference to the target device (that is, the operating system will stop the management and monitoring operations of the target device at the software level). In this way, the user can no longer see the target device on the client display interface and cannot use the target device for any operation.

[0071] For example, the relevant code to perform a hot-swap operation could be as follows: " / / Tell OS to run thru the new status of this device (Software SCIgenerated from SMM for all Hot plug events) Method (_L62, 0x0, Not Serialized) { If (L Equal (SCI0, 3)) { / / Device ejection (Invoked with _EJ0 methodcalled) / / NTFM (SCI1, 3) NTFC (SCI2, 3) Store (0, SCI0) } Else If (LE qual (SCI0, 1)) { / / Device check (OS can still rejectonline request based on resources and capability) NTFC (CPHP, 0) NTFI (IIOP, 0) Store (0, CPHP) Store (0, IIOP) Store (0, SCI0) } In addition, before executing this solution, it is necessary to define the address and target control method for each device connected to each peripheral interconnect component slot to implement the hot plug function for each device. For example, the following code defines the address and target control method of the devices connected to two peripheral interconnect component slots.

[0072] Name (HPP, Package () {0x08,0x40, 0x01, 0x00}) / / Device definitions for Slot 1- HOT PLUG SLOT Device (S1F0) { / / Slot 1, Func#0 on bus P2P2 Name(_ADR,0x00020000) Method (EJ0, 1) { } Device (S1F1) { / / Remove all power to device} / / Slot 1, Func#1 on bus P2P2 Name(_ADR,0x00020001) Method (_EJ0, 1) { } Device (S1F2) { / / Remove all power to device} / / Slot 1, Func#2 on bus P2P2 Name (ADR,0x000200 02) Method (_EJ0, 1) { } Device (S1F3) { / / Remove all power to device} / / Slot 1, Func#3 on bus P2P2 Name(_ADR,0x00020003) Method (_EJ0, 1) { } Device (S1F4) { / / Remove all power to device} / / Slot 1, Func#4 on bus P2P2 Name(_ADR,0x00020004) Method (_EJ0, 1) { } Device (S1F5) { / / Remove all power to device} / / Slot 1, Func#5 on bus P2P2 Name(_ADR,0x00020005) Method (_EJ0, 1) { } Device (S1F6) { / / Remove all power to device} / / Slot 1, Func#6 on bus P2P2 Name(_ADR,0x00020006) Method (_EJ0, 1) { } Device (S1F7) { / / Remove all power to device} / / Slot 1, Func#7 on bus P2P2 Name(_ADR,0x00020007) Method (_EJ0, 1) { } / / Remove all power to device} / / Device definitions for Slot 2- HOT PLUG SLOT Device (S2F0) { / / Slot 2, Func#0 on bus P2P2 Name(_ADR,0x00030000) Method (_EJ0, 1) { } Device (S2F1) { / / Remove all power to device} / / Slot 2, Func#1 on bus P2P2 Name(_ADR,0x00030001) Method (_EJ0, 1) { } Device (S2F2) { / / Remove all power to device} / / Slot 2, Func#2 on bus P2P2 Name(_ADR,0x00030002) Method (_EJ0, 1) { } Device (S2F3) { / / Remove all power to device} / / Slot 2, Func#3 on bus P2P2 Name(_ADR,0x00030003) Method (_EJ0, 1) { } Device (S2F4) { / / Remove all power to device} / / Slot 2, Func#4 on bus P2P2 Name(_ADR,0x00030004) ) Method (_EJ0, 1) { / / Remove all power to device} } Device (S2F5) { / / Slot 2, Func#5 on bus P2P2 Name(_ADR,0x00030005) Method (_EJ0, 1) { / / Remove all power to device} } Device (S2F6) { / / Slot 2, Func#6 on bus P2P2 Name(_ADR,0x00030006) Method (_EJ0, 1) { / / Remove all power to device} } Device (S2F7) { / / Slot 2, Func#7 on bus P2P2 Name(_ADR,0x00030007) Method (_EJ0, 1) { / / Remove all power to device} } }” In some optional embodiments, after completing the hot removal operation on the target device, the main central processor can verify through OSPM whether the hot removal of the target device is successful, for example, verify whether the target device can still be detected. If so, it can be considered that the hot removal of the target device has failed; if not, it can be considered that the hot removal of the target device has been successful.

[0073] In some optional implementations, the mapping relationship of the above settings may be predefined in a Differentiated System Description Table (DSDT) of an Advanced Configuration and Power Management Interface (ACPI).

[0074] The method for performing a hot removal operation provided in this embodiment, first, determines the target output pin according to the acquired target link identification information and the position information of the target universal input and output interface, and then, according to the acquired target state indication information, changes the signal state of the level signal of the target output pin, and the level signal output by the target output pin is output to the target system control interrupt pin. When the target central processor is the main central processor, the signal state of the level signal of the target system control interrupt pin can be detected, and the value in the target system control interrupt status register can be changed. When it is detected that the value in the target system control interrupt status register is a first preset value, the target device can be removed. In this way, by controlling the level signal, the value in the target system control interrupt status register is modified, and a system control interrupt event is triggered to complete the hot removal operation. For any type of device, the same method can be used to perform a hot removal operation, instead of setting different hot removal methods according to the structure of the device for different types of devices, and there is no need to control the device through other control devices, such as a baseboard management controller and a complex programmable logic device.

[0075] The following is a detailed description of the entire process of hot-swap operation from the hardware level, operating system level and operation tool level. The specific steps can be as follows: Figure 5 shown.

[0076] After each power-on startup and entry into the operating system, the server will use the ACPI protocol DSDT table to check the value in the system control interrupt status register corresponding to each device (that is, each PCI link) to determine whether the hot removal function corresponding to each device is turned on. If so, the corresponding device can be hot-removed through the target control method. If not, the corresponding device can be used normally. During the operation of the server, the user can select a device for hot removal. First, the user can select the identification information of the target CPU, then select the link identification information, and finally select the status indication information. If the status indication information is used to indicate the removal of the device, when the value in the corresponding system control interrupt status register is determined to be the first preset value through the DSDT of the ACPI protocol, the device is removed through the _EJ0 method of OSPM.

[0077] In this embodiment, a device for performing a heat removal operation is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0078] This embodiment provides a device for performing a heat removal operation, such as Figure 6 As shown, including: The acquisition module 601 is used to acquire the state setting information corresponding to the target device, wherein the state setting information includes the target link identification information and the target state indication information, and the target link identification information is the identification information of the communication link between the target device and the target central processor connected thereto; and acquire the location information of the target universal input and output interface connected to the target device; The determination module 602 is used to determine the target output pin corresponding to the target device on the target universal input and output interface according to the target link identification information and the location information of the target universal input and output interface; The changing module 603 is used to change the signal state of the level signal of the target output pin according to the target state indication information, wherein the level signal of the target output pin is output to the target system control interrupt pin of the target peripheral interconnect component slot connected to the target device; when the target central processor is the main central processor, according to the signal state of the level signal detected from the target system control interrupt pin, the value in the target system control interrupt state register corresponding to the target device is changed; The detection module 604 is configured to perform a hot removal operation on the target device when it is detected that the value in the target system control interrupt status register is a first preset value.

[0079] In an optional implementation, the acquisition module 601 is further configured to: When the target central processor is not the main central processor, the value in the target system control interrupt status register is obtained from the target central processor; wherein the value in the target system control interrupt status register is the value obtained after the target central processor modifies the signal state of the level signal of the target system control interrupt pin detected.

[0080] In an optional implementation manner, the state setting information further includes target indication information for indicating a target universal input / output interface; The acquisition module 601 is specifically used for: According to the target indication information, position information corresponding to the target indication information is acquired as position information of the target universal input / output interface.

[0081] In an optional implementation, when the target indication information includes identification information of the target central processor, the acquisition module 601 is specifically configured to: The location information of the target universal input / output interface is obtained according to the identification information of the target central processing unit and the mapping relationship between the identification information of the pre-built central processing unit and the location information of the universal input / output interface.

[0082] In an optional implementation, the determination module 602 is specifically configured to: Determine the identification information of the target output pin according to the target link identification information and the mapping relationship between the pre-built link identification information and the identification information of the output pin; According to the identification information of the target output pin and the position information of the target universal input and output interface, the target output pin is determined on the target universal input and output interface.

[0083] In an optional implementation, the modification module 603 is specifically configured to: When it is determined that the target state indication information is used to indicate removal of the target device, changing the signal state of the level signal of the target output pin to a first preset state; or, When it is determined that the target state indication information is used to indicate adding a target device, the signal state of the level signal of the target output pin is changed to a second preset state.

[0084] In an optional implementation, the determination module 602 is further configured to: Restart the server so that after the server enters the processing logic of the operating system after the restart, the target device can be hot-plugged.

[0085] In an optional implementation, the acquisition module 601 is specifically configured to: Receive hot-swap instructions sent by the client; The hot-swap instruction is parsed to obtain status setting information.

[0086] In an optional implementation, the target peripheral interconnect component slot is a peripheral interconnect component slot of at least one peripheral interconnect component slot included in the hot-swappable system, and all devices connected to each peripheral interconnect component slot are devices of the target type, and the target type devices are used to provide resources of the target type; The acquisition module 601 is specifically used for: Get the remaining amount of resources of the target type; Determine whether to perform a hot-swap operation and determine the operation type of the hot-swap operation according to the remaining amount of resources and a preset threshold; When it is determined to perform a hot-swap operation, randomly select identification information of a device from identification information corresponding to at least one device connected to each peripheral interconnect component slot and in a target state, wherein the target state is a state corresponding to the operation type, and the identification information of the randomly selected device is the identification information of the target device; Obtain target link identification information according to the identification information of the target device and the mapping relationship between the device identification information and the link identification information; According to the operation type, target state indication information corresponding to the operation type is determined, wherein the target link identification information and the target state indication information constitute state setting information.

[0087] In an optional implementation, the preset threshold includes a first preset threshold and a second preset threshold, and the second preset threshold is smaller than the first preset threshold; The acquisition module 601 is specifically used for: Determining whether the remaining amount of resources is greater than a first preset threshold, and determining whether the remaining amount of resources is less than a second preset threshold; When it is determined that the remaining amount of resources is greater than a first preset threshold, determining to perform a hot plug operation, and determining the operation type to be a hot removal operation; or, When it is determined that the remaining amount of resources is less than the first preset threshold, it is determined to perform a hot plug operation, and the operation type is determined to be a hot plug operation.

[0088] In an optional implementation, the detection module 604 is specifically configured to: The target control method in the operating system power management is used to perform a hot removal operation on the target device according to the target link identification information.

[0089] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0090] The device for performing the hot removal operation in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0091] The embodiment of the present invention also provides a computer device having the above Figure 6 An apparatus for performing a heat removal operation is shown.

[0092] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0093] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0094] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0095] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0096] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0097] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0098] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0099] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0100] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for performing a heat removal operation, characterized in that: The method is executed by a main central processing unit, and the method includes: Acquire state setting information corresponding to the target device, wherein the state setting information includes target link identification information and target state indication information, and the target link identification information is identification information of a communication link between the target device and a target central processor to which it is connected; Acquire location information of a target universal input / output interface connected to the target device; Determine, on the target universal input-output interface device, a target output pin corresponding to the target device according to the target link identification information and the location information of the target universal input-output interface device; According to the target state indication information, a signal state of a level signal of the target output pin is changed, wherein the level signal of the target output pin is output to a target system control interrupt pin of a target peripheral interconnect component slot connected to the target device; When the target central processor is the main central processor, according to the signal state of the level signal detected from the target system control interrupt pin, the value in the target system control interrupt status register corresponding to the target device is changed; When it is detected that the value in the target system control interrupt status register is a first preset value, a hot removal operation is performed on the target device.

2. The method according to claim 1, characterized in that When the target CPU is not the main CPU, the method further includes: The value in the target system control interrupt status register is obtained from the target central processing unit; wherein the value in the target system control interrupt status register is a value obtained after the target central processing unit modifies the signal state of the level signal of the target system control interrupt pin according to the detection.

3. The method according to claim 1, characterized in that The state setting information also includes target indication information for indicating the target universal input and output interface; The step of obtaining the location information of the target universal input / output interface connected to the target device includes: According to the target indication information, position information corresponding to the target indication information is acquired as the position information of the target universal input / output interface.

4. The method according to claim 3, characterized in that When the target indication information includes identification information of the target central processor, acquiring, according to the target indication information, location information corresponding to the target indication information as location information of the target universal input / output interface device includes: The location information of the target universal input / output interface is acquired according to the identification information of the target central processing unit and the mapping relationship between the identification information of the pre-built central processing unit and the location information of the universal input / output interface.

5. The method according to any one of claims 1 to 4, characterized in that: The step of determining a target output pin corresponding to the target device on the target universal input / output interface according to the target link identification information and the location information of the target universal input / output interface comprises: Determine the identification information of the target output pin according to the target link identification information and the mapping relationship between the pre-constructed link identification information and the identification information of the output pin; The target output pin is determined on the target universal input output interface according to the identification information of the target output pin and the position information of the target universal input output interface.

6. The method according to any one of claims 1 to 4, characterized in that: The step of changing the signal state of the level signal of the target output pin according to the target state indication information comprises: When it is determined that the target state indication information is used to indicate removal of the target device, changing the signal state of the level signal of the target output pin to a first preset state; or, When it is determined that the target state indication information is used to indicate adding the target device, the signal state of the level signal of the target output pin is changed to a second preset state.

7. The method according to claim 6, characterized in that When it is determined that the target state indication information is used to indicate adding the target device, after changing the signal state of the level signal of the target output pin to a second preset state, the method further includes: A restart operation is performed on the server, so that after the server enters the processing logic of the operating system after the restart, a hot-plug operation is performed on the target device.

8. The method according to any one of claims 1 to 4, characterized in that: The acquiring of the status setting information corresponding to the target device includes: Receive hot-swap instructions sent by the client; The hot plug instruction is parsed to obtain the status setting information.

9. The method according to claim 1 or 2, characterized in that: The target peripheral interconnect component slot is a peripheral interconnect component slot of at least one peripheral interconnect component slot included in the hot-swap system, and all devices connected to each of the peripheral interconnect component slots are target-type devices, and the target-type devices are used to provide target-type resources; The acquiring of the status setting information corresponding to the target device includes: Get the remaining amount of resources of the target type; Determining whether to perform a hot-swap operation and determining an operation type of the hot-swap operation according to the remaining amount of the resource and a preset threshold; When it is determined to perform the hot-plug operation, randomly select identification information of a device from identification information corresponding to at least one device connected to each of the peripheral interconnect component slots and in a target state, wherein the target state is a state corresponding to the operation type, and the identification information of the randomly selected device is the identification information of the target device; Acquire the target link identification information according to the identification information of the target device and the mapping relationship between the device identification information and the link identification information; According to the operation type, the target state indication information corresponding to the operation type is determined, wherein the target link identification information and the target state indication information constitute the state setting information.

10. The method according to claim 9, characterized in that The preset threshold includes a first preset threshold and a second preset threshold, and the second preset threshold is smaller than the first preset threshold; The determining whether to perform a hot plug operation and determining the operation type of the hot plug operation according to the remaining amount of resources and a preset threshold value includes: Determining whether the remaining amount of the resource is greater than the first preset threshold, and determining whether the remaining amount of the resource is less than the second preset threshold; When it is determined that the remaining amount of the resource is greater than the first preset threshold, determining to perform the hot plug operation, and determining that the operation type is a hot removal operation; or, When it is determined that the remaining amount of resources is less than the first preset threshold, it is determined to perform the hot plug operation, and the operation type is determined to be a hot plug operation.

11. The method according to any one of claims 1 to 3, characterized in that: When it is detected that the value in the target system control interrupt status register is the first preset value, performing a hot removal operation on the target device includes: A target control method in operating system power management is used to perform a hot removal operation on the target device according to the target link identification information.

12. A hot-swap system, characterized in that: The hot-swap system includes at least one central processing unit, at least one universal input and output interface, and at least one peripheral interconnect component slot; The main central processing unit in at least one of the central processing units is used to execute the method for performing a heat removal operation as claimed in any one of claims 1 to 11.

13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for performing a thermal removal operation according to any one of claims 1 to 11 by executing the computer instructions.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer device to execute the method for performing a hot removal operation according to any one of claims 1 to 11.

15. A computer program product, characterized in that The method comprises computer instructions for causing a computer device to execute the method for performing a hot removal operation according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Novel data acquiring system SuperCAP

    CN102983998A

  • Hot plug method, device and system of PCIE equipment

    CN110955624A

  • Power-on and power-off control method and system for PCIe equipment

    CN112825011A

  • Equipment hot plug method and device, computer equipment and storage medium

    CN117112353A

  • Server, hard disk monitoring method and device thereof, equipment and medium

    CN117992311A

Cited By

  • Hot plug control method, hot plug system, medium and program product

    CN119718996A

  • Electronic equipment and hot plug method executed by electronic equipment

    CN119883990A

  • Hot plug control system and method, electronic equipment and storage medium

    CN120508521A

  • Hot plug management board and hot plug method thereof

    CN121255699A

  • Method for performing hot removal operation, hot plugging system, device, medium, and product

    WO2026129574A1