Memory management system and method, program product, and storage medium

By installing smart network interface cards (NICs) that support high-speed interconnect protocols and remote direct memory access protocols in both the host and slave devices, the problem of high-speed interconnect protocols being limited by long-distance data transmission is solved, enabling memory data transmission across racks and data centers.

WO2026144398A1PCT designated stage Publication Date: 2026-07-09INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2025-10-15
Publication Date
2026-07-09

Smart Images

  • Figure CN2025127893_09072026_PF_FP_ABST
    Figure CN2025127893_09072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of memory management, and provides a memory management system and method, a program product, and a storage medium. The system comprises a host and a slave. The host comprises a host processor and a host smart network card. The host processor and the host smart network card communicate on the basis of a high-speed interconnect protocol. The slave comprises a slave memory pool and a slave smart network card. The slave memory pool and the slave smart network card communicate on the basis of the high-speed interconnect protocol. The host smart network card and the slave smart network card communicate on the basis of a remote direct memory access protocol. A smart network card simultaneously supporting the high-speed interconnect protocol and the remote direct memory access protocol can be provided in both the host and the slave. The smart network card can deliver transaction layer packets of the high-speed interconnect protocol between the host and the slave on the basis of the remote direct memory access protocol and a network, thereby preventing the defect that the high-speed interconnect protocol is constrained by long-distance data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

A memory management system, method, program product, and storage medium

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 202411997339.3, filed on December 30, 2024, entitled “A memory management system, method, program product and storage medium”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of memory management, and in particular to a memory management system, method, program product and storage medium. Background Technology

[0004] With the rapid development of big data and artificial intelligence, the growth rate of processor cores far exceeds the number of main memory channels, leading to an ever-increasing demand for memory capacity and bandwidth in computing systems. High-speed interconnect protocols have emerged in this context, ensuring that multiple processors can share a memory pool, thereby improving the overall performance of the computing system. However, high-speed interconnect protocols are limited by long-distance data transmission, hindering their flexible application. Summary of the Invention

[0005] The purpose of this application is to provide a memory management system, method, program product, and storage medium that can transmit transaction layer packets of high-speed interconnect protocols between a host and a slave device based on remote direct memory access protocol and network communication, thereby avoiding the shortcomings of high-speed interconnect protocols that are limited by long-distance data transmission.

[0006] According to the first aspect, in order to solve the above-mentioned technical problems, this application provides a memory management system, including a host and a slave. The host includes a host processor and a host smart network card, and the host processor and the host smart network card communicate based on a high-speed interconnect protocol. The slave includes a slave memory pool and a slave smart network card, and the slave memory pool and the slave smart network card communicate based on a high-speed interconnect protocol. The host smart network card and the slave smart network card communicate based on a remote direct memory access protocol.

[0007] The host smart network interface card (NIC) is configured to perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and then send it to the slave smart NIC; and to perform protocol conversion on the second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and then send it to the host processor; wherein, the first transaction layer packet contains a memory access request, and the second transaction layer packet contains memory data;

[0008] The slave smart network interface card is configured to perform protocol conversion on the first network packet to obtain a first transaction layer packet and send it to the slave memory pool; and to perform protocol conversion on the second transaction layer packet sent from the slave memory pool to obtain a second network packet and send it to the master smart network interface card.

[0009] In some embodiments, the host also includes a host memory pool, which is disposed between the host processor and the host smart network interface card;

[0010] The host processor is configured to send a first transaction layer packet to the host memory pool and receive a second transaction layer packet returned by the host memory pool.

[0011] The host memory pool is configured such that if it is determined that the memory data requested by the first transaction layer packet is stored in the host memory pool, a second transaction layer packet is generated using the memory data and sent to the host processor; if it is determined that the memory data requested by the first transaction layer packet is not stored in the host memory pool, the first transaction layer packet is sent to the host smart network interface card (NIC), and the second transaction layer packet sent by the host smart NIC is sent to the host processor.

[0012] In some embodiments, the host processor is further configured to:

[0013] Determine whether the memory data to be accessed is stored in the host memory pool;

[0014] If so, the first transaction layer packet is sent to the host memory pool.

[0015] In some embodiments, both the host memory pool and the slave memory pool include:

[0016] The transaction layer module and the link layer module are connected. The transaction layer module is connected to the link layer module and the smart network card. The link layer module in the host memory pool is connected to the host processor.

[0017] The transaction layer module is configured to perform transaction layer processing and send the processed transaction layer packets to the smart network interface card or the link layer module.

[0018] The host memory pool's link layer module is configured to pass transaction layer packets between the host processor and the transaction layer module;

[0019] The link layer module of the slave memory pool is configured to send transaction layer packets sent by the transaction layer module to its own memory for processing; and return the processing results from its own memory to the transaction layer module.

[0020] In some embodiments, the host memory pool and the slave memory pool further include:

[0021] The clock module is located between the transaction layer module and the link layer module, and is configured to synchronize the clocks of the transaction layer module and the link layer module.

[0022] In some embodiments, both the host smart network interface card (NIC) and the slave smart network interface card (NIC) include:

[0023] The high-speed interconnect protocol processing module, protocol controller, encapsulation and offloading engine, and Ethernet physical layer module are connected. The high-speed interconnect protocol processing module is connected to the host processor or slave memory pool, the protocol controller is connected to the high-speed interconnect protocol processing module, the encapsulation and offloading engine is connected to the protocol controller, and the Ethernet physical layer module is connected to the encapsulation and offloading engine.

[0024] The high-speed interconnect protocol processing module is configured to receive or send transaction layer packets;

[0025] The protocol controller is configured to convert transaction layer packets from High Speed ​​Interconnect Protocol (HSP) format to Remote Direct Memory Access Protocol (RDIP) format to obtain intermediate data packets, and send the intermediate data packets to the encapsulation and offloading engine; and to convert the intermediate data packets from RIP format to HSP format to obtain transaction layer packets, and send the transaction layer packets to the HSP processing module.

[0026] The encapsulation and unloading engine is configured to encapsulate intermediate data packets into network packets and send the network packets to the Ethernet physical layer module; and decapsulate network packets into intermediate data packets and send the intermediate data packets to the protocol controller.

[0027] The Ethernet physical layer module is configured to receive or send network packets.

[0028] In some embodiments, it also includes:

[0029] The switching device is located between the host smart network interface card (NIC) and the slave smart NIC, and is configured to forward the first network packet to the slave smart NIC and the second network packet to the host smart NIC.

[0030] In some embodiments, the host processor is configured to add a preset host identifier and a preset slave identifier to the first transaction layer packet;

[0031] The host smart network card is also configured to add the corresponding host address and slave address to the first network packet according to the preset host identifier and preset slave identifier in the first transaction layer packet when the first transaction layer packet is converted into a protocol to obtain the first network packet;

[0032] The slave memory pool is configured to add a preset master identifier and a preset slave identifier to the second transaction layer packet;

[0033] The slave smart network card is also configured to add the corresponding host address and slave address to the second network packet according to the preset host identifier and preset slave identifier in the second transaction layer packet when the second transaction layer packet is converted into a protocol to obtain the second network packet.

[0034] In some embodiments, the host processor is further configured to:

[0035] Query the target slave device where the memory data to be accessed is located in the preset remote storage index, and obtain the preset slave device identifier of the target slave device;

[0036] Add a default master identifier and a default slave identifier for the target slave to the first transaction layer packet.

[0037] In some embodiments, the host processor is further configured to add a preset adjacent path identifier to the first transaction layer packet;

[0038] The host smart network interface card is also configured to send the first network packet to the slave smart network interface card through the direct link between the host smart network interface card and the slave smart network interface card when it is determined that the first transaction layer packet has a preset adjacent path identifier.

[0039] The slave memory pool is also configured to add a preset adjacent path identifier to the second transaction layer packet;

[0040] The slave smart network interface card is also configured to send the second network packet to the host smart network interface card via the direct link between the slave smart network interface card and the host smart network interface card when it is determined that the second transaction layer packet has a preset adjacent path identifier.

[0041] In some embodiments, the preset host identifier, preset slave identifier, and preset adjacent path identifier are set in reserved positions in the header of the transaction layer packet.

[0042] In some embodiments, the switching device includes:

[0043] The system comprises a first smart network interface card (NIC), a second smart network interface card (NIC), a controller, and extended memory. The first smart network interface card is connected to the host smart network interface card and the controller. The second smart network interface card is connected to the slave smart network interface card and the controller. The controller is connected to the extended memory. The host smart network interface card communicates with the first smart network interface card, and the slave smart network interface card communicates with the second smart network interface card based on the Remote Direct Memory Access Protocol (RDP). The controller communicates with the first smart network interface card and the second smart network interface card based on the High-Speed ​​Interconnect Protocol (HICP).

[0044] The first smart network interface card (NIC) is configured to perform protocol conversion on the first network packet to obtain a first transaction layer packet and send it to the controller; and to perform protocol conversion on the second transaction layer packet sent by the controller to obtain a second network packet and send it to the host smart NIC.

[0045] The controller is configured to generate a second transaction layer packet using the memory data and send it to the host processor if it is determined that the memory data requested by the first transaction layer packet is stored in the extended memory; if it is determined that the memory data requested by the first transaction layer packet is not stored in the host memory pool, the controller sends the first transaction layer packet to the second smart network interface card and sends the second transaction layer packet sent by the second smart network interface card to the first smart network interface card.

[0046] The second smart network interface card (NIC) is configured to perform protocol conversion on the first transaction layer packet sent by the controller to obtain a first network packet, and then send it to the slave smart NIC; and to perform protocol conversion on the second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and then send it to the controller.

[0047] According to the second aspect, this application also provides a memory management method, which should be configured as the above-mentioned memory management system, including:

[0048] The host smart network interface card (NIC) performs protocol conversion on the first transaction layer packet sent by the host processor to obtain the first network packet, and then sends it to the slave smart NIC; wherein, the first transaction layer packet contains a memory access request;

[0049] The slave smart network card performs protocol conversion on the first network packet to obtain the first transaction layer packet, and sends it to the slave memory pool;

[0050] The slave smart NIC performs protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain the second network packet, and sends it to the master smart NIC; wherein, the second transaction layer packet contains memory data;

[0051] The host smart network interface card (NIC) performs protocol conversion on the second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and then sends it to the host processor.

[0052] According to a third aspect, this application also provides a computer program product, including a computer program or instructions, which implement the above-described memory management method when executed by a processor.

[0053] According to the fourth aspect, this application also provides a non-volatile readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the above-described memory management method.

[0054] According to a fifth aspect, this application provides a memory management system, comprising: a host, including a host processor and a host smart network interface card (NIC), the host processor and the host smart NIC communicating based on a high-speed interconnect protocol; a slave, including a slave memory pool and a slave smart NIC, the slave memory pool and the slave smart NIC communicating based on a high-speed interconnect protocol, and the host smart NIC and the slave smart NIC communicating based on a remote direct memory access protocol; the host smart NIC is configured to perform protocol conversion on a first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave smart NIC; perform protocol conversion on a second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and send it to the host processor; wherein the first transaction layer packet contains a memory access request, and the second transaction layer packet contains memory data; the slave smart NIC is configured to perform protocol conversion on the first network packet to obtain a first transaction layer packet, and send it to the slave memory pool; perform protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain a second network packet, and send it to the host smart NIC.

[0055] The beneficial effects of this application are as follows: This application provides a memory management system, including a host and a slave. The host includes a host processor and a host smart network interface card (NIC), which communicate with the host smart NIC based on a high-speed interconnect protocol. The slave includes a slave memory pool and a slave smart NIC, which communicate with the slave smart NIC based on a high-speed interconnect protocol. The host smart NIC and the slave smart NIC communicate based on a remote direct memory access protocol. In specific applications, the host smart NIC can perform protocol conversion on a first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave smart NIC; and can perform protocol conversion on a second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and send it to the host processor; wherein, the first transaction layer packet contains a memory access request, and the second transaction layer packet contains memory data. The slave smart NIC can perform protocol conversion on the first network packet to obtain a first transaction layer packet, and send it to the slave memory pool; and can perform protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain a second network packet, and send it to the host smart NIC. In other words, this application can equip both the host and slave devices with smart network interface cards (NICs) that simultaneously specify the High-Speed ​​Interconnect Protocol (HSP) and the Remote Direct Memory Access Protocol (RDP). The smart NICs can then transmit transaction layer packets of the HSP between the host and slave devices via the network and the RDP, thereby avoiding the limitations of the HSP due to long-distance data transmission. This application also provides a memory management method, a computer program product, and a computer-readable storage medium, which possess the aforementioned beneficial effects. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0057] Figure 1 is a structural block diagram of the first memory management system provided in the embodiments of this application.

[0058] Figure 2 is a structural block diagram of a smart network card provided in an embodiment of this application.

[0059] Figure 3 is a structural block diagram of the second memory management system provided in the embodiments of this application.

[0060] Figure 4 is a structural block diagram of a memory pool provided in an embodiment of this application.

[0061] Figure 5 is a schematic diagram of the structure of a host provided in an embodiment of this application.

[0062] Figure 6 is a structural block diagram of the third memory management system provided in the embodiments of this application.

[0063] Figure 7 is a schematic diagram of the topology of a memory management system provided in an embodiment of this application.

[0064] Figure 8 is a structural block diagram of the fourth memory management system provided in the embodiments of this application.

[0065] Figure 9 is a flowchart of a memory management method provided in an embodiment of this application.

[0066] Figure 10 is a flowchart of a memory data acquisition method provided in an embodiment of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0068] With the rapid development of big data and artificial intelligence, the growth rate of processor cores far exceeds the number of main memory channels, leading to an ever-increasing demand for memory capacity and bandwidth in computing systems. High-speed interconnect protocols have emerged in this context. These protocols ensure that multiple processors share a memory pool, thereby improving the overall performance of computing systems. A common high-speed interconnect protocol is CXL (Compute Express Link). However, high-speed interconnect protocols are limited by long-distance data transmission, which restricts their use to a single rack and prevents cross-rack or cross-data center deployments, thus limiting their application scope.

[0069] In view of this, regarding the technical problem of how to extend the data transmission distance of the high-speed interconnect protocol, this application provides a memory management system that can set up smart network cards in the host and slave devices that simultaneously support the high-speed interconnect protocol and the remote direct memory access protocol (RDMA). The smart network cards transmit transaction layer packets (TLP packets) of the high-speed interconnect protocol between the host and slave devices based on the remote direct memory access protocol and network communication, thereby overcoming the defect of the high-speed interconnect protocol being limited by long-distance data transmission.

[0070] For ease of understanding, please refer to Figure 1, which is a structural block diagram of a first memory management system provided in an embodiment of this application. The memory management system provided in this embodiment may include a host and a slave. The host includes at least a host processor and a host smart network interface card (NIC), and the host processor and the host smart NIC can communicate based on a high-speed interconnect protocol. The slave includes at least a slave memory pool and a slave smart NIC, and the slave memory pool and the slave smart NIC can communicate based on a high-speed interconnect protocol. The host smart NIC and the slave smart NIC communicate based on a remote direct memory access protocol. It can be seen that both the host smart NIC and the slave smart NIC support both the high-speed interconnect protocol and the remote direct memory access protocol, and can switch between these two protocols. The following are the uses of the host smart NIC and the slave smart NIC:

[0071] The host smart network interface card (NIC) is configured to perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and then send it to the slave smart NIC; and to perform protocol conversion on the second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and then send it to the host processor; wherein, the first transaction layer packet contains a memory access request, and the second transaction layer packet contains memory data;

[0072] The slave smart network interface card is configured to perform protocol conversion on the first network packet to obtain a first transaction layer packet and send it to the slave memory pool; and to perform protocol conversion on the second transaction layer packet sent from the slave memory pool to obtain a second network packet and send it to the master smart network interface card.

[0073] It should be noted that in high-speed interconnect protocols, the data packets transmitted and processed between devices are transaction layer packets. For example, if a processor needs to access memory data, it needs to encapsulate the memory access request into a transaction layer packet and send the transaction layer packet to memory for processing. Similarly, when memory returns memory data to the processor, it also needs to encapsulate the memory data into a transaction layer packet and return the transaction layer packet to the processor. Therefore, the aforementioned first and second transaction layer packets can be configured to carry memory access requests and memory data, respectively. It should be noted that this embodiment is not limited to memory access requests; for example, it can be a memory read request, a memory write request, etc.

[0074] However, in related technologies, transaction layer packets are typically transmitted only between devices supporting the High Speed ​​Interconnect Protocol (HSIP), without traversing a network. This limits the HSIP's usability to a limited communication distance. To overcome this distance limitation, this application incorporates a smart network interface card (NIC) that simultaneously supports both HSIP and Remote Direct Memory Access (RDA). This NIC can convert transaction layer packets used in HSIP into network packets used in RDA. In some embodiments, the host NIC can convert a first transaction layer packet sent by the host processor into a first network packet and send it to the slave NIC; the slave NIC can convert the first network packet into a first transaction layer packet and send it to the slave memory pool, thus completing the transfer of the first transaction layer packet (memory access request) from host to slave. Similarly, the slave NIC can convert a second transaction layer packet sent by the slave memory pool into a second network packet and send it to the host NIC; the host NIC can convert the second network packet into a second transaction layer packet and send it to the host processor, thus completing the transfer of the second transaction layer packet (memory data) from slave to host. As can be seen, adding the aforementioned smart network interface card (NIC) significantly increases the memory data transmission distance, thereby extending the transmission communication distance of the high-speed interconnect protocol. Furthermore, since the smart NIC also supports the high-speed interconnect protocol, the host processor and slave memory pool only need to interact with the smart NIC using the existing communication transmission methods of the high-speed interconnect protocol.

[0075] It should be noted that the memory data requested by the host can be memory object data, that is, the memory management system can perform memory management based on the object system. The object system is one of the implementation methods of memory decoupling technology. For related technologies of object systems, please refer to the relevant technologies.

[0076] The structure of the smart network interface card (NIC) is described below. Please refer to Figure 2, which is a structural block diagram of a smart NIC provided in an embodiment of this application. Both the host smart NIC and the slave smart NIC include:

[0077] The smart network interface card (NIC) consists of a high-speed interconnect protocol processing module (CXL Block), a protocol controller (RDMA engine), an encapsulation offload engine, and an Ethernet physical layer module (Ethernet MAC). The high-speed interconnect protocol processing module connects to the host processor or slave memory pool. The protocol controller connects to the high-speed interconnect protocol processing module, the encapsulation offload engine connects to the protocol controller, and the Ethernet physical layer module connects to the encapsulation offload engine. Furthermore, to enhance the encapsulation offload engine's ability to cache network packets, a cache (such as DRAM, Dynamic Random Access Memory) can be added. Additionally, to improve the protocol controller's offload capability and security, a data offload unit and a security engine can be added. The following describes the purpose of each module in the smart NIC:

[0078] The high-speed interconnect protocol processing module is configured to receive or send transaction layer packets;

[0079] The protocol controller is configured to convert transaction layer packets from High Speed ​​Interconnect Protocol (HSP) format to Remote Direct Memory Access Protocol (RDIP) format to obtain intermediate data packets, and send the intermediate data packets to the encapsulation and offloading engine; and to convert the intermediate data packets from RIP format to HSP format to obtain transaction layer packets, and send the transaction layer packets to the HSP processing module.

[0080] The encapsulation and unloading engine is configured to encapsulate intermediate data packets into network packets and send the network packets to the Ethernet physical layer module; and decapsulate network packets into intermediate data packets and send the intermediate data packets to the protocol controller.

[0081] The Ethernet physical layer module is configured to receive or send network packets.

[0082] As can be seen, the high-speed interconnect protocol processing module, protocol controller, and encapsulation / unloading engine in the smart network interface card (NIC) are crucial modules for converting transaction layer packets and network packets. The high-speed interconnect protocol processing module is configured to interface with the processor or memory pool, capable of receiving and sending transaction layer packets. For example, the high-speed interconnect protocol processing module can receive transaction layer packets from the processor or memory pool based on the Direct Memory Access (DMA) protocol, and can also send transaction layer packets to the processor or memory pool based on the DMA protocol. The protocol controller can obtain transaction layer packets from the high-speed interconnect protocol processing module and convert them from the high-speed interconnect protocol format to the remote direct memory access protocol format to obtain intermediate data packets; it can also obtain intermediate data packets from the encapsulation / unloading engine, convert them from the remote direct memory access protocol format to the high-speed interconnect protocol format to obtain transaction layer packets, and send the transaction layer packets to the high-speed interconnect protocol processing module. The encapsulation / unloading engine can encapsulate the intermediate data packets into network packets and decapsulate the network packets into intermediate data packets. Thus, this application can use the smart NIC to convert transaction layer packets into a form that can be transmitted over the network, thereby increasing the communication transmission range of the high-speed interconnect protocol.

[0083] It should be noted that this embodiment does not limit the process of converting transaction layer packets into network packets, and can be configured according to the actual application. For example, a simple approach is to treat the transaction layer packet as memory data and encapsulate it as a network packet payload. Of course, other more complex encapsulation methods can also be adopted, and can be configured according to the actual application requirements.

[0084] It should also be noted that the above high-speed interconnect protocol processing module, protocol controller, and encapsulation offloading engine can be implemented based on programmable logic hardware (such as FPGA, Field Programmable Gate Array) in smart network cards.

[0085] Based on the above embodiments, this application provides a memory management system including a host and a slave. The host includes a host processor and a host smart network interface card (NIC), which communicate with the host smart network interface card based on a high-speed interconnect protocol. The slave includes a slave memory pool and a slave smart network interface card, which communicate with the slave smart network interface card based on a high-speed interconnect protocol. The host smart network interface card and the slave smart network interface card communicate based on a remote direct memory access protocol. In some embodiments, the host smart network interface card can perform protocol conversion on a first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave smart network interface card; and can perform protocol conversion on a second network packet sent by the slave smart network interface card to obtain a second transaction layer packet, and send it to the host processor; wherein the first transaction layer packet contains a memory access request, and the second transaction layer packet contains memory data. The slave smart network interface card can perform protocol conversion on the first network packet to obtain a first transaction layer packet, and send it to the slave memory pool; and can perform protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain a second network packet, and send it to the host smart network interface card. In other words, this application can set up smart network cards that simultaneously specify the High-Speed ​​Interconnect Protocol and the Remote Direct Memory Access Protocol in both the host and slave devices, and the smart network cards can transmit transaction layer packets of the High-Speed ​​Interconnect Protocol between the host and slave devices through the network and the Remote Direct Memory Access Protocol, thereby avoiding the defect of the High-Speed ​​Interconnect Protocol being limited by long-distance data transmission.

[0086] Based on the above embodiments, to improve memory access performance, the host may further include a host memory pool. Please refer to Figure 3, which is a structural block diagram of the second memory management system provided in this application embodiment. The host memory pool is located between the host processor and the host smart network interface card (NIC). Communication between the host processor and the host memory pool, and between the host memory pool and the host smart NIC, is based on a high-speed interconnect protocol. In this case, the first transaction layer packet sent by the host processor can first be sent to the host memory pool for processing. If the host memory pool cannot process it, the first transaction layer packet can be further transmitted to the host smart NIC. Alternatively, the host processor can also maintain a direct connection with the host smart NIC (the dashed line indicates that this link is optional). The following describes the uses of the host processor, host memory pool, and host smart NIC:

[0087] The host processor is configured to send a first transaction layer packet to the host memory pool and receive a second transaction layer packet returned by the host memory pool.

[0088] The host memory pool is configured such that if it is determined that the memory data requested by the first transaction layer packet is stored in the host memory pool, a second transaction layer packet is generated using the memory data and sent to the host processor; if it is determined that the memory data requested by the first transaction layer packet is not stored in the host memory pool, the first transaction layer packet is sent to the host smart network interface card (NIC), and the second transaction layer packet sent by the host smart NIC is sent to the host processor.

[0089] As can be seen, after adding the host memory pool, the host processor can prioritize requesting memory data from the host memory pool. If it is determined that the required memory data is not in the host memory pool, the host processor can pass the first transaction layer packet to the host smart network interface card for network transmission through the host memory pool. This effectively improves the memory access efficiency on the host side.

[0090] Of course, since the host processor also chooses to maintain a direct connection with the host smart network interface card (NIC), it can determine whether the memory data to be accessed is stored in the host memory pool before accessing the memory data. If it is stored in the host memory pool, the first transaction layer packet can be sent to the host memory pool; otherwise, the first transaction layer packet can be sent directly to the host smart NIC.

[0091] Based on this, the host processor can also be configured as follows:

[0092] Determine whether the memory data to be accessed is stored in the host memory pool;

[0093] If so, the first transaction layer packet is sent to the host memory pool;

[0094] If not, the first transaction layer packet is sent to the host smart network interface card.

[0095] The structure of the host memory pool and slave memory pool is described below. Please refer to Figure 4, which is a structural block diagram of a memory pool provided in an embodiment of this application. The host memory pool and slave memory pool adopt a symmetrical design, both including a transaction layer module (CXL.io transaction layer) and a link layer module (CXL.io link layer). The transaction layer module is connected to the link layer module and to the smart network interface card (NIC). The link layer module in the host memory pool is connected to the host processor, and the link layer module in the slave memory pool is connected to the underlying layer of the slave memory pool. Furthermore, the transaction layer module and the link layer module can exchange data through buffers (such as send buffers and receive buffers). Additionally, considering that the operating clocks of the transaction layer and the link layer may differ (e.g., the transaction layer clock frequency is 250MHz, and the link layer clock frequency is 500MHz), a clock module can be set in the memory pool. This clock module is located between the transaction layer module and the link layer module and is configured to synchronize the clocks of the transaction layer module and the link layer module. In addition, to enhance security, a security engine can be configured in the clock module to encrypt sensitive data, ensuring that only authorized recipients can decrypt and access the data. The following are optional uses for the transaction layer module and the link layer module:

[0096] The transaction layer module is configured to perform transaction layer processing and send the processed transaction layer packets to the smart network interface card or the link layer module.

[0097] The host memory pool's link layer module is configured to pass transaction layer packets between the host processor and the transaction layer module;

[0098] The link layer module of the slave memory pool is configured to send transaction layer packets sent by the transaction layer module to its own memory for processing; and return the processing results from its own memory to the transaction layer module.

[0099] As can be seen, this embodiment can decentralize the processing mechanism of the high-speed interconnect protocol to a memory pool. In some embodiments, a transaction layer module and a link layer module can be set in the memory pool. The transaction layer module is the highest layer in the high-speed interconnect protocol hierarchy, and its main functions are the assembly and disassembly of transaction layer packets, flow control mechanisms, and transaction ordering management. When the smart network interface card (NIC) disassembles and packages the received data and sends the data packets to the transaction layer module, the transaction layer module is responsible for processing, assembling, and sending the data packets down to the link layer module and the physical layer. The link layer module, as an intermediate layer between the transaction layer module and the physical layer, manages the link communication between the two connected high-speed interconnect devices. Its main function is to ensure the integrity of transmitted data and to detect and correct data errors. For transaction layer packets, the link layer mainly implements the Ack / Nak mechanism (acknowledgment / negative acknowledgment) to ensure the correct transmission of data.

[0100] The link layer module of the host memory pool functions slightly differently from that of the slave memory pool. Since the host memory pool acts as a device between the host processor and the host smart network interface card (NIC), it needs to transmit transaction layer packets between the host processor and the transaction layer module. However, the link layer module of the slave memory pool connects to the underlying layer of the slave memory pool; therefore, it needs to send the transaction layer packets sent by the transaction layer module to its own memory for processing and return the processing results from its own memory to the transaction layer module.

[0101] As can be seen, by setting up the aforementioned memory pool, this embodiment of the application can offload the processing of high-speed interconnect protocols to the memory pool, thereby reducing the I / O load on the processor. It should be noted that this embodiment is not limited to the transaction layer processing content; relevant content of CXL technology can be referenced.

[0102] Furthermore, please refer to Figure 5, which is a schematic diagram of the structure of a host provided in an embodiment of this application, fully illustrating the connection relationship between the processor, memory pool, and smart network interface card. It is worth noting that since the memory pool and smart network interface card in this embodiment have the same structure, each server can function as either a host or a slave.

[0103] Based on the above embodiments, to further expand the communication range of the memory management system, this embodiment can also set up a switching device in the memory management system, configured to forward network packets between the host and slave devices. Please refer to Figure 6, which is a structural block diagram of the third memory management system provided in this application embodiment. It can be seen that the switching device can be set between the host smart network card and the slave smart network card, configured to forward the first network packet to the slave smart network card and the second network packet to the host smart network card. It is worth noting that the switching device can connect multiple hosts and multiple slave devices, facilitating interconnection between multiple hosts and multiple slave devices.

[0104] Furthermore, when multiple hosts and multiple slaves are interconnected through switching devices, to ensure that the host's transaction layer packets can be correctly forwarded to the corresponding slaves, and that the slaves can correctly return transaction layer packets to the host, it is necessary to add host and slave information to the transaction layer packets. Therefore, this embodiment can further improve the host processor, host smart network interface card (NIC), slave memory pool, and slave smart NIC as follows:

[0105] The host processor is configured to add a preset host identifier and a preset slave identifier to the first transaction layer packet;

[0106] The host smart network card is also configured to add the corresponding host address and slave address to the first network packet according to the preset host identifier and preset slave identifier in the first transaction layer packet when the first transaction layer packet is converted into a protocol to obtain the first network packet;

[0107] The slave memory pool is configured to add a preset master identifier and a preset slave identifier to the second transaction layer packet;

[0108] The slave smart network card is also configured to add the corresponding host address and slave address to the second network packet according to the preset host identifier and preset slave identifier in the second transaction layer packet when the second transaction layer packet is converted into a protocol to obtain the second network packet.

[0109] As can be seen, this embodiment can also add an identifier-adding function to the host processor and slave memory pool, ensuring that when generating transaction layer packets, a preset host identifier and a preset slave identifier can be added to the transaction layer packets. Both the preset host identifier and the preset slave identifier are unique identifiers for the host and slave, respectively. This embodiment can also add an identifier recognition function to the host smart network interface card (NIC) and the slave smart NIC, ensuring that when the smart NIC receives a transaction layer packet, it can add the corresponding host address and slave address (such as IP address, subnet mask, etc.) to the network packet based on the preset host identifier and preset slave identifier in the transaction layer. In this way, this embodiment can transmit the identifier and address information of both parties through transaction layer packets, ensuring the correct forwarding of transaction layer packets.

[0110] Furthermore, the host processor can load a preset remote storage index and query the target slave device where the memory data it needs to access is located in the remote storage index to obtain the preset slave device identifier of the target slave device. The remote storage index is configured to store the storage device corresponding to each piece of memory data.

[0111] Based on this, the host processor can also be configured as follows:

[0112] Query the target slave device where the memory data to be accessed is located in the preset remote storage index, and obtain the preset slave device identifier of the target slave device;

[0113] Add a default master identifier and a default slave identifier for the target slave to the first transaction layer packet.

[0114] Furthermore, with the addition of switching devices, there are two connection methods between the host and slave: 1. Connection via switching devices; 2. Direct connection. Thus, a memory management system topology as shown in Figure 7 can be constructed. Figure 7 is a schematic diagram of a memory management system topology provided in an embodiment of this application. It can be seen that adjacent hosts and slaves can communicate directly via a direct connection to ensure efficient communication over short distances. In addition, adjacent hosts and slaves can also communicate via switching devices to improve redundancy. Hosts and slaves that are far apart can communicate via switching devices to ensure communication distance. In this case, the host can select the link as needed when accessing a slave. To further enhance link selection functionality, this embodiment can also add a preset adjacent path identifier to the transaction layer packet. When the host processor generates a transaction layer packet, it can add a preset adjacent path identifier to the packet to indicate that a direct link with the slave is required for communication. Furthermore, the host smart NIC can determine the direct link between the host and the slave based on the preset host identifier, preset slave identifier, and preset adjacent path identifier in the transaction layer packet, and send the network packet to the slave through the direct link. The slave memory pool works similarly to the slave smart NIC.

[0115] Based on this, the host processor is also configured to add a preset adjacent path identifier to the first transaction layer packet;

[0116] The host smart network interface card is also configured to send the first network packet to the slave smart network interface card through the direct link between the host smart network interface card and the slave smart network interface card when it is determined that the first transaction layer packet has a preset adjacent path identifier.

[0117] The slave memory pool is also configured to add a preset adjacent path identifier to the second transaction layer packet;

[0118] The slave smart network interface card is also configured to send the second network packet to the host smart network interface card via the direct link between the slave smart network interface card and the host smart network interface card when it is determined that the second transaction layer packet has a preset adjacent path identifier.

[0119] As can be seen, by adding preset host identifier, preset slave identifier, and preset adjacent path identifier to the transaction layer packet, flexible transaction layer packet forwarding and forwarding link selection functions can be realized, thereby improving the flexibility of memory management.

[0120] Furthermore, to add preset host identifiers, preset slave identifiers, and preset adjacent path identifiers, this embodiment requires minor modifications to the transaction layer packet. In some embodiments, a complete transaction layer packet consists of one or more TLP prefixes (TLPPrefix), TLP headers (TLPHeader), data payloads (DataPayload), and TLP digests (TLPDigest), where the TLP prefix is ​​optional and determined by the TLP header. The TLP header contains the most important identification information of the TLP, such as the TLP bus transaction type, interrupt information, and routing method. The data payload field has a length of 0 to 1024 DW (double word) and is set to transmit valid data. The TLP digest field is a Cyclic Redundancy Check Code (CRC) calculated based on the TLP header and the valid data payload, called Endpoint to Endpoint CRC (ECRC). This embodiment focuses on optimizing the design of the TLP header. In some embodiments, there are 8 reserved bits between Byte 14 and Byte 15 in the TLP packet header, which are used to select the transmission path. Bits 1 / 2 / 3 of Byte 14 are always 0, while bit 0 serves as an identifier for whether the path is adjacent or non-adjacent to the server. When bit 0 is set to 0, it indicates that the transmission link is adjacent; when bit 0 is set to 1, it indicates that the transmission link is non-adjacent. Bits 7 / 6 / 5 / 4 of Byte 15 are set to the server identifier (host identifier, slave identifier). Therefore, the preset host identifier, preset slave identifier, and preset adjacent path identifier are set in reserved positions in the transaction layer packet header.

[0121] Furthermore, the switching device may also include extended memory for sharing between the host and slave devices. In some embodiments, the switching device may include a first smart network interface card (NIC), a second smart network interface card (NIC), a controller, and extended memory. The first smart network interface card is connected to the host smart network interface card and the controller, the second smart network interface card is connected to the slave smart network interface card and the controller, and the controller is connected to the extended memory. The host smart network interface card communicates with the first smart network interface card, and the slave smart network interface card communicates with the second smart network interface card based on Remote Direct Memory Access Protocol (RDBMI). The controller communicates with the first smart network interface card and the second smart network interface card based on High Speed ​​Interconnect Protocol (HSP). The uses of the first smart network interface card, the second smart network interface card, and the controller are as follows:

[0122] The first smart network interface card (NIC) is configured to perform protocol conversion on the first network packet to obtain a first transaction layer packet and send it to the controller; and to perform protocol conversion on the second transaction layer packet sent by the controller to obtain a second network packet and send it to the host smart NIC.

[0123] The controller is configured to generate a second transaction layer packet using the memory data and send it to the host processor if it is determined that the memory data requested by the first transaction layer packet is stored in the extended memory; if it is determined that the memory data requested by the first transaction layer packet is not stored in the host memory pool, the controller sends the first transaction layer packet to the second smart network interface card and sends the second transaction layer packet sent by the second smart network interface card to the first smart network interface card.

[0124] The second smart network interface card (NIC) is configured to perform protocol conversion on the first transaction layer packet sent by the controller to obtain a first network packet, and then send it to the slave smart NIC; and to perform protocol conversion on the second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and then send it to the controller.

[0125] As can be seen, the switching device can also be configured with extended memory for high-speed interconnection protocols, and the host can obtain memory data from the switching device, and can also transmit transaction layer packets to the slave through the switching device.

[0126] Furthermore, for ease of understanding, please refer to Figure 8, which is a structural block diagram of the fourth memory management system provided in the embodiments of this application. It fully illustrates the optional structures of the host, slave, and switching devices. In the host, the host processor itself has a host cache, such as a DRAM cache. In addition, the host processor can interact with the single-machine memory pool based on the data consistency interface (Coherence), IOMMU (Input / Output Memory Management Unit), CXL.mem (CXL memory protocol), and CXL.io (CXL input / output protocol). In some embodiments, it can also interact with the smart network card through the Coh Bridge and CXL.io. Both the single-machine memory pool and the smart network card are equipped with CXL modules and areas, which are configured to handle CXL transactions. The slave is similar. In addition, the memory management system also includes a switching device (CXL Switch), which has a smart network card, a controller (CXL Controller), and expanded memory (CXL Expander memory). It can exchange data between the master and slave devices, and also provide shared memory for the master and slave devices.

[0127] Based on the above embodiments, the memory management method provided in this application will be described below. Please refer to Figure 9, which is a flowchart of a memory management method provided in an embodiment of this application. This method should be configured as the memory management system described above, and may include:

[0128] S901, the host smart network card performs protocol conversion on the first transaction layer packet sent by the host processor to obtain the first network packet, and sends it to the slave smart network card; wherein, the first transaction layer packet contains a memory access request;

[0129] S902, The slave smart network card performs protocol conversion on the first network packet to obtain the first transaction layer packet, and sends it to the slave memory pool;

[0130] S903: The slave smart network card performs protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain a second network packet, and sends it to the master smart network card; wherein, the second transaction layer packet contains memory data;

[0131] S904: The host smart network card performs protocol conversion on the second network packet sent by the slave smart network card to obtain the second transaction layer packet, and sends it to the host processor.

[0132] Based on the above embodiments, this application provides a memory management method, which should be configured in the aforementioned memory management system. In optional applications, the host smart network interface card (NIC) can perform protocol conversion on a first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave smart network interface card (NIC); and can perform protocol conversion on a second network packet sent by the slave smart network interface card to obtain a second transaction layer packet, and send it to the host processor; wherein the first transaction layer packet contains a memory access request, and the second transaction layer packet contains memory data. The slave smart network interface card can perform protocol conversion on the first network packet to obtain a first transaction layer packet, and send it to the slave memory pool; and can perform protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain a second network packet, and send it to the host smart network interface card. That is, this application can configure smart network interfaces that simultaneously specify the High-Speed ​​Interconnect Protocol (HSP) and the Remote Direct Memory Access Protocol (RDMAP) in both the host and slave devices, and the smart network interfaces can transmit transaction layer packets of the HSPAP between the host and slave devices via the network and the RDMAP, thereby avoiding the limitation of the HSPAP on long-distance data transmission.

[0133] In some embodiments, the host further includes a host memory pool, which is disposed between the host processor and the host smart network interface card; the method further includes:

[0134] The host processor sends the first transaction layer packet to the host memory pool;

[0135] If the host memory pool determines that the memory data requested by the first transaction layer packet is stored in the host memory pool, it will use the memory data to generate a second transaction layer packet and send it to the host processor.

[0136] If the host memory pool determines that the memory data requested by the first transaction layer packet is not stored in the host memory pool, it will send the first transaction layer packet to the host smart network card, and the second transaction layer packet sent by the host smart network card will be sent to the host processor.

[0137] The host processor receives the second transaction layer packet returned by the host memory pool.

[0138] In this embodiment, after adding a host memory pool, the host processor can prioritize requesting access to memory data from the host memory pool. If it is determined that the required memory data is not in the host memory pool, the host processor can transmit the first transaction layer packet to the host smart network interface card (NIC) for network transmission via the host memory pool. This effectively improves the memory access efficiency on the host side.

[0139] In some embodiments, the above method further includes:

[0140] The host processor determines whether the memory data to be accessed is stored in the host memory pool;

[0141] If so, the first transaction layer packet is sent to the host memory pool.

[0142] If not, the first transaction layer packet is sent to the host smart network interface card.

[0143] In this embodiment, the host processor can continue to maintain a direct connection with the host smart network interface card (NIC). In this case, before accessing memory data, the host processor can also determine whether the memory data to be accessed is stored in the host memory pool. If it is stored in the host memory pool, the first transaction layer packet can be sent to the host memory pool; otherwise, the first transaction layer packet can be sent directly to the host smart NIC to improve communication efficiency.

[0144] In some embodiments, both the host memory pool and the slave memory pool include a transaction layer module and a link layer module. The transaction layer module is connected to the link layer module and to the smart network interface card (NIC). The link layer module in the host memory pool is connected to the host processor. The method further includes:

[0145] The transaction layer module performs transaction layer processing and sends the processed transaction layer packets to the smart network interface card or the link layer module.

[0146] The link layer module of the host memory pool transmits transaction layer packets between the host processor and the transaction layer module;

[0147] The link layer module of the slave memory pool sends the transaction layer packets sent by the transaction layer module to its own memory for processing; and returns the processing results from its own memory to the transaction layer module.

[0148] In some embodiments, the host memory pool and the slave memory pool further include a clock module, which is located between the transaction layer module and the link layer module and is configured to synchronize the clocks of the transaction layer module and the link layer module.

[0149] In this embodiment, the processing mechanism of the high-speed interconnect protocol can be decentralized to the memory pool, and the transaction layer module and link layer module in the memory pool can process the transaction layer packets, thereby reducing the I / O operation load of the processor.

[0150] In some embodiments, both the host smart network interface card (NIC) and the slave smart NIC include a high-speed interconnect protocol processing module, a protocol controller, an encapsulation and offloading engine, and an Ethernet physical layer module. The high-speed interconnect protocol processing module is connected to the host processor or the slave memory pool, the protocol controller is connected to the high-speed interconnect protocol processing module, the encapsulation and offloading engine is connected to the protocol controller, and the Ethernet physical layer module is connected to the encapsulation and offloading engine. The above method further includes:

[0151] The high-speed interconnect protocol processing module receives or sends transaction layer packets;

[0152] The protocol controller converts the transaction layer packets from the High Speed ​​Interconnect Protocol format to the Remote Direct Memory Access Protocol format to obtain intermediate data packets, and then sends the intermediate data packets to the encapsulation and offloading engine;

[0153] The encapsulation and unloading engine encapsulates intermediate data packets into network packets and sends the network packets to the Ethernet physical layer module;

[0154] The Ethernet physical layer module receives or sends network packets.

[0155] The encapsulation and unloading engine decapsulates network packets into intermediate data packets and sends the intermediate data packets to the protocol controller;

[0156] The protocol controller converts the intermediate data packets from the Remote Direct Memory Access Protocol (RDA) format to the High Speed ​​Interconnect Protocol (HSIP) format to obtain transaction layer packets, and then sends the transaction layer packets to the HIPIP processing module.

[0157] In this embodiment, the high-speed interconnect protocol processing module, protocol controller, and encapsulation and offloading engine in the smart network card cooperate with each other to convert transaction layer packets into network packets, which can be transmitted over the network, thereby increasing the communication transmission range of the high-speed interconnect protocol.

[0158] In some embodiments, the memory management system further includes a switching device disposed between the host smart network interface card (NIC) and the slave smart NIC; the method further includes:

[0159] The switching device forwards the first network packet to the slave smart network card and the second network packet to the master smart network card.

[0160] In some embodiments, the above method further includes:

[0161] The host processor adds a preset host identifier and a preset slave identifier to the first transaction layer packet;

[0162] When the host smart network card performs protocol conversion on the first transaction layer packet to obtain the first network packet, it adds the corresponding host address and slave address to the first network packet according to the preset host identifier and preset slave identifier in the first transaction layer packet;

[0163] Add a preset master identifier and a preset slave identifier to the second transaction layer packet from the slave memory pool;

[0164] When the slave smart network card performs protocol conversion on the second transaction layer packet to obtain the second network packet, it adds the corresponding host address and slave address to the second network packet according to the preset host identifier and preset slave identifier in the second transaction layer packet.

[0165] In some embodiments, the above method further includes:

[0166] The host processor queries the preset remote storage index to find the target slave where the memory data to be accessed is located, and obtains the preset slave identifier of the target slave;

[0167] Add a default master identifier and a default slave identifier for the target slave to the first transaction layer packet.

[0168] In this embodiment, when multiple hosts and multiple slaves are interconnected through a switching device, to ensure that the host's transaction layer packets can be correctly forwarded to the corresponding slaves, and that the slaves can correctly return transaction layer packets to the host, an identifier-adding function can be added to the host processor and the slave memory pool. This ensures that when generating transaction layer packets, a preset host identifier and a preset slave identifier can be added to the transaction layer packets. Both the preset host identifier and the preset slave identifier are unique identifiers for the host and slave, respectively. This embodiment can also add an identifier recognition function to the host smart network interface card (NIC) and the slave smart NIC, ensuring that when the smart NIC receives a transaction layer packet, it can add the corresponding host address and slave address to the network packet based on the preset host identifier and preset slave identifier in the transaction layer. In this way, this embodiment can transmit the identifier and address information of both parties through transaction layer packets, ensuring the correct forwarding of the transaction layer packets.

[0169] In some embodiments, the above method further includes:

[0170] The host processor adds a preset adjacent path identifier to the first transaction layer packet;

[0171] When the host smart network card determines that the first transaction layer packet has a preset adjacent path identifier, it sends the first network packet to the slave smart network card through the direct link between the host smart network card and the slave smart network card.

[0172] Add a preset adjacent path identifier from the slave memory pool to the second transaction layer packet;

[0173] The slave smart network interface card is also configured to send the second network packet to the host smart network interface card via the direct link between the slave smart network interface card and the host smart network interface card when it is determined that the second transaction layer packet has a preset adjacent path identifier.

[0174] In this embodiment, the host can select a link as needed when accessing the slave. To further enhance link selection functionality, this embodiment can also add a preset adjacent path identifier to the transaction layer packet. When generating a transaction layer packet, the host processor can add the preset adjacent path identifier to the packet to indicate that a direct link with the slave is required for communication. Then, the host smart network interface card (NIC) can determine the direct link between the host and the slave based on the preset host identifier, preset slave identifier, and preset adjacent path identifier in the transaction layer packet, and send the network packet to the slave via the direct link. The slave memory pool works similarly to the slave smart NIC.

[0175] In some embodiments, the preset host identifier, preset slave identifier, and preset adjacent path identifier are set in reserved positions in the header of the transaction layer packet.

[0176] In some embodiments, the switching device includes a first smart network interface card (NIC), a second smart NIC, a controller, and extended memory. The first smart NIC is connected to a host smart NIC and the controller, the second smart NIC is connected to a slave smart NIC and the controller, and the controller is connected to the extended memory. The host smart NIC communicates with the first smart NIC, and the slave smart NIC communicates with the second smart NIC based on a Remote Direct Memory Access Protocol (RDA). The controller communicates with the first smart NIC and the second smart NIC based on a High Speed ​​Interconnect Protocol (HSP). The method further includes:

[0177] The first smart network interface card (NIC) performs protocol conversion on the first network packet to obtain the first transaction layer packet, and sends it to the controller;

[0178] If the controller determines that the memory data requested by the first transaction layer packet is stored in extended memory, it uses the memory data to generate a second transaction layer packet and sends it to the host processor.

[0179] If the controller determines that the memory data requested by the first transaction layer packet is not stored in the host memory pool, it will send the first transaction layer packet to the second smart network card.

[0180] The second smart network card performs protocol conversion on the first transaction layer packet sent by the controller to obtain the first network packet, and then sends it to the slave smart network card;

[0181] The second smart network card performs protocol conversion on the second network packet sent by the slave smart network card to obtain the second transaction layer packet, and then sends it to the controller;

[0182] The controller sends the second transaction layer packet sent by the second smart network interface card (NIC) to the first smart NIC;

[0183] The first smart network interface card (NIC) performs protocol conversion on the second transaction layer packet sent by the controller to obtain the second network packet, and then sends it to the host smart NIC.

[0184] In this embodiment, the switching device may also include extended memory for sharing between the host and slave devices, thereby further increasing the memory capacity.

[0185] Based on the above embodiments, the following will describe, with reference to schematic diagrams in some embodiments, how an application in the host obtains memory data from a slave device in the above system architecture. Please refer to Figure 10, which is a flowchart of a memory data acquisition method provided in an embodiment of this application. When an application needs to access a data object in the storage system, the system first checks whether the object already exists in the local DRAM cache. If the object is in the cache, the system loads the object directly from the cache to reduce access latency. If the object is not in the cache, the system checks whether it is in the memory pool. If it is in the memory pool, the system loads the object directly from the cache. If the object is not in the memory pool, the system queries a remote storage index service to determine the storage location of the object. Once the object location is determined, the system establishes a high-speed CXL connection (High-Speed ​​Interconnect Protocol connection) and communicates with a remote daemon through a CXL agent (High-Speed ​​Interconnect Protocol agent) to prepare for an RDMA read (Remote Direct Memory Access Read) operation. The RDMA operation allows the system to directly retrieve data objects from a remote CXL device and transfer the data to local memory at high speed. Throughout the process, the system performs concurrency control and security checks to ensure data consistency and security. Simultaneously, the system continuously monitors performance and performs data management tasks, such as handling popular pages and locking mechanisms, to optimize data access and system performance. Once data is successfully transmitted and all monitoring and management tasks are completed, the workflow ends. In this way, RDMA systems combined with CXL technology can provide high-performance, low-latency data access while ensuring data security and system reliability.

[0186] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the memory management method described in the above embodiments.

[0187] Since the embodiments of the computer program product portion correspond to the embodiments of the memory management method and system portion, please refer to the descriptions of the embodiments of the memory management method and system portion for the embodiments of the computer program product portion, and they will not be repeated here.

[0188] This application also provides a non-volatile readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the memory management method described in the above embodiments.

[0189] Since the embodiments of the non-volatile readable storage medium portion correspond to the embodiments of the memory management method and system portion, the embodiments of the storage medium portion can be found in the description of the embodiments of the memory management method and system portion, and will not be repeated here.

[0190] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0191] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0192] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0193] The foregoing has provided a detailed description of a memory management system, method, program product, and storage medium provided in this application. Optional examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely intended to aid in understanding the methods and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A memory management system, characterized in that, The system includes a host and a slave device. The host includes a host processor and a host smart network interface card (NIC). The host processor and the host smart NIC communicate based on a high-speed interconnect protocol. The slave device includes a slave memory pool and a slave smart NIC. The slave memory pool and the slave smart NIC communicate based on the high-speed interconnect protocol. The host smart NIC and the slave smart NIC communicate based on a remote direct memory access protocol. The host smart network interface card (NIC) is used to perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and then send it to the slave smart network interface card (NIC). The second network packet sent by the slave smart network card is converted into a second transaction layer packet and sent to the host processor; wherein, the first transaction layer packet contains a memory access request and the second transaction layer packet contains memory data; The slave smart network interface card (NIC) is used to perform protocol conversion on the first network packet to obtain the first transaction layer packet, and send it to the slave memory pool; and to perform protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain the second network packet, and send it to the host smart NIC.

2. The memory management system according to claim 1, characterized in that, The host also includes a host memory pool, which is disposed between the host processor and the host smart network card; The host processor is used to send the first transaction layer packet to the host memory pool; Receive the second transaction layer packet returned by the host memory pool; The host memory pool is used to generate a second transaction layer packet using the memory data if it is determined that the memory data requested by the first transaction layer packet is stored in the host memory pool, and then send it to the host processor. If it is determined that the memory data requested by the first transaction layer packet is not stored in the host memory pool, then the first transaction layer packet is sent to the host smart network interface card (NIC), and the second transaction layer packet sent by the host smart network interface card is sent to the host processor.

3. The memory management system according to claim 2, characterized in that, The host processor is further configured to: determine whether the memory data to be accessed is stored in the host memory pool; If so, the first transaction layer packet is sent to the host memory pool.

4. The memory management system according to claim 2, characterized in that, Both the host memory pool and the slave memory pool include: The transaction layer module and the link layer module are connected, the transaction layer module is connected to the smart network card, and the link layer module in the host memory pool is connected to the host processor. The transaction layer module is used to perform transaction layer processing and send the processed transaction layer packets to the smart network card or the link layer module. The link layer module of the host memory pool is used to transmit transaction layer packets between the host processor and the transaction layer module; The link layer module of the slave memory pool is used to send the transaction layer packets sent by the transaction layer module to its own memory for processing; and to return the processing results from its own memory to the transaction layer module.

5. The memory management system according to claim 4, characterized in that, The host memory pool and the slave memory pool also include: A clock module is provided, which is located between the transaction layer module and the link layer module, and is used to synchronize the clocks of the transaction layer module and the link layer module.

6. The memory management system according to claim 1, characterized in that, Both the host smart network card and the slave smart network card include: The system includes a high-speed interconnect protocol processing module, a protocol controller, an encapsulation and offloading engine, and an Ethernet physical layer module. The high-speed interconnect protocol processing module is connected to the host processor or the slave memory pool. The protocol controller is connected to the high-speed interconnect protocol processing module. The encapsulation and offloading engine is connected to the protocol controller. The Ethernet physical layer module is connected to the encapsulation and offloading engine. The high-speed interconnect protocol processing module is used to receive or send transaction layer packets; The protocol controller is configured to convert the transaction layer packet from the High Speed ​​Interconnect Protocol format to the Remote Direct Memory Access Protocol format to obtain an intermediate data packet, and send the intermediate data packet to the encapsulation and unloading engine; convert the intermediate data packet from the Remote Direct Memory Access Protocol format to the High Speed ​​Interconnect Protocol format to obtain a transaction layer packet, and send the transaction layer packet to the High Speed ​​Interconnect Protocol processing module; The encapsulation and unloading engine is used to encapsulate the intermediate data packet into a network packet and send the network packet to the Ethernet physical layer module; decapsulate the network packet into the intermediate data packet and send the intermediate data packet to the protocol controller; The Ethernet physical layer module is used to receive or send the network packets.

7. The memory management system according to any one of claims 1 to 6, characterized in that, Also includes: A switching device is disposed between the host smart network interface card (NIC) and the slave smart network interface card (NIC), and is used to forward the first network packet to the slave smart network interface card and forward the second network packet to the host smart network interface card.

8. The memory management system according to claim 7, characterized in that, The host processor is used to add a preset host identifier and a preset slave identifier to the first transaction layer packet; The host smart network interface card is further configured to add corresponding host address and slave address to the first network packet according to the preset host identifier and preset slave identifier in the first transaction layer packet when the first transaction layer packet is converted into the first network packet by protocol conversion; The slave memory pool is used to add the preset host identifier and the preset slave identifier to the second transaction layer packet; The slave smart network interface card is further configured to add corresponding host addresses and slave addresses to the second network packet according to the preset host identifier and preset slave identifier in the second transaction layer packet when the second transaction layer packet is converted into the second network packet by protocol conversion.

9. The memory management system according to claim 8, characterized in that, The host processor is also used for: Query the target slave device where the memory data to be accessed is located in the preset remote storage index, and obtain the preset slave device identifier of the target slave device; Add a preset host identifier and a preset slave identifier of the target slave to the first transaction layer packet.

10. The memory management system according to claim 8, characterized in that, The host processor is also configured to add a preset adjacent path identifier to the first transaction layer packet; The host smart network interface card is further configured to send the first network packet to the slave smart network interface card through the direct link between the host smart network interface card and the slave smart network interface card when it is determined that the first transaction layer packet contains the preset adjacent path identifier; The slave memory pool is also used to add a preset adjacent path identifier to the second transaction layer packet; The slave smart network interface card (NIC) is further configured to, when it is determined that the second transaction layer packet contains the preset adjacent path identifier, send the second network packet to the host smart network interface card via the direct link between the slave smart network interface card and the host smart network interface card.

11. The memory management system according to claim 10, characterized in that, The preset host identifier, the preset slave identifier, and the preset adjacent path identifier are set in reserved positions in the header of the transaction layer packet.

12. The memory management system according to claim 7, characterized in that, The switching device includes: The system comprises a first smart network interface card (NIC), a second smart network interface card (NIC), a controller, and extended memory. The first smart network interface card is connected to the host smart network interface card and the controller. The second smart network interface card is connected to the slave smart network interface card and the controller. The controller is connected to the extended memory. The host smart network interface card communicates with the first smart network interface card, and the slave smart network interface card communicates with the second smart network interface card based on the Remote Direct Memory Access Protocol (RDA). The controller communicates with the first smart network interface card and the second smart network interface card based on the High-Speed ​​Interconnect Protocol (HICP). The first smart network interface card (NIC) is used to perform protocol conversion on the first network packet to obtain the first transaction layer packet, and send it to the controller; and to perform protocol conversion on the second transaction layer packet sent by the controller to obtain the second network packet, and send it to the host smart NIC. The controller is configured to, if it is determined that the memory data requested by the first transaction layer packet is stored in the extended memory, generate a second transaction layer packet using the memory data and send it to the host processor; if it is determined that the memory data requested by the first transaction layer packet is not stored in the host memory pool, send the first transaction layer packet to the second smart network interface card (NIC) and send the second transaction layer packet sent by the second smart network interface card (NIC) to the first smart network interface card (NIC). The second smart network interface card (NIC) is used to perform protocol conversion on the first transaction layer packet sent by the controller to obtain a first network packet, and send it to the slave smart NIC; and to perform protocol conversion on the second network packet sent by the slave smart NIC to obtain a second transaction layer packet, and send it to the controller.

13. A memory management method, characterized in that, Applied to a memory management system as described in any one of claims 1 to 12, the method comprises: The host smart network interface card (NIC) performs protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and sends it to the slave smart NIC; wherein, the first transaction layer packet contains a memory access request; The slave smart network card performs protocol conversion on the first network packet to obtain the first transaction layer packet, and sends it to the slave memory pool; The slave smart network interface card (NIC) performs protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain a second network packet, and sends it to the host smart NIC; wherein, the second transaction layer packet contains memory data; The host smart network interface card (NIC) performs protocol conversion on the second network packet sent by the slave smart network interface card (NIC) to obtain the second transaction layer packet, and then sends it to the host processor.

14. The memory management method according to claim 13, characterized in that, The host also includes a host memory pool, which is disposed between the host processor and the host smart network interface card; the method further includes: The host processor sends the first transaction layer packet to the host memory pool; If the host memory pool determines that the memory data requested by the first transaction layer packet is stored in the host memory pool, it generates the second transaction layer packet using the memory data and sends it to the host processor. If the host memory pool determines that the memory data requested by the first transaction layer packet is not stored in the host memory pool, it sends the first transaction layer packet to the host smart network card and sends the second transaction layer packet sent by the host smart network card to the host processor. The host processor receives the second transaction layer packet returned by the host memory pool.

15. The memory management method according to claim 14, characterized in that, The method further includes: The host processor determines whether the memory data to be accessed is stored in the host memory pool; If so, the first transaction layer packet is sent to the host memory pool; If not, the first transaction layer packet is sent to the host smart network card.

16. The memory management method according to claim 13, characterized in that, Both the host smart network interface card (NIC) and the slave smart NIC include a high-speed interconnect protocol processing module, a protocol controller, an encapsulation and offloading engine, and an Ethernet physical layer module. The high-speed interconnect protocol processing module is connected to the host processor or the slave memory pool. The protocol controller is connected to the high-speed interconnect protocol processing module. The encapsulation and offloading engine is connected to the protocol controller. The Ethernet physical layer module is connected to the encapsulation and offloading engine. The method further includes: The high-speed interconnection protocol processing module receives or sends transaction layer packets; The protocol controller converts the transaction layer packet from the high-speed interconnect protocol format to the remote direct memory access protocol format to obtain an intermediate data packet, and sends the intermediate data packet to the encapsulation and unloading engine; The encapsulation and unloading engine encapsulates the intermediate data packet into a network packet and sends the network packet to the Ethernet physical layer module; The Ethernet physical layer module receives or sends the network packets; The encapsulation and unloading engine decapsulates the network packet into the intermediate data packet and sends the intermediate data packet to the protocol controller; The protocol controller converts the intermediate data packet from the Remote Direct Memory Access Protocol format to the High Speed ​​Interconnect Protocol format to obtain a transaction layer packet, and sends the transaction layer packet to the High Speed ​​Interconnect Protocol processing module.

17. The memory management method according to claim 13, characterized in that, The method further includes: The host processor adds a preset host identifier and a preset slave identifier to the first transaction layer packet; When the host smart network card performs protocol conversion on the first transaction layer packet to obtain the first network packet, it adds the corresponding host address and slave address to the first network packet according to the preset host identifier and preset slave identifier in the first transaction layer packet. The slave memory pool adds a preset host identifier and a preset slave identifier to the second transaction layer packet; When the slave smart network card performs protocol conversion on the second transaction layer packet to obtain the second network packet, it adds the corresponding host address and slave address to the second network packet according to the preset host identifier and preset slave identifier in the second transaction layer packet.

18. The memory management method according to claim 13, characterized in that, The method further includes: The host processor queries the target slave device where the memory data to be accessed is located in the preset remote storage index, and obtains the preset slave device identifier of the target slave device; Add a preset host identifier and a preset slave identifier of the target slave to the first transaction layer packet.

19. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the memory management method as described in any one of claims 13 to 18.

20. A non-volatile readable storage medium, characterized in that, The non-volatile readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the memory management method as described in any one of claims 13 to 18.