Method for communication between CPU (Central Processing Unit) and computing power module and computing system

By disconnecting the communication link with the computing power module and uninstalling the driver before the main CPU restarts, the problem of the main CPU restart in the edge server affecting the operation of the computing power module is solved, and the stability and service reliability of the communication link are improved.

CN118916323APending Publication Date: 2024-11-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410951582.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The data communication link between the main CPU and the computing power module in the edge server is unstable, which affects the operation of the computing power module when the main CPU is restarted, which may lead to data loss and device downtime.

Method used

Before the main CPU restarts, the power module is notified to disconnect the communication link, and the driver is uninstalled, and the memory and network ports are released to ensure that the restart operation does not affect the normal operation of the power module.

Benefits of technology

It effectively avoids data loss and equipment downtime, improves the stability of the communication link between the main CPU and the computing power module, and ensures normal operation of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916323A_ABST
    Figure CN118916323A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses a method for communication between a CPU and a computing power module and a computing system. The method is applied to a main CPU in an edge server. The main CPU is connected with at least one computing power module; a first target driver is loaded in the main CPU, and each computing power module is set to be in an endpoint mode; the method comprises the following steps: before the main CPU executes a restart operation, generating a first interrupt signal, and sending the first interrupt signal to each computing power module; the first interrupt signal is used for notifying each computing power module to disconnect a communication link with the main CPU; stopping sending the calculation data to each calculation power module, and stopping receiving a calculation result returned by each calculation power module; unloading a first target drive of the main CPU, and disconnecting links between each computing power module and the main CPU, specifically comprising: releasing a memory allocated to each network port; cancelling and deleting all network ports; and after the first target drive is unloaded, the main CPU executes a restart operation. By adopting the method, the operation of the computing power module is not influenced by the restart operation of the main CPU, and the stability of a communication link is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a method and a computing system for communication between a CPU and a computing power module. Background Art

[0002] Edge servers have significant advantages in processing large amounts of data, providing fast services, improving security, and adapting to complex network environments, providing an important landing platform for emerging technologies such as artificial intelligence, the Internet of Things, and 5G. In order to better cope with complex application scenarios and improve data processing performance and response efficiency, it is very important to enhance the computing power of edge servers.

[0003] Edge servers are usually small in size and have a limited number of hardware interfaces. In order to improve the computing power of edge servers, one way is to use a computing power module. The computing power module is integrated into a carrier board with a PCIE (peripheral component interconnect express) interface, and then connected to the hard disk backplane of the NVMe (NVM Express, non-volatile memory host controller interface specification) protocol in the edge server to form an all-in-one device. The computing power module belongs to a GPU (graphics processing unit) with an operating system. It has powerful computing power. It establishes physical layer data communication with the main CPU (Central Processing Unit) of the edge server through the PCIE channel. It can not only provide computing power for the edge server, but also use the computing power module as a slave CPU to communicate data with the main CPU of the edge server, forming a modular design of the edge server to meet the diverse needs of different customers. In the current edge server, there is an unstable data communication link between the main CPU and the computing power module. The restart of the main CPU will affect the operation of the computing power module, resulting in data loss and abnormal equipment downtime, affecting the normal operation of the business. Summary of the invention

[0004] In view of this, the present application aims to propose a method and computing system for communication between a CPU and a computing power module, so as to improve the stability of the communication link between the main CPU and the computing power module in the edge server.

[0005] To achieve the above purpose, the technical solution of this application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for communication between a CPU and a computing module, the method being applied to a main CPU in an edge server; the main CPU being connected to at least one computing module; a first target driver being loaded in the main CPU, and each computing module being set to an endpoint mode; the method comprising:

[0007] Before the main CPU performs a restart operation, a first interrupt signal is generated and sent to each computing power module; the first interrupt signal is used to notify each computing power module to disconnect the communication link with the main CPU;

[0008] Stop sending target computing tasks and corresponding target data to each computing power module, and stop receiving computing results returned by each computing power module;

[0009] Uninstalling the first target driver of the main CPU and disconnecting the links between each computing module and the main CPU, specifically including: releasing the memory allocated to each network port; deregistering and deleting all network ports;

[0010] After uninstalling the first target driver, the main CPU performs a restart operation.

[0011] Optionally, after executing the restart operation of the main CPU, the method further includes:

[0012] Receive GPIO pin control signals sent by the microcontroller unit;

[0013] According to the GPIO pin control signal, a hardware reset operation of the link is performed;

[0014] After performing the hardware reset operation, sending request information to all devices in the link; the request information is used to identify each computing power module;

[0015] Load the first target driver and allocate corresponding memory to the network port of each computing power module;

[0016] For each computing power module, after the computing power module re-enables the corresponding network port, the main CPU sends the target computing task and the corresponding target data to the corresponding computing power module through the network port;

[0017] Receive the calculation results returned by each computing power module and summarize them to obtain the final calculation results.

[0018] Optionally, the method for communication between the CPU and the computing power module further includes:

[0019] receiving a second interrupt signal sent to the main CPU by any computing power module, and disabling an advanced error reporting function of the main CPU according to the second interrupt signal; the second interrupt signal is used to notify the main CPU to disconnect the communication link with the computing power module;

[0020] Stop sending the target computing task and the corresponding target data to the computing power module, and stop receiving the computing results returned by the computing power module;

[0021] Release the memory allocated to the network port corresponding to the computing power module, and deregister and delete the network port.

[0022] Optionally, the main CPU is connected to a micro control unit; the method further comprises:

[0023] Executing a power-on operation of the main CPU according to a second power-on signal sent by the micro control unit;

[0024] After the main CPU is turned on, receiving the GPIO pin control signal sent by the micro control unit;

[0025] According to the GPIO pin control signal, a hardware reset operation of the link is performed;

[0026] After performing the hardware reset operation, sending request information to all computing power modules in the link; the request information is used to identify each computing power module;

[0027] The first target driver is loaded in the main CPU, a corresponding network port is allocated to each computing power module, and a corresponding memory is allocated to each network port; the first target driver is used to establish a communication link between the main CPU and each computing power module;

[0028] Send the target computing tasks and corresponding target data to the corresponding computing power modules through each network port;

[0029] Receive the calculation results returned by each computing power module and summarize them to obtain the final calculation results.

[0030] Optionally, before the first target driver is loaded in the main CPU, the method further includes:

[0031] Pre-setting the memory capacity of the network port allocated to each computing module according to the number of computing modules in the link;

[0032] When the first target driver is loaded, corresponding memory is allocated to the network port corresponding to each computing power module according to the preset memory capacity.

[0033] According to a second aspect of an embodiment of the present application, a method for communication between a CPU and a computing power module is provided, which is applied to a computing power module in an edge server; the computing power module is connected to a main CPU and a micro control unit respectively; a first target driver is loaded in the main CPU, and the computing power module is set to an endpoint mode; the method comprises:

[0034] In the case of receiving the first interrupt signal sent by the main CPU, disconnecting the communication link between the main CPU and the computing power module through the second target driver, specifically including: generating a device node in the file system of the computing power module through the second target driver, the device node is used to store the current state of the main CPU; disabling the corresponding network port; the first interrupt signal is used to notify each computing power module to disconnect the communication link with the main CPU;

[0035] Continue to execute the target computing task currently running in the computing power module;

[0036] When the request information sent by the main CPU is received again, the network port is re-enabled.

[0037] Optionally, the method for communication between the CPU and the computing power module further includes:

[0038] Before the computing power module performs a restart operation, a second interrupt signal is generated and sent to the main CPU; the second interrupt signal is used to notify the main CPU to disconnect the communication link with the computing power module;

[0039] Execute a restart operation of the computing power module;

[0040] After executing the restart operation, triggering a software reset operation through the second target driver of the computing power module;

[0041] Receive the request information sent by the main CPU, and re-establish the communication link between the computing power module and the main CPU; the request information is used to identify the computing power module.

[0042] Optionally, the method for communication between the CPU and the computing power module further includes:

[0043] Execute a power-on operation of the computing module according to a first power-on signal sent by the microcontroller unit;

[0044] When the computing power module is turned on, loading a second target driver to set the computing power module to an endpoint mode;

[0045] Generate an interrupt through the second target driver to trigger a software reset operation;

[0046] After executing the software reset operation, sending a power-on completion signal to the micro control unit;

[0047] Receiving request information sent by the main CPU; the request information is used to identify the computing power module;

[0048] Establishing a communication link between the computing module and the main CPU according to the network port allocated by the main CPU;

[0049] The target computing task and the corresponding target data sent by the main CPU are received through the network port, the computing is performed and the computing result is returned to the main CPU.

[0050] According to a third aspect of an embodiment of the present application, a method for communication between a CPU and a computing power module is provided, which is applied to a micro control unit in an edge server; the micro control unit is respectively connected to a main CPU and at least one computing power module; the method comprises:

[0051] Sending a first power-on signal to the at least one computing power module, controlling each computing power module to perform a power-on operation, and detecting whether all computing power modules have completed power-on;

[0052] When receiving the startup completion signals returned by all computing power modules, it is determined that the startup of all computing power modules is completed;

[0053] When all computing modules have completed startup, a second startup signal is sent to the main CPU to control the main CPU to perform a startup operation;

[0054] After the main CPU is powered on, the main CPU is controlled by the GPIO pin to perform a hardware reset operation of the link.

[0055] Optionally, the method for communication between the CPU and the computing power module further includes:

[0056] When it is detected that the restart operation of the main CPU is completed, the main CPU is controlled through the GPIO pin to perform the hardware reset operation of the link again.

[0057] According to a fourth aspect of the embodiments of the present application, a computing system is provided, which is deployed in an edge server. The system includes: a main CPU, a micro control unit, and at least one computing module; the main CPU is used to execute the steps in the method for communication between the CPU and the computing module as described in the first aspect of the embodiments of the present application; the computing module is used to execute the steps in the method for communication between the CPU and the computing module as described in the second aspect of the embodiments of the present application; the micro control unit is used to execute the steps in the method for communication between the CPU and the computing module as described in the third aspect of the embodiments of the present application;

[0058] The micro control unit is connected to the main CPU, and is used to control the main CPU to perform a power-on operation, and, through a GPIO pin control signal, controls the main CPU to perform a hardware reset operation of a link after powering on; the micro control unit is also connected to the at least one computing power module, and is used to control the at least one computing power module to perform a power-on operation, and detect whether the computing power module has completed powering on;

[0059] The main CPU is connected to the at least one computing module, and is used to distribute the target computing task and the corresponding target data to the at least one computing module; receive the computing results returned by each computing module, and perform aggregation processing to obtain the final computing result;

[0060] Each computing power module is used to receive the target computing task and corresponding target data sent by the main CPU, perform calculations and return calculation results to the main CPU.

[0061] Optionally, the at least one computing power module is integrated into at least one carrier board of the PCIE interface in a group of two, and is connected to the hard disk backplane in the edge server through the at least one carrier board.

[0062] By adopting the method of communication between the CPU and the computing power module provided in the present application, an operation of unloading the driver is added in the first target driver on the main CPU side, and an operation of disabling the network port is added in the second target driver on the computing power module side, so as to realize modular design. Before the main CPU executes the restart operation, it notifies the computing power module to disconnect the communication link with the main CPU through an interruption, and stops data transmission with the computing power module before restarting, unloads the network port of the computing power module, thereby disconnecting the communication link with each computing power module, so that the restart operation of the main CPU will not affect the normal operation of the computing power module. By adopting this method, each device in the edge server can disconnect the communication link with other devices when restarting or shutting down, and execute the restart operation without affecting the normal operation of other devices, avoiding problems such as data loss and abnormal equipment downtime, and improving the stability of the data communication link. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0064] Figure 1 This is one of the flow charts of the method for communication between the CPU and the computing power module proposed in one embodiment of the present application;

[0065] Figure 2 This is the second flow chart of the method for communication between the CPU and the computing power module proposed in one embodiment of the present application;

[0066] Figure 3 This is the third flow chart of the method for communication between the CPU and the computing power module proposed in one embodiment of the present application;

[0067] Figure 4 is a schematic diagram of a computing system proposed in an embodiment of the present application;

[0068] Figure 5 This is a flowchart of the main CPU restart in one embodiment of the present application;

[0069] Figure 6 This is a flowchart of restarting a computing module in one embodiment of the present application;

[0070] Figure 7 It is a schematic diagram of a process of a microcontroller unit controlling a device to start up in one embodiment of the present application. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0072] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0073] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

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

[0075] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.

[0076] In this application, interrupt and unload driver operations are added to the drivers of the main CPU and computing power module, thereby realizing the modular design of the edge server computing system and the device hot-swap function, so that the edge server can easily expand the computing power module and adapt to complex and diverse application environments and growing computing power requirements.

[0077] This method does not require additional underlying hardware communication links. Through software-level driver optimization, during the restart of the main CPU or computing power module, other devices are notified to disconnect the communication link in the form of an interrupt, thereby avoiding the restart operation from affecting the normal operation of other devices in the link, improving the stability of communication between the main CPU and the computing power module, and thus ensuring stable business operation.

[0078] The method provided in this application can be adapted to different Linux-based operating systems, such as Ubuntu, CentOS, Red Hat, etc. The main CPU of the edge server in this application can be different types of CPUs. In the following embodiments, an X86 main CPU is used as an example for illustration.

[0079] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0080] Figure 1 This is one of the flow charts of the method for communication between a CPU and a computing module proposed in one embodiment of the present application. The method is applied to a main CPU in an edge server; the main CPU is connected to at least one computing module; a first target driver is loaded in the main CPU, and each computing module is set to endpoint mode. Figure 1 As shown, the method includes:

[0081] S11: before the main CPU performs a restart operation, a first interrupt signal is generated and sent to each computing power module; the first interrupt signal is used to notify each computing power module to disconnect the communication link with the main CPU;

[0082] S12: Stop sending target computing tasks and corresponding target data to each computing power module, and stop receiving computing results returned by each computing power module;

[0083] S13: Uninstalling the first target driver of the main CPU and disconnecting the links between each computing module and the main CPU, specifically including: releasing the memory allocated to each network port; deregistering and deleting all network ports;

[0084] S14: After uninstalling the first target driver, the main CPU performs a restart operation.

[0085] In the current communication scheme, the restart operation of the main CPU will cause the probabilistic restart of the computing module, resulting in data loss and equipment downtime. In this embodiment, the main CPU end establishes a communication link with multiple computing modules through the first target driver, and the computing module needs to be set to the endpoint (EndPoint, EP) mode to be recognized by the main CPU.

[0086] In one embodiment, the main CPU is connected to each computing power module through a PCIE bus, and the computing power module sets itself to EP mode through a second target driver, so that it is recognized as a PCIE device by the main CPU. After establishing a communication link, the main CPU distributes target computing tasks and corresponding target data to each computing power module, and each computing power module runs in parallel to perform distributed computing tasks. The main CPU receives the computer results returned by each computing power module, and performs summary processing to obtain the final calculation result. In this embodiment, the operation of unloading the driver is added to the driver of the main X86 CPU end. When the main CPU needs to restart or shut down, it first sends a first interrupt signal to the computing power module to notify each computing power module to disconnect the communication link with the main CPU, and then unloads the first target driver on the main CPU end. When unloading the first target driver, stop sending data to the computing power module, and stop receiving the calculation results returned by the computing power module, release the memory applied for the network port of the computing power module when establishing the communication link, execute the unregister_netdev function to cancel the network port of each computing power module, and then execute the netif_napi_del function to delete all network ports, and successfully unload the first target driver. At this point, the communication between the main CPU and the computing power module has been disconnected, and the restart or shutdown operation of the main CPU will no longer affect the operation of the computing power module.

[0087] In this embodiment, by adding an operation of unloading the driver in the first target driver on the main CPU end, each computing power module is notified in the form of an interrupt before the main CPU is restarted, the data transmission between this end and each computing power module is stopped, and the network port for communicating with each computing power module is deleted, so as to disconnect the communication with each computing power module before the main CPU is restarted, thereby ensuring that the restart or shutdown operation of the main CPU does not affect the normal operation of each computing power module.

[0088] Based on the same inventive concept, an embodiment of the present application provides a method for communication between a CPU and a computing power module. Figure 2 , Figure 2 This is the second flow chart of the method for communication between the CPU and the computing power module proposed in one embodiment of the present application. The method is applied to the computing power module in the edge server; the computing power module is connected to the main CPU and the micro control unit respectively; the first target driver is loaded in the main CPU, and the computing power module is set to the endpoint mode. Figure 2 As shown, the method includes:

[0089] S21: upon receiving the first interrupt signal sent by the main CPU, disconnecting the communication link between the main CPU and the computing module through the second target driver, specifically comprising: generating a device node in the file system of the computing module through the second target driver, the device node being used to store the current state of the main CPU; disabling the corresponding network port; the first interrupt signal being used to notify each computing module to disconnect the communication link with the main CPU;

[0090] S22: Continue to execute the target computing task currently being executed in the computing power module;

[0091] S23: When receiving the request information sent by the main CPU again, re-enabling the network port.

[0092] The computing power modules are chips that combine CPU and GPU, and are GPUs with operating systems, which are connected to the main CPU as computing modules. In this embodiment, the system commonly used by the computing power module is the Ubuntu system. The computing power module must be set to EP mode to be correctly recognized as a PCIe device by the main CPU. The second target driver is automatically loaded when each computing power module is started, and a communication link is established with the first target driver on the main CPU side through the second target driver. In the case where the computing power module is a PCIE device, the target system can be a PCIE network communication driver with an added driver unloading operation.

[0093] When the computing power module receives the first interrupt sent by the main CPU, the computing power module generates a device node in the file system through the second target driver to store the current status of the main CPU. In the computing power module, the device node is read through a shell script. Then, the computing power module executes the ifconfig eth1 down command to disable the network port that communicates with the main CPU, thereby disconnecting the computing data transmission between the main CPU and the main CPU. During the restart or shutdown of the main CPU, the computing power module runs the computing tasks on this device normally and stores the calculation results. After the main CPU restarts, if a request message is sent to the computing power module again, the computing power module executes the ifconfig eth1 up command to re-enable the network port for data transmission with the main CPU.

[0094] In this embodiment, by adding a function of disabling the network port in the second target driver of the computing power module, data communication with the main CPU is temporarily disconnected, so that computing tasks can be run normally when the main CPU is restarted or shut down.

[0095] As an implementation manner of the present application, after executing the restart operation of the main CPU, it also includes:

[0096] Receive GPIO pin control signals sent by the microcontroller unit;

[0097] According to the GPIO pin control signal, a hardware reset operation of the link is performed;

[0098] After performing the hardware reset operation, sending request information to all devices in the link; the request information is used to identify each computing power module;

[0099] Loading the first target driver and allocating corresponding memory to the network port of each computing power module;

[0100] For each computing power module, after the computing power module re-enables the corresponding network port, the main CPU sends the target computing task and the corresponding target data to the corresponding computing power module through the network port;

[0101] Receive the calculation results returned by each computing power module and summarize them to obtain the final calculation results.

[0102] As an implementation of the present application, the method for communication between the CPU and the computing power module further includes:

[0103] When it is detected that the restart operation of the main CPU is completed, the main CPU is controlled through the GPIO pin to perform the hardware reset operation of the link again.

[0104] In one embodiment, the microcontroller unit (MCU) controls the main CPU to perform a hardware reset operation of the link after restarting. In the current communication scheme, there is a problem of mutual influence between the main CPU and the computing power module, so the restart operation of the main CPU or the computing power module will affect other devices in the link, resulting in abnormal data interruption and device abnormality. Therefore, after the main CPU restarts, it may be possible that the computing power module in the link cannot be detected.

[0105] In this embodiment, after the main CPU is restarted, the microcontroller sends a GPIO pin control signal to the main CPU to control the main CPU to perform a hardware reset operation of the link, thereby ensuring that the main CPU can normally identify the computing power module in the link. The microcontroller is connected to the main CPU via the PCIE bus, and controls the main CPU to perform a hardware reset operation of the PCIE link after restarting through the CPIO method, so that the main CPU can identify the computing power module in the link. After performing the hardware reset operation, the main CPU sends a request message to each computing power module in the link, and then establishes a communication link with each computing power module. Then, the first target driver is loaded in the main CPU, corresponding network ports are allocated to each computing power module, and memory is allocated to the network port, and the network port is registered. When the computing power module re-enables the network port, data transmission between the main CPU and the computing power module is restored.

[0106] Figure 5 This is a flowchart of the main CPU restart in one embodiment of the present application. Figure 5 As shown, before restarting, the main CPU sends a first interrupt signal to all computing power modules. After receiving the signal, each computing power module stops sending or receiving data to the main CPU, and generates a device node through its own second target driver to store relevant status data of data transmission with the main CPU, and then disables the network port of this end to run the computing tasks on the device normally. At the same time, the main CPU stops sending or receiving data to the computing power module, uninstalls the first target driver of this end, including releasing the memory of the network port of the computing power module, deregistering and deleting the network port, and then performs a restart operation. After restarting, the MCU controls the main CPU end to perform a hardware reset operation of the link through GPIO, and then sends a request message to re-establish a communication link with each computing power module.

[0107] In this embodiment, a GPIO pin control signal is sent to the main CPU through the microcontroller unit, and a hardware reset operation of the link is performed after the main CPU is restarted, thereby avoiding the situation where the main CPU cannot normally identify the computing power module in the link after restarting, thereby improving the stability of the communication link.

[0108] Based on the same inventive concept, an embodiment of the present application provides a method for communication between a CPU and a computing power module. Figure 3 , Figure 3 This is the third flow chart of the method for communication between the CPU and the computing power module proposed in one embodiment of the present application. The method is applied to a micro control unit in an edge server; the micro control unit is respectively connected to the main CPU and at least one computing power module. Figure 3 As shown, the method includes:

[0109] S31: Sending a first power-on signal to the at least one computing power module, controlling each computing power module to perform a power-on operation, and detecting whether all computing power modules have completed power-on;

[0110] S32: upon receiving the startup completion signals returned by all the computing power modules, determining that the startup of all the computing power modules is completed;

[0111] S33: When all computing modules have been powered on, a second power-on signal is sent to the main CPU to control the main CPU to perform a power-on operation;

[0112] S34: After the main CPU is powered on, the main CPU is controlled through the GPIO pin to perform a hardware reset operation of the link.

[0113] In one embodiment, the microcontroller unit is connected to the main CPU via a PCIE bus and connected to each computing module via an I2C bus. The microcontroller unit controls the startup of the main CPU via the PCIE bus and controls the startup of the computing module via the I2C bus. Figure 7 It is a schematic diagram of the process of the microcontroller controlling the device to start up in one embodiment of the present application. In this embodiment, the microcontroller first controls the startup of each computing power module through the I2C bus. After each computing power module is started up, a startup completion signal is returned to the microcontroller through the I2C bus. After the microcontroller detects that all computing power modules have been started up, it controls the main CPU to power on through the PCIE bus.

[0114] In this embodiment, the startup of the computing power module is controlled and detected through the I2C bus between the microcontroller unit and the computing power module, so that the microcontroller unit can accurately know whether the computing power module has been started up, thereby ensuring that the main CPU executes the startup after the computing power module is started up, avoiding the situation where the computing power module has not been started up after the main CPU is started up, resulting in failure to detect some computing power modules that have not been started up.

[0115] As an implementation of the present application, the method for communication between the CPU and the computing power module further includes:

[0116] Execute a power-on operation of the computing module according to a first power-on signal sent by the microcontroller unit;

[0117] When the computing power module is turned on, loading a second target driver to set the computing power module to an endpoint mode;

[0118] Generate an interrupt through the second target driver to trigger a software reset operation;

[0119] After executing the software reset operation, sending a power-on completion signal to the micro control unit;

[0120] Receiving request information sent by the main CPU; the request information is used to identify the computing power module;

[0121] Establishing a communication link between the computing module and the main CPU according to the network port allocated by the main CPU;

[0122] The target computing task and the corresponding target data sent by the main CPU are received through the network port, the computing is performed and the computing result is returned to the main CPU.

[0123] In this embodiment, the microcontroller controls the computing power module to power on by sending a first power-on signal. When the computing power module is powered on, the second target driver is loaded and the module is set to EP (endpoint) mode so that it can be identified as a PCIE device. In order to ensure that the main CPU can correctly identify the computing power module in the link, when each computing power module is powered on, an interrupt is generated through the second target driver to trigger a software reset operation of the PCIE device, that is, the computing power module resets its own reset pin and pulls the reset pin signal low. By performing a software reset operation on all computing power modules, it is ensured that the reset pins of all computing power modules are in a low level state, thereby ensuring that all computing power modules can be identified by the main CPU. After the main CPU is powered on, the microcontroller controls the main CPU to perform a hardware reset operation of the link by controlling the GPIO, thereby ensuring that the main CPU can correctly identify the device in the link. After two reset operations, the main CPU sends a BME request message to the computing power module through the BIOS, thereby identifying the computing power module as a PCIE device and establishing a communication link.

[0124] After establishing the communication link, the main CPU sends the target computing tasks and corresponding target data to each computing power module through the PCIE link. Each computing power module performs distributed computing and sends the calculation results to the main CPU. The main CPU summarizes all the calculation results to obtain the final calculation results.

[0125] In this embodiment, by performing two reset operations on the computing power module and the main CPU, it is ensured that the main CPU can correctly identify all computing power modules in the link after startup, avoiding the situation where the computing power module cannot be detected probabilistically.

[0126] As an implementation mode of the present application, the main CPU is connected to a micro control unit; the method further includes:

[0127] Executing a power-on operation of the main CPU according to a second power-on signal sent by the micro control unit;

[0128] After the main CPU is turned on, receiving the GPIO pin control signal sent by the micro control unit;

[0129] According to the GPIO pin control signal, a hardware reset operation of the link is performed;

[0130] After performing the hardware reset operation, sending request information to all computing power modules in the link; the request information is used to identify each computing power module;

[0131] The first target driver is loaded in the main CPU, a corresponding network port is allocated to each computing power module, and a corresponding memory is allocated to each network port; the first target driver is used to establish a communication link between the main CPU and each computing power module;

[0132] Send the target computing tasks and corresponding target data to the corresponding computing power modules through each network port;

[0133] Receive the calculation results returned by each computing power module and summarize them to obtain the final calculation results.

[0134] In the above embodiment, after detecting that all computing power modules have been powered on, the microcontroller sends a second power-on signal to control the main CPU to power on. After the main CPU is powered on, it is necessary to perform a hardware reset operation of the link, and then scan the PCIE devices in the link through the BIOS. Use the lspci command to view all computing power modules, send BME request information to the computing power module, execute the insmod command to load the first target driver, and thus establish a communication link with the computing power module.

[0135] Specifically, when loading the first target driver, first execute the alloc_etherdev function to allocate a device number for the computing power module, and at the same time execute the eth_hw_addr_random function to allocate a MAC address. In the first target driver, memory is allocated for the virtual network port through DMA (Direct Memory Access). Then, the device number is added to the device list by executing the netif_napi_add function. After adding the device number, the virtual network port is registered by executing the register_netdev function to complete the establishment of the communication link between the main CPU and the computing power module.

[0136] As an implementation manner of the present application, before the first target driver is loaded in the main CPU, the method further includes:

[0137] Pre-setting the memory capacity of the network port allocated to each computing module according to the number of computing modules in the link;

[0138] When the first target driver is loaded, corresponding memory is allocated to the network port corresponding to each computing power module according to the preset memory capacity.

[0139] In this embodiment, the size of swiotlb (Software I / O Translation Lookaside Buffer) memory is set in advance according to the number of computing power modules deployed in the edge server. SWIOTLB is a software-implemented IOMMU (Input / Output Memory Management Unit) technology. SWIOTLB maintains a conversion table in the memory to record the mapping relationship between physical memory addresses and virtual network ports. In this embodiment, before the main CPU loads the first target driver, it determines the swiotlb memory size to be set in advance according to the number of computing power modules deployed in the edge server. In order to ensure the data communication quality of the computing power module, the memory size allocated to each computing power module is not less than the target threshold, and the target threshold is the minimum memory size that can ensure the communication quality of the computing power module. In this embodiment, the target threshold is set to 32M. For example, if 4 computing power modules are deployed, the swiotlb memory is set to 128MB.

[0140] In this embodiment, each time the main CPU is turned on, the number of current computing power modules in the edge server is obtained, and based on the number of computing power modules, the swiotlb memory size that needs to be set is calculated. After loading the first target driver, the corresponding memory size is evenly allocated to the virtual network port of each computing power module through DMA, thereby ensuring the data communication quality of each computing power module.

[0141] In one embodiment, the maximum number of computing power modules that the edge server can support is obtained in advance, and a fixed maximum swiotlb memory size is set according to the maximum number. On this basis, when the CPU is turned on to load the first target driver, a memory of the target threshold size is allocated to the virtual network port of each current computing power module. By setting a fixed maximum swiotlb memory size and allocating a memory of the target threshold size to each computing power module, it is possible to ensure that the edge server carries the most computing power modules and to ensure the communication quality of each computing power module. That is, when a computing power module is added during the operation of the edge server, the communication quality of the newly added computing power module can be ensured, and at the same time, the memory of the virtual network port of all computing power modules does not need to be reallocated. For example, when the edge server can carry up to 8 computing power modules, the swiotlb memory is set to 256MB, and when there are only 4 computing power modules in the current link, 32MB of memory is allocated to each virtual network port, and when a new computing power module is added, 32MB of memory is allocated to the virtual network port of the newly added computing power module.

[0142] In this embodiment, the swiotlb memory size is set to the maximum value according to the maximum number of computing power modules that can be deployed by the edge server, and the memory of the target threshold size is allocated to the virtual network port, thereby ensuring the communication quality of all computing power modules while the edge server flexibly increases the computing power modules as needed.

[0143] As an implementation of the present application, the method for communication between the CPU and the computing power module further includes:

[0144] receiving a second interrupt signal sent to the main CPU by any computing power module, and disabling an advanced error reporting function of the main CPU according to the second interrupt signal; the second interrupt signal is used to notify the main CPU to disconnect the communication link with the computing power module;

[0145] Stop sending the target computing task and the corresponding target data to the computing power module, and stop receiving the computing results returned by the computing power module;

[0146] Release the memory allocated to the network port corresponding to the computing power module, and deregister and delete the network port.

[0147] As an implementation of the present application, the method for communication between the CPU and the computing power module further includes:

[0148] Before the computing power module performs a restart operation, a second interrupt signal is generated and sent to the main CPU; the second interrupt signal is used to notify the main CPU to disconnect the communication link with the computing power module;

[0149] Execute a restart operation of the computing power module;

[0150] After executing the restart operation, triggering a software reset operation through the second target driver of the computing power module;

[0151] Receive the request information sent by the main CPU, and re-establish the communication link between the computing power module and the main CPU; the request information is used to identify the computing power module.

[0152] Figure 6 This is a flowchart of restarting the computing module in one embodiment of the present application. Figure 6As shown, in one embodiment, when any computing power module restarts, the computing power module generates a second interrupt signal and sends it to the main CPU end. The main CPU end turns off the AER (Advanced Error Reporting) function to avoid identifying the restart operation of the computing power module as the action of hot-plugging the NVMe hard disk, causing the main CPU to crash. Since the computing power module is connected to the main CPU through the hard disk backplane of the NVMe protocol in the edge server, if the main CPU does not turn off the AER function, the restart of the computing power module will be identified as the operation of unplugging the NVMe hard disk with power, resulting in an AER error and an abnormal crash of the main CPU. After receiving the second interrupt signal, the main CPU end stops sending or receiving data sent by the computing power module to the computing power module, and then releases the memory of the network port (i.e., virtual network port) corresponding to the computing power module, and then cancels and deletes the network port. During the restart of the computing power module, the main CPU still communicates normally with other computing power modules.

[0153] At the same time, after sending the second interrupt signal, the computing power module stops sending or receiving data from the main CPU, and then performs a restart operation. After restarting, the computing power module loads the second target driver, sets itself to EP mode, and generates an interrupt through the second target driver to trigger its own PCIE reset (device software reset operation), thereby ensuring that the computing power module can be recognized as a PCIE device by the main CPU. Afterwards, the main CPU sends a BME request message to the computing power module, reassigns a network port to the computing power module, and establishes a communication link.

[0154] In this embodiment, by adding an interrupt operation in the second target driver, before the computing power module is restarted, the main CPU end is notified through the second interrupt signal, so that the main CPU end can turn off the AER function in time and disconnect the communication link with the computing power module, ensuring that the main CPU end can operate normally and stably during the restart of the computing power module, avoiding abnormal downtime of the main CPU caused by the restart of the computing power module.

[0155] Based on the same inventive concept, an embodiment of the present application provides a computing system. Figure 4 , Figure 4 Schematic diagram of a computing system proposed in one embodiment of the present application. Figure 4 As shown, the system includes:

[0156] A main CPU, a micro control unit and at least one computing module, used to execute the steps of the method described in the above embodiment;

[0157] The micro control unit is connected to the main CPU, and is used to control the main CPU to perform a power-on operation, and, through a GPIO pin control signal, controls the main CPU to perform a hardware reset operation of a link after powering on; the micro control unit is also connected to the at least one computing power module, and is used to control the at least one computing power module to perform a power-on operation, and detect whether the computing power module has completed powering on;

[0158] The main CPU is connected to the at least one computing module, and is used to distribute the target computing task and the corresponding target data to the at least one computing module; receive the computing results returned by each computing module, and perform aggregation processing to obtain the final computing result;

[0159] Each computing power module is used to receive the target computing task and corresponding target data sent by the main CPU, perform calculations and return calculation results to the main CPU.

[0160] As an implementation mode of the present application, the at least one computing power module is integrated into at least one carrier board of the PCIE interface in a group of two, and is connected to the hard disk backplane in the edge server through the at least one carrier board.

[0161] In this embodiment, the computing power module can be an NX module or an Orin module (NVIDIA computing power module). The computing power modules are divided into groups of two, each computing power module is integrated into a carrier board with a PCIE interface, and then the carrier board is connected to the hard disk backplane of the NVMe protocol in the edge server, thereby forming an all-in-one distributed computing system.

[0162] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the relevant method, and will not be elaborated here.

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

[0164] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily required by the present application.

[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0166] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0169] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the present application is interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0170] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0171] The above is a detailed introduction to the method and computing system for communication between the CPU and the computing power module provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for communication between a CPU and a computing power module, characterized in that: A main CPU applied to an edge server; the main CPU is connected to at least one computing module; a first target driver is loaded in the main CPU, and each computing module is set to an endpoint mode; the method includes: Before the main CPU performs a restart operation, a first interrupt signal is generated and sent to each computing power module; the first interrupt signal is used to notify each computing power module to disconnect the communication link with the main CPU; Stop sending target computing tasks and corresponding target data to each computing power module, and stop receiving computing results returned by each computing power module; Uninstalling the first target driver of the main CPU and disconnecting the links between each computing module and the main CPU, specifically including: releasing the memory allocated to each network port; deregistering and deleting all network ports; After uninstalling the first target driver, the main CPU performs a restart operation.

2. The method for communication between a CPU and a computing power module according to claim 1, characterized in that: After executing the restart operation of the main CPU, the method further includes: Receive GPIO pin control signals sent by the microcontroller unit; According to the GPIO pin control signal, a hardware reset operation of the link is performed; After performing the hardware reset operation, sending request information to all devices in the link; the request information is used to identify each computing power module; Loading the first target driver and allocating corresponding memory to the network port of each computing power module; For each computing power module, after the computing power module re-enables the corresponding network port, the main CPU sends the target computing task and the corresponding target data to the corresponding computing power module through the network port; Receive the calculation results returned by each computing power module and summarize them to obtain the final calculation results.

3. The method for communication between a CPU and a computing power module according to claim 1, characterized in that: Also includes: receiving a second interrupt signal sent by any computing power module to the main CPU, and disabling an advanced error reporting function of the main CPU according to the second interrupt signal; The second interrupt signal is used to notify the main CPU to disconnect the communication link with the computing power module; Stop sending the target computing task and the corresponding target data to the computing power module, and stop receiving the computing results returned by the computing power module; Release the memory allocated to the network port corresponding to the computing power module, and deregister and delete the network port.

4. The method for communication between a CPU and a computing power module according to claim 1, characterized in that: The main CPU is connected to the micro control unit; the method also includes: Executing a power-on operation of the main CPU according to a second power-on signal sent by the micro control unit; After the main CPU is turned on, receiving the GPIO pin control signal sent by the micro control unit; According to the GPIO pin control signal, a hardware reset operation of the link is performed; After performing the hardware reset operation, sending request information to all computing power modules in the link; the request information is used to identify each computing power module; The first target driver is loaded in the main CPU, a corresponding network port is allocated to each computing power module, and a corresponding memory is allocated to each network port; the first target driver is used to establish a communication link between the main CPU and each computing power module; Send the target computing tasks and corresponding target data to the corresponding computing power modules through each network port; Receive the calculation results returned by each computing power module and summarize them to obtain the final calculation results.

5. The method for communication between a CPU and a computing power module according to claim 4, characterized in that: Before the first target driver is loaded in the main CPU, the method further includes: Pre-setting the memory capacity of the network port allocated to each computing module according to the number of computing modules in the link; When the first target driver is loaded, corresponding memory is allocated to the network port corresponding to each computing power module according to the preset memory capacity.

6. A method for communication between a CPU and a computing power module, characterized in that: A computing module applied to an edge server; the computing module is connected to a main CPU and a micro control unit respectively; a first target driver is loaded in the main CPU, and the computing module is set to an endpoint mode; the method comprises: In the case of receiving the first interrupt signal sent by the main CPU, disconnecting the communication link between the main CPU and the computing power module through the second target driver, specifically including: generating a device node in the file system of the computing power module through the second target driver, the device node is used to store the current state of the main CPU; disabling the corresponding network port; the first interrupt signal is used to notify each computing power module to disconnect the communication link with the main CPU; Continue to execute the target computing task currently running in the computing power module; When the request information sent by the main CPU is received again, the network port is re-enabled.

7. The method for communication between a CPU and a computing power module according to claim 6, characterized in that: Also includes: Before the computing power module performs a restart operation, a second interrupt signal is generated and sent to the main CPU; The second interrupt signal is used to notify the main CPU to disconnect the communication link with the computing power module; Execute a restart operation of the computing power module; After executing the restart operation, triggering a software reset operation through the second target driver of the computing power module; Receive the request information sent by the main CPU, and re-establish the communication link between the computing power module and the main CPU; The request information is used to identify the computing power module.

8. The method for communication between a CPU and a computing power module according to claim 6, characterized in that: Also includes: Execute a power-on operation of the computing module according to a first power-on signal sent by the microcontroller unit; When the computing power module is turned on, loading a second target driver to set the computing power module to an endpoint mode; Generate an interrupt through the second target driver to trigger a software reset operation; After executing the software reset operation, sending a power-on completion signal to the micro control unit; Receiving request information sent by the main CPU; the request information is used to identify the computing power module; Establishing a communication link between the computing module and the main CPU according to the network port allocated by the main CPU; The target computing task and the corresponding target data sent by the main CPU are received through the network port, the computing is performed and the computing result is returned to the main CPU.

9. A method for communication between a CPU and a computing power module, characterized in that: A micro control unit applied to an edge server; the micro control unit is respectively connected to a main CPU and at least one computing power module; the method comprises: Sending a first power-on signal to the at least one computing power module, controlling each computing power module to perform a power-on operation, and detecting whether all computing power modules have completed power-on; When receiving the startup completion signals returned by all computing power modules, it is determined that the startup of all computing power modules is completed; When all computing modules have completed startup, a second startup signal is sent to the main CPU to control the main CPU to perform a startup operation; After the main CPU is powered on, the main CPU is controlled by the GPIO pin to perform a hardware reset operation of the link.

10. The method for communication between a CPU and a computing power module according to claim 9, characterized in that: Also includes: When it is detected that the restart operation of the main CPU is completed, the main CPU is controlled through the GPIO pin to perform the hardware reset operation of the link again.

11. A computing system, characterized in that: Deployed in an edge server, the system comprises: a main CPU, a micro control unit and at least one computing power module; the main CPU is used to execute the steps in the method according to any one of claims 1 to 5; the computing power module is used to execute the steps in the method according to any one of claims 6 to 8; the micro control unit is used to execute the steps in the method according to claim 9 or 10; The micro control unit is connected to the main CPU, and is used to control the main CPU to perform a power-on operation, and, through a GPIO pin control signal, controls the main CPU to perform a hardware reset operation of a link after powering on; the micro control unit is also connected to the at least one computing power module, and is used to control the at least one computing power module to perform a power-on operation, and detect whether the computing power module has completed powering on; The main CPU is connected to the at least one computing module, and is used to distribute the target computing task and the corresponding target data to the at least one computing module; receive the computing results returned by each computing module, and perform aggregation processing to obtain the final computing result; Each computing power module is used to receive the target computing task and corresponding target data sent by the main CPU, perform calculations and return calculation results to the main CPU.

12. The computing system according to claim 11, characterized in that: The at least one computing power module is integrated into at least one carrier board of the PCIE interface in a group of two, and is connected to the hard disk backplane in the edge server through the at least one carrier board.