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

By setting up intelligent network cards in the host and slave that support high-speed interconnection protocols and remote direct memory access protocols, the problem of high-speed interconnection protocols being limited by long-distance data transmission is solved, a wider memory data transmission distance is achieved, and the application range of the protocol is improved.

CN119402566BActive Publication Date: 2025-04-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411997339.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Due to the limitation of long-distance data transmission, high-speed interconnection protocols cannot be effectively applied across racks or across data centers.

Method used

Set up a smart network card in the host and slave that supports both high-speed interconnection protocol and remote direct memory access protocol, and passes transaction layer packets in the high-speed interconnection protocol between the host and slave through remote direct memory access protocol and network communication.

Benefits of technology

Through the conversion and delivery of smart network cards, the memory data transmission distance is significantly improved, the high-speed interconnection protocol is overcome, and the high-speed interconnection protocol is limited by long-distance data transmission is increased, and the transmission and communication distance of the protocol is increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402566B_ABST
    Figure CN119402566B_ABST
Patent Text Reader

Abstract

The present invention provides a memory management system, method, program product and storage medium, which relate to the field of memory management. The system comprises a host and a slave, the host comprises a host processor and a host intelligent network card, the host processor and the host intelligent network card communicate based on a high-speed interconnection protocol; the slave comprises a slave memory pool and a slave intelligent network card, the slave memory pool and the slave intelligent network card communicate based on a high-speed interconnection protocol; the host intelligent network card and the slave intelligent network card communicate based on a remote direct memory access protocol; intelligent network cards that support both the high-speed interconnection protocol and the remote direct memory access protocol can be set in both the host and the slave, and the intelligent network card can transmit transaction layer packets in the high-speed interconnection protocol between the host and the slave based on the remote direct memory access protocol and the network, thereby avoiding the defect that the high-speed interconnection protocol is limited by long-distance data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of memory management, and in particular to a memory management system, method, program product and storage medium. Background Art

[0002] With the rapid development of big data and artificial intelligence, the core growth rate of processors has far exceeded the number of main memory channels, which has led to an increasing demand for memory capacity and bandwidth in computing systems. High-speed interconnect protocols have emerged in this context. The protocol ensures that multiple processors can share a memory pool, thereby improving the overall performance of the computing system. However, the high-speed interconnect protocol is limited by long-distance data transmission, which is not conducive to the flexible application of the protocol. Summary of the invention

[0003] The object of the present invention is to provide a memory management system, method, program product and storage medium, which can transmit transaction layer packets in a high-speed interconnection protocol between a host and a slave based on a remote direct memory access protocol and network communication, thereby avoiding the defect that the high-speed interconnection protocol is limited by long-distance data transmission.

[0004] In order to solve the above technical problems, the present invention provides a memory management system, including a host and a slave, the host includes a host processor and a host smart network card, the host processor and the host smart network card communicate based on a high-speed interconnection protocol; the slave includes a slave memory pool and a slave smart network card, the slave memory pool and the slave smart network card communicate based on a high-speed interconnection protocol, and the host smart network card and the slave smart network card communicate based on a remote direct memory access protocol;

[0005] The host intelligent network card is used to perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave intelligent network card; perform protocol conversion on the second network packet sent by the slave intelligent network 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;

[0006] The slave intelligent network card is used 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 from the slave memory pool to obtain a second network packet, and send it to the host intelligent network card.

[0007] Optionally, the host further includes a host memory pool, and the host memory pool is arranged between the host processor and the host smart network card;

[0008] The host processor is used 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;

[0009] A host memory pool is used 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 to be accessed by the first transaction layer packet is stored in the host memory pool; if it is determined that the memory data requested to be accessed 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 card, and the second transaction layer packet sent by the host smart network card is sent to the host processor.

[0010] Optionally, the host processor is further configured to:

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

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

[0013] Optionally, the host memory pool and the slave memory pool both include:

[0014] The transaction layer module and the link layer module are connected to the link layer module, 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;

[0015] The transaction layer module is used to perform transaction layer processing and send the processed transaction layer packets to the smart network card or link layer module;

[0016] The link layer module of the host memory pool is used to transfer transaction layer packets between the host processor and the transaction layer module;

[0017] The link layer module of the slave memory pool is used to send the transaction layer packet sent by the transaction layer module to its own memory for processing; and return the processing result of its own memory to the transaction layer module.

[0018] Optionally, the host memory pool and the slave memory pool further include:

[0019] The clock module is arranged between the transaction layer module and the link layer module, and is used for performing clock synchronization between the transaction layer module and the link layer module.

[0020] Optionally, the host intelligent network card and the slave intelligent network card both include:

[0021] A high-speed interconnection protocol processing module, a protocol controller, an encapsulation and unloading engine, and an Ethernet physical layer module. The high-speed interconnection protocol processing module is connected to a host processor or a slave memory pool, the protocol controller is connected to the high-speed interconnection protocol processing module, the encapsulation and unloading engine is connected to the protocol controller, and the Ethernet physical layer module is connected to the encapsulation and unloading engine;

[0022] High-speed interconnect protocol processing module, used to receive or send transaction layer packets;

[0023] The protocol controller is used to convert the transaction layer packet from the high-speed interconnection 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 interconnection protocol format to obtain a transaction layer packet, and send the transaction layer packet to the high-speed interconnection protocol processing module;

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

[0025] Ethernet physical layer module, used to receive or send network packets.

[0026] Optionally, it also includes:

[0027] The switching device is arranged between the host intelligent network card and the slave intelligent network card, and is used to forward the first network packet to the slave intelligent network card and forward the second network packet to the host intelligent network card.

[0028] Optionally, the host processor is used to add a preset host identifier and a preset slave identifier to the first transaction layer packet;

[0029] The host intelligent network card is further used to add a corresponding host address and a slave address in the first network packet according to a preset host identifier and a preset slave identifier in the first transaction layer packet when performing protocol conversion on the first transaction layer packet to obtain a first network packet;

[0030] A slave memory pool, used to add a preset host identifier and a preset slave identifier to a second transaction layer packet;

[0031] The slave intelligent network card is also used to add the corresponding host address and slave address in the second network packet according to the preset host identifier and the preset slave identifier in the second transaction layer packet when performing protocol conversion on the second transaction layer packet to obtain the second network packet.

[0032] Optionally, the host processor is further configured to:

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

[0034] Add the preset host identifier and the preset slave identifier of the target slave to the first transaction layer packet.

[0035] Optionally, the host processor is further configured to add a preset adjacent path identifier to the first transaction layer packet;

[0036] The host intelligent network card is further configured to send the first network packet to the slave intelligent network card through the direct link between the host intelligent network card and the slave intelligent network card when determining that the first transaction layer packet has a preset adjacent path identifier;

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

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

[0039] Optionally, the preset host identifier, the preset slave identifier and the preset adjacent path identifier are set in a reserved position in the packet header of the transaction layer packet.

[0040] Optionally, the switching device includes:

[0041] A first smart network card, a second smart network card, a controller and an extended memory, the first smart network card is connected to the host smart network card and the controller, the second smart network card is connected to the slave smart network card and the controller, and the controller is connected to the extended memory; the host smart network card and the first smart network card, the slave smart network card and the second smart network card communicate based on the remote direct memory access protocol, and the controller and the first smart network card, and the controller and the second smart network card communicate based on the high-speed interconnection protocol;

[0042] The first smart network card is used to perform protocol conversion on the first network packet to obtain a first transaction layer packet, and send it to the controller; 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 network card;

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

[0044] The second smart network card 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 network card; perform protocol conversion on the second network packet sent by the slave smart network card to obtain a second transaction layer packet, and send it to the controller.

[0045] The present invention also provides a memory management method, which is applied to the above memory management system, comprising:

[0046] The host intelligent network card performs protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and sends the first network packet to the slave intelligent network card; wherein the first transaction layer packet includes a memory access request;

[0047] The slave intelligent network card performs protocol conversion on the first network packet to obtain a first transaction layer packet, and sends the first transaction layer packet to the slave memory pool;

[0048] The slave intelligent 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 the second network packet to the host intelligent network card; wherein the second transaction layer packet includes memory data;

[0049] The host intelligent network card performs protocol conversion on the second network packet sent by the slave intelligent network card to obtain a second transaction layer packet, and sends the second transaction layer packet to the host processor.

[0050] The present invention also provides a computer program product, including a computer program or an instruction, and the computer program or the instruction implements the above-mentioned memory management method when executed by a processor.

[0051] The present invention also provides a non-volatile computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the above-mentioned memory management method is implemented.

[0052] The present invention provides a memory management system, comprising: a host, comprising a host processor and a host intelligent network card, wherein the host processor communicates with the host intelligent network card based on a high-speed interconnection protocol; a slave, comprising a slave memory pool and a slave intelligent network card, wherein the slave memory pool communicates with the slave intelligent network card based on the high-speed interconnection protocol, and the host intelligent network card communicates with the slave intelligent network card based on a remote direct memory access protocol; the host intelligent network card is used to perform protocol conversion on a first transaction layer packet sent by the host processor to obtain a first network packet, and send the first network packet to the slave intelligent network card; perform protocol conversion on a second network packet sent by the slave intelligent network card to obtain a second transaction layer packet, and send the second transaction layer packet 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 intelligent network card is used to perform protocol conversion on the first network packet to obtain the first transaction layer packet, and send the first transaction layer packet to the slave memory pool; perform protocol conversion on the second transaction layer packet sent by the slave memory pool to obtain the second network packet, and send the second network packet to the host intelligent network card.

[0053] The beneficial effect of the present invention is that the present invention can provide 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 communicates with the host smart network card based on a high-speed interconnection protocol; the slave includes a slave memory pool and a slave smart network card, and the slave memory pool communicates with the slave smart network card based on a high-speed interconnection protocol; the host smart network card communicates with the slave smart network card based on a remote direct memory access protocol. In a specific application, the host smart network card can perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave smart network card, and can perform protocol conversion on the second network packet sent by the slave smart network 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 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 card. In other words, the present invention can set a smart network card that indicates both the high-speed interconnection protocol and the remote direct memory access protocol in both the host and the slave, and the smart network card can transmit the transaction layer packet in the high-speed interconnection protocol between the host and the slave through the network and the remote direct memory access protocol, thereby avoiding the defect that the high-speed interconnection protocol is limited by long-distance data transmission. The present invention also provides a memory management method, a computer program product and a computer-readable storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0055] Figure 1 A structural block diagram of a first memory management system provided by an embodiment of the present invention;

[0056] Figure 2 A structural block diagram of a smart network card provided by an embodiment of the present invention;

[0057] Figure 3 A structural block diagram of a second memory management system provided by an embodiment of the present invention;

[0058] Figure 4 A structural block diagram of a memory pool provided by an embodiment of the present invention;

[0059] Figure 5 A schematic diagram of the structure of a host provided by an embodiment of the present invention;

[0060] Figure 6 A structural block diagram of a third memory management system provided by an embodiment of the present invention;

[0061] Figure 7 A schematic diagram of a topological structure of a memory management system provided by an embodiment of the present invention;

[0062] Figure 8 A structural block diagram of a fourth memory management system provided by an embodiment of the present invention;

[0063] Fig. 9 A flowchart of a memory management method provided by an embodiment of the present invention;

[0064] Fig.10 A flow chart of memory data acquisition provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0066] With the rapid development of big data and artificial intelligence, the core growth rate of processors has far exceeded the number of main memory channels, which has led to an increasing demand for memory capacity and bandwidth in computing systems. High-speed interconnect protocols have emerged in this context. This protocol ensures that multiple processors share a memory pool, thereby improving the overall performance of the computing system. A common high-speed interconnect protocol is the CXL protocol (Compute Express Link). However, the high-speed interconnect protocol is limited by long-distance data transmission, which means that it can only be used within a single rack and cannot be used across racks or data centers, which limits the scope of application of the protocol.

[0067] In view of this, in order to solve the technical problem of how to extend the data transmission distance of the high-speed interconnection protocol, the present invention can provide a memory management system, which can set a smart network card that supports both the high-speed interconnection protocol and the remote direct memory access protocol (RDMA protocol) in the host and the slave, and the smart network card transmits the transaction layer packet (TLP packet) in the high-speed interconnection protocol between the host and the slave based on the remote direct memory access protocol and network communication, thereby overcoming the defect that the high-speed interconnection protocol is limited by long-distance data transmission.

[0068] For easier understanding, please refer to Figure 1 , Figure 1 This is a structural block diagram of the first memory management system provided by an embodiment of the present invention. The memory management system provided by an embodiment of the present invention may include a host and a slave. Among them, the host includes at least a host processor and a host smart network card, and the host processor and the host smart network card can communicate based on a high-speed interconnection protocol. The slave includes at least a slave memory pool and a slave smart network card, and the slave memory pool and the slave smart network card can communicate based on a high-speed interconnection protocol. The host smart network card and the slave smart network card communicate based on the remote direct memory access protocol. It can be seen that the host smart network card and the slave smart network card both support the high-speed interconnection protocol and the remote direct memory access protocol, and can convert between the two protocols. The following are the specific uses of the host smart network card and the slave smart network card:

[0069] The host intelligent network card is used to perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave intelligent network card; perform protocol conversion on the second network packet sent by the slave intelligent network 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;

[0070] The slave intelligent network card is used 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 from the slave memory pool to obtain a second network packet, and send it to the host intelligent network card.

[0071] It should be noted that in the high-speed interconnection protocol, the data packets transmitted and processed between devices are transaction layer packets. For example, if the processor needs to access memory data in the memory, it is necessary to encapsulate the memory access request into a transaction layer packet, and send the transaction layer packet to the memory for processing. Similarly, when the memory returns memory data to the processor, it is also necessary to encapsulate the memory data into a transaction layer packet, and return the transaction layer packet to the processor. Therefore, the above-mentioned first transaction layer packet and second transaction layer packet can be used to carry memory access requests and memory data. It should be noted that this embodiment does not limit specific memory access requests, for example, it can be a memory read request, a memory write request, etc.

[0072] However, in the related art, transaction layer packets are usually only transmitted between devices that support the high-speed interconnection protocol, and are not transmitted through the network, which results in the high-speed interconnection protocol being used only within a limited communication distance. In order to break through the transmission distance limitation of the protocol, the present invention is particularly provided in the host and the slave to support both the high-speed interconnection protocol and the remote direct memory access protocol. The smart network card can convert the transaction layer packets used in the high-speed interconnection protocol into network packets used in the remote direct memory access protocol. Specifically, the host smart network card can convert the first transaction layer packet sent by the host processor into a first network packet, and send the first network packet to the slave smart network card; the slave smart network card can convert the first network packet into a first transaction layer packet, and send the first transaction layer packet to the slave memory pool, thereby completing the transmission of the first transaction layer packet (memory access request) from the host to the slave. Similarly, the slave smart network card can convert the second transaction layer packet sent by the slave memory pool into a second network packet, and send the second network packet to the host smart network card; the host smart network card can convert the second network packet into a second transaction layer packet, and send the second transaction layer packet to the host processor, thereby completing the transmission of the second transaction layer packet (memory data) from the slave to the host. It can be seen that by adding the above-mentioned smart network card, the memory data transmission distance can be significantly improved, thereby increasing the transmission communication distance of the high-speed interconnection protocol. In addition, since the smart network card also supports the high-speed interconnection protocol, the host processor and the slave memory pool only need to interact with the smart network card according to the existing communication transmission method of the high-speed interconnection protocol.

[0073] It should be noted that the memory data requested by the host may be memory object data, that is, the memory management system may perform memory management based on the object system, wherein the object system is an implementation of the memory decoupling technology, and reference may be made to the related technologies of the object system.

[0074] The following is an introduction to the structure of the Smart NIC. Figure 2 , Figure 2 This is a structural block diagram of a smart network card provided by an embodiment of the present invention. Both the host smart network card and the slave smart network card include:

[0075] High-speed interconnect protocol processing module (CXL Block), protocol controller (RDMA engine), encapsulation offload engine (Offload engine) and Ethernet physical layer module (Ethernet MAC). 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 offload engine is connected to the protocol controller, and the Ethernet physical layer module is connected to the encapsulation offload engine. In addition, in order to improve the ability of the encapsulation offload engine to cache network packets, a cache (such as DRAM, Dynamic Random Access Memory) can be added to it. In addition, in order to improve the offload capability and security of the protocol controller, a data offload unit (Dataoffload) and a security engine (Security engine) can be added to it. The following are the specific uses of each module in the smart network card:

[0076] High-speed interconnect protocol processing module, used to receive or send transaction layer packets;

[0077] The protocol controller is used to convert the transaction layer packet from the high-speed interconnection 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 interconnection protocol format to obtain a transaction layer packet, and send the transaction layer packet to the high-speed interconnection protocol processing module;

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

[0079] Ethernet physical layer module, used to receive or send network packets.

[0080] It can be seen that the high-speed interconnection protocol processing module, protocol controller, and encapsulation and unloading engine in the smart network card are important modules for realizing the conversion of transaction layer packets and network packets. Among them, the high-speed interconnection protocol processing module is used to connect to the processor or memory pool, and can receive and send transaction layer packets. For example, the high-speed interconnection protocol processing module can receive the transaction layer packet issued by the processor or memory pool based on the direct memory access protocol (DMA protocol, Direct Memory Access), and can also send the transaction layer packet to the processor or memory pool based on the direct memory access protocol. The protocol controller can obtain the transaction layer packet from the high-speed interconnection protocol processing module, and can convert the transaction layer packet from the high-speed interconnection protocol format to the remote direct memory access protocol format to obtain an intermediate data packet; it can also obtain the intermediate data packet from the encapsulation and unloading engine, convert the intermediate data packet from the remote direct memory access protocol format to the high-speed interconnection protocol format to obtain a transaction layer packet, and send the transaction layer packet to the high-speed interconnection protocol processing module. The encapsulation and unloading engine can encapsulate the intermediate data packet into a network packet, and also decapsulate the network packet into an intermediate data packet. In this way, the present invention can convert the transaction layer packet into a form that can be transmitted in the network through the smart network card to increase the communication transmission range of the high-speed interconnection protocol.

[0081] It should be noted that this embodiment does not limit the specific process of converting the transaction layer packet into the network packet, which can be set according to the actual application situation. For example, a simple method can be: treating the transaction layer packet as memory data, and encapsulating it as a network packet payload into a network packet. Of course, other more complex encapsulation methods can also be adopted, which can be set according to actual application requirements.

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

[0083] Based on the above embodiments, the present invention can provide 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 communicates with the host smart network card based on a high-speed interconnection protocol; the slave includes a slave memory pool and a slave smart network card, and the slave memory pool communicates with the slave smart network card based on a high-speed interconnection protocol; the host smart network card communicates with the slave smart network card based on a remote direct memory access protocol. In a specific application, the host smart network card can perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave smart network card, and can perform protocol conversion on the second network packet sent by the slave smart network 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 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 card. In other words, the present invention can set up smart network cards in both the host and the slave that indicate both the high-speed interconnection protocol and the remote direct memory access protocol, and the smart network card can transmit transaction layer packets in the high-speed interconnection protocol between the host and the slave through the network and the remote direct memory access protocol, thereby avoiding the defect that the high-speed interconnection protocol is limited by long-distance data transmission.

[0084] Based on the above embodiment, in order to improve memory access performance, the host may also include a host memory pool. Figure 3 , Figure 3 This is a block diagram of the structure of the second memory management system provided by an embodiment of the present invention. Among them, the host memory pool is arranged between the host processor and the host smart network card, and the host processor and the host memory pool, and the host memory pool and the host smart network card communicate based on a high-speed interconnection protocol. At this time, the first transaction layer packet sent by the host processor can be first sent to the host memory pool for processing. If the host memory pool cannot process it, the first transaction layer packet can be passed on to the host smart network card. In addition, the host processor can also continue to maintain a direct connection with the host smart network card (the dotted line indicates that the link is an optional link). The following are the specific uses of the host processor, the host memory pool, and the host smart network card:

[0085] The host processor is used 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;

[0086] A host memory pool is used 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 to be accessed by the first transaction layer packet is stored in the host memory pool; if it is determined that the memory data requested to be accessed 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 card, and the second transaction layer packet sent by the host smart network card is sent to the host processor.

[0087] It can be seen that after adding the host memory pool, the host processor can preferentially request access to memory data from the host memory pool. If it is determined that the host memory pool does not have the memory data to be accessed, the host processor can pass the first transaction layer packet to the host smart network card through the host memory pool for network transmission. In this way, the memory access efficiency on the host side can be effectively improved.

[0088] Of course, since the host processor also chooses to continue to maintain a direct connection with the host smart network card, it can also 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 network card.

[0089] Based on this, the host processor can also be used to:

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

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

[0092] If not, the first transaction layer packet is sent to the host intelligent network card.

[0093] The following is an introduction to the specific structure of the host memory pool and the slave memory pool. Figure 4 , Figure 4 A structural block diagram of a memory pool provided by an embodiment of the present invention. The host memory pool and the slave memory pool adopt a symmetrical design, both of which include 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, the transaction layer module is connected to the smart network card, 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 bottom layer of the slave memory pool. In addition, data can be exchanged between the transaction layer module and the link layer module through a buffer (such as a send buffer and a receive buffer). In addition, considering that the working clocks between the transaction layer and the link layer may be different, such as the clock frequency of the transaction layer is 250MHz, and the clock frequency of the link layer is 500MHz. Therefore, a clock module can be set in the memory pool, and the clock module is set between the transaction layer module and the link layer module to synchronize the clocks of the transaction layer module and the link layer module. In addition, to enhance security, a security engine can be set in the clock module to encrypt sensitive data to ensure that only authorized recipients can decrypt and access the data. The following are the specific uses of the transaction layer module and the link layer module:

[0094] The transaction layer module is used to perform transaction layer processing and send the processed transaction layer packets to the smart network card or link layer module;

[0095] The link layer module of the host memory pool is used to transfer transaction layer packets between the host processor and the transaction layer module;

[0096] The link layer module of the slave memory pool is used to send the transaction layer packet sent by the transaction layer module to its own memory for processing; and return the processing result of its own memory to the transaction layer module.

[0097] It can be seen that the present embodiment can delegate the processing mechanism of the high-speed interconnection protocol to the memory pool. Specifically, 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 interconnection protocol hierarchy, and its main functions are the assembly and disassembly of transaction layer packets, flow control mechanism and transaction sorting management. When the smart network card disassembles and packages the received data and sends the data packet to the transaction layer module, the transaction layer module is responsible for processing, assembling and sending the data packet downward to the link layer module and the physical layer. As an intermediate layer between the transaction layer module and the physical layer, the link layer module manages the link communication between the two connected high-speed interconnection devices. Its main function is to ensure the integrity of the transmitted data and perform error detection and correction on the data. For the transaction layer packet, the link layer mainly implements the Ack / Nak mechanism (acknowledgement / negative acknowledgment) to ensure the correct transmission of the data.

[0098] The link layer module of the host memory pool and the link layer module of the slave memory pool have slightly different functions. Since the host memory pool is a device between the host processor and the host smart network card, it is necessary to transfer transaction layer packets between the host processor and the transaction layer module. The link layer module of the slave memory pool is connected to the bottom layer of the slave memory pool, so it is necessary to send the transaction layer packets sent by the transaction layer module to its own memory for processing, and return the processing results of its own memory to the transaction layer module.

[0099] It can be seen that by setting the above memory pool, the embodiment of the present invention can delegate the processing of the high-speed interconnection protocol to the memory pool, which can reduce the I / O computing load of the processor. It should be noted that this embodiment does not limit the specific transaction layer processing content, and reference can be made to the relevant content of the CXL technology.

[0100] For further information, please refer to Figure 5 , Figure 5 A schematic diagram of the structure of a host provided by an embodiment of the present invention fully shows the connection relationship between the processor, the memory pool and the smart network card. It is worth noting that since the memory pool and the smart network card in this embodiment have the same structure, each server can be used as a host or a slave.

[0101] Based on the above embodiment, in order to further expand the communication range of the memory management system, this embodiment can also set a switching device in the memory management system for forwarding network packets between the host and the slave. Figure 6 , Figure 6 This is a block diagram of the structure of the third memory management system provided by an embodiment of the present invention. It can be seen that the switching device can be set between the host smart network card and the slave smart network card to forward the first network packet to the slave smart network card and forward the second network packet to the host smart network card. It is worth noting that the switching device can connect multiple hosts and multiple slaves to facilitate the interconnection of multiple hosts and multiple slaves.

[0102] Furthermore, when multiple hosts and multiple slaves are interconnected through a switching device, in order to ensure that the transaction layer packet of the host can be correctly forwarded to the corresponding slave, and the slave can correctly return the transaction layer packet to the host, it is necessary to add the information of the host and the slave in the transaction layer packet. To this end, the present embodiment can also make the following improvements to the host processor, the host smart network card, the slave memory pool, and the slave smart network card:

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

[0104] The host intelligent network card is further used to add a corresponding host address and a slave address in the first network packet according to a preset host identifier and a preset slave identifier in the first transaction layer packet when performing protocol conversion on the first transaction layer packet to obtain a first network packet;

[0105] A slave memory pool, used to add a preset host identifier and a preset slave identifier to a second transaction layer packet;

[0106] The slave intelligent network card is also used to add the corresponding host address and slave address in the second network packet according to the preset host identifier and the preset slave identifier in the second transaction layer packet when performing protocol conversion on the second transaction layer packet to obtain the second network packet.

[0107] It can be seen that the present embodiment can also add an identification adding function to the host processor and the slave memory pool to ensure that when generating a transaction layer packet, a preset host identification and a preset slave identification can be added to the transaction layer packet. The preset host identification and the preset slave identification are both unique identifications of the host and the slave. The present embodiment can also add an identification recognition function to the host smart network card and the slave smart network card to ensure that when the smart network card receives the transaction layer packet, it can add the corresponding host address and slave address (such as IP address, subnet mask, etc.) to the network packet according to the preset host identification and preset slave identification in the transaction layer. In this way, the present embodiment can transmit the identification and address information of the two transmitting parties through the transaction layer packet to ensure the correct forwarding of the transaction layer packet.

[0108] Furthermore, the host processor may load a preset remote storage index and query the remote storage index for the target slave where the memory data to be accessed is located to obtain the preset slave identifier of the target slave. The remote storage index is used to store the storage device corresponding to each memory data.

[0109] Based on this, the host processor can also be used to:

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

[0111] Add the preset host identifier and the preset slave identifier of the target slave to the first transaction layer packet.

[0112] Furthermore, after adding a switching device, there are two ways to connect the host and the slave: 1. Connect through the switching device; 2. Direct connection. Figure 7 The topology of the memory management system shown in Figure 7 A schematic diagram of the topological structure of a memory management system provided by an embodiment of the present invention. It can be seen that adjacent hosts and slaves can communicate directly in a direct connection manner to ensure the efficiency of close-range communication. In addition, adjacent hosts and slaves can also communicate through a switching device to improve redundancy. Hosts and slaves that are far apart can communicate through a switching device to ensure the communication distance. At this time, for the host, it can select a link on demand when accessing the slave. In order to increase the link selection function, this embodiment can also add a data position of a preset adjacent path identifier in the transaction layer packet. When the host processor generates a transaction layer packet, it can add a preset adjacent path identifier to the transaction layer packet to indicate that it is necessary to use a direct link with the slave to communicate. Furthermore, the host intelligent network card can determine the direct link between the host and the slave according to 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 is similar to the slave intelligent network card.

[0113] Based on this, the host processor is further used to add a preset adjacent path identifier to the first transaction layer packet;

[0114] The host intelligent network card is further configured to send the first network packet to the slave intelligent network card through the direct link between the host intelligent network card and the slave intelligent network card when determining that the first transaction layer packet has a preset adjacent path identifier;

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

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

[0117] It can be seen that by adding a preset host identifier, a preset slave identifier and a preset adjacent path identifier in the transaction layer packet, flexible transaction layer packet forwarding and forwarding link selection functions can be implemented, thereby improving the flexibility of memory management.

[0118] Furthermore, in order to add a preset host identifier, a preset slave identifier and a preset adjacent path identifier, this embodiment requires slight changes to the transaction layer packet. Specifically, a complete transaction layer packet consists of one or more TLP prefixes (TLPPrefix), a TLP header (TLPHeader), a data payload (DataPayload) and a TLP summary (TLPDigest), wherein the TLP prefix is ​​optional and is an optional item 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, routing mode, etc. The data payload field length is 0 to 1024DW (doubleword) and is used to transmit valid data. The TLP summary field is a cyclic redundancy check code (CRC) calculated based on the TLP header and the valid data payload, called an end-to-end CRC (Endpoint toendpoint CRC, ECRC). This embodiment focuses on optimizing the design of the TLP header. Specifically, there are 8 reserved bits between Byte 14 and Byte 15 in the TLP header, and the transmission path is selected through these 8 bits. Among them, bit 1 / 2 / 3 of Byte 14 is always 0, and bit 0 can be used as an identification bit for whether it is an adjacent path or a non-adjacent path of the server. When bit 0 is set to 0, it indicates that the transmission link is an adjacent link; when bit 0 is set to 1, it indicates that the transmission link is a non-adjacent link. Bit 7 / 6 / 5 / 4 of Byte 15 is used to set the server identifier (host identifier, slave identifier). Therefore, the preset host identifier, preset slave identifier, and preset adjacent path identifier are set in the reserved position in the header of the transaction layer packet.

[0119] Furthermore, the switching device may also include extended memory for sharing by the host and slave. Specifically, the switching device may include a first smart network card, a second smart network card, a controller and extended memory, the first smart network card is connected to the host smart network card and the controller, the second smart network card is connected to the slave smart network card and the controller, and the controller is connected to the extended memory; the host smart network card and the first smart network card, the slave smart network card and the second smart network card communicate based on the remote direct memory access protocol, and the controller and the first smart network card, and the controller and the second smart network card communicate based on the high-speed interconnection protocol. The following are the specific uses of the first smart network card, the second smart network card, and the controller:

[0120] The first smart network card is used to perform protocol conversion on the first network packet to obtain a first transaction layer packet, and send it to the controller; 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 network card;

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

[0122] The second smart network card 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 network card; perform protocol conversion on the second network packet sent by the slave smart network card to obtain a second transaction layer packet, and send it to the controller.

[0123] It can be seen that the extended memory of the high-speed interconnection protocol can also be set in the switching device, and the host can obtain memory data from the switching device and can also pass the transaction layer packet to the slave through the switching device.

[0124] For further understanding, please refer to Figure 8 , Figure 8This is a structural block diagram of the fourth memory management system provided by an embodiment of the present invention, which fully shows the specific structure of the host, slave, and switching device. In the host (Host), the host processor itself is provided with 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, input and output memory management unit), CXL.mem (CXL memory protocol), CXL.io (CXL input and output protocol), and optionally, it can also interact with the smart network card through the consistency bridge (Coh Bridge) and CXL.io. CXL modules and areas are provided in the single-machine memory pool and the smart network card for processing CXL transactions. The same applies to the slave (Slave). In addition, a switching device (CXL Switch) is also provided in the memory management system, which has a smart network card, a controller (CXL Controller) and an extended memory (CXLExpander memory), which can exchange data between the host and the slave, and also provide shared memory for the host and the slave.

[0125] Based on the above embodiments, the memory management method provided by the present invention is introduced below. Fig. 9 , Fig. 9 A flowchart of a memory management method provided by an embodiment of the present invention, which is applied to the memory management system as described above, may include:

[0126] S901, the host intelligent network card 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 intelligent network card; wherein the first transaction layer packet includes a memory access request;

[0127] S902, the slave intelligent network card performs protocol conversion on the first network packet to obtain a first transaction layer packet, and sends the first transaction layer packet to the slave memory pool;

[0128] S903, the slave intelligent 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 the second network packet to the host intelligent network card; wherein the second transaction layer packet includes memory data;

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

[0130] Based on the above embodiments, the present invention can provide a memory management method, which is applied to the above memory management system. In a specific application, the host intelligent network card can perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and send it to the slave intelligent network card, and can perform protocol conversion on the second network packet sent by the slave intelligent network 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 intelligent network 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 intelligent network card. That is, the present invention can set an intelligent network card that indicates both the high-speed interconnection protocol and the remote direct memory access protocol in both the host and the slave, and the intelligent network card can transmit the transaction layer packet in the high-speed interconnection protocol between the host and the slave through the network and the remote direct memory access protocol, thereby avoiding the defect that the high-speed interconnection protocol is limited by long-distance data transmission.

[0131] Optionally, the host further includes a host memory pool, and the host memory pool is arranged between the host processor and the host smart network card; the method further includes:

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

[0133] If the host memory pool determines that the memory data requested to be accessed by the first transaction layer packet is stored in the host memory pool, the host memory pool generates a second transaction layer packet using the memory data and sends the packet to the host processor;

[0134] If the host memory pool determines that the memory data requested to be accessed 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 card, and the second transaction layer packet sent by the host smart network card is sent to the host processor;

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

[0136] In this embodiment, after adding the host memory pool, the host processor can preferentially request access to the memory data from the host memory pool. If it is determined that the host memory pool does not contain the memory data to be accessed, the host processor can pass the first transaction layer packet to the host smart network card through the host memory pool for network transmission. In this way, the memory access efficiency of the host side can be effectively improved.

[0137] Optionally, the above method further includes:

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

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

[0140] If not, the first transaction layer packet is sent to the host intelligent network card.

[0141] In this embodiment, the host processor can continue to maintain a direct connection with the host intelligent network card. At this time, before accessing the 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 intelligent network card to improve communication efficiency.

[0142] Optionally, the host memory pool and the slave memory pool both include a transaction layer module and a link layer module, the transaction layer module is connected to the link layer module, 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 method further includes:

[0143] The transaction layer module performs transaction layer processing and sends the processed transaction layer packets to the smart network card or link layer module;

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

[0145] The link layer module of the slave memory pool sends the transaction layer packet sent by the transaction layer module to its own memory for processing; and returns the processing result of its own memory to the transaction layer module.

[0146] Optionally, the host memory pool and the slave memory pool further include a clock module, which is arranged 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.

[0147] In this embodiment, the processing mechanism of the high-speed interconnection protocol can be delegated to the memory pool, and the transaction layer module and link layer module in the memory pool process the transaction layer packet, thereby reducing the I / O computing load of the processor.

[0148] Optionally, the host intelligent network card and the slave intelligent network card both include a high-speed interconnection protocol processing module, a protocol controller, an encapsulation and unloading engine, and an Ethernet physical layer module. The high-speed interconnection protocol processing module is connected to the host processor or the slave memory pool, the protocol controller is connected to the high-speed interconnection protocol processing module, the encapsulation and unloading engine is connected to the protocol controller, and the Ethernet physical layer module is connected to the encapsulation and unloading engine. The above method also includes:

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

[0150] 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 offloading engine;

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

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

[0153] The encapsulation and unloading engine decapsulates the network packet into an intermediate data packet and sends the intermediate data packet to the protocol controller;

[0154] The protocol controller converts the intermediate data packet from the remote direct memory access protocol format to the high-speed interconnection protocol format to obtain a transaction layer packet, and sends the transaction layer packet to the high-speed interconnection protocol processing module.

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

[0156] Optionally, the memory management system further includes a switching device, and the switching device is arranged between the host intelligent network card and the slave intelligent network card; the above method further includes:

[0157] The switching device forwards the first network packet to the slave intelligent network card, and forwards the second network packet to the host intelligent network card.

[0158] Optionally, the above method further includes:

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

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

[0161] The slave memory pool adds a preset host identifier and a preset slave identifier to the second transaction layer packet;

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

[0163] Optionally, the above method further includes:

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

[0165] Add the preset host identifier and the preset slave identifier of the target slave to the first transaction layer packet.

[0166] In this embodiment, when multiple hosts and multiple slaves are interconnected through a switching device, in order to ensure that the transaction layer packet of the host can be correctly forwarded to the corresponding slave, and the slave can correctly return the transaction layer packet to the host, an identifier adding function can be added to the host processor and the slave memory pool to ensure that when generating a transaction layer packet, a preset host identifier and a preset slave identifier can be added to the transaction layer packet. The preset host identifier and the preset slave identifier are both unique identifiers of the host and the slave. This embodiment can also add an identifier recognition function to the host smart network card and the slave smart network card to ensure that when the smart network card receives the transaction layer packet, it can add the corresponding host address and slave address to the network packet according to the preset host identifier and the preset slave identifier in the transaction layer. In this way, this embodiment can transmit the identifier and address information of the two transmitting parties through the transaction layer packet to ensure the correct forwarding of the transaction layer packet.

[0167] Optionally, the above method further includes:

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

[0169] When determining that the first transaction layer packet has a preset adjacent path identifier, the host intelligent network card sends the first network packet to the slave intelligent network card through a direct link between the host intelligent network card and the slave intelligent network card;

[0170] The slave memory pool adds a preset adjacent path identifier to the second transaction layer packet;

[0171] The slave intelligent network card is also used to send the second network packet to the host intelligent network card through the direct link between the slave intelligent network card and the host intelligent network card when it is determined that the second transaction layer packet has a preset adjacent path identifier.

[0172] In this embodiment, the host can select a link as needed when accessing the slave. In order to increase the link selection function, the present embodiment can also add a data location of a preset adjacent path identifier in the transaction layer packet. When the host processor generates a transaction layer packet, it can add a preset adjacent path identifier to the transaction layer packet to indicate that a direct link with the slave is required for communication. Furthermore, the host smart network card 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 is the same as the slave smart network card.

[0173] Optionally, the preset host identifier, the preset slave identifier and the preset adjacent path identifier are set in a reserved position in the packet header of the transaction layer packet.

[0174] Optionally, the switching device includes a first smart network card, a second smart network card, a controller and an extended memory, the first smart network card is connected to the host smart network card and the controller, the second smart network card is connected to the slave smart network card and the controller, and the controller is connected to the extended memory; the host smart network card and the first smart network card, the slave smart network card and the second smart network card communicate based on the remote direct memory access protocol, and the controller and the first smart network card, and the controller and the second smart network card communicate based on the high-speed interconnection protocol; the above method also includes:

[0175] The first intelligent network card performs protocol conversion on the first network packet to obtain a first transaction layer packet, and sends the first transaction layer packet to the controller;

[0176] If the controller determines that the memory data requested to be accessed by the first transaction layer packet is stored in the extended memory, the controller generates a second transaction layer packet using the memory data and sends the second transaction layer packet to the host processor;

[0177] If the controller determines that the memory data requested to be accessed 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 card;

[0178] The second intelligent network card performs protocol conversion on the first transaction layer packet sent by the controller to obtain a first network packet, and sends the first network packet to the slave intelligent network card;

[0179] The second intelligent network card performs protocol conversion on the second network packet sent by the slave intelligent network card to obtain a second transaction layer packet, and sends the second transaction layer packet to the controller;

[0180] The controller sends the second transaction layer packet sent by the second smart network card to the first smart network card;

[0181] The first intelligent network card performs protocol conversion on the second transaction layer packet sent by the controller to obtain a second network packet, and sends the second network packet to the host intelligent network card.

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

[0183] Based on the above embodiment, the following will introduce the method in which the application in the host obtains memory data from the slave in the above system structure in combination with a specific schematic diagram. Fig.10 , Fig.10A flowchart of memory data acquisition provided by an embodiment of the present invention. When an application needs to access a data object in a 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 directly loads the object 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 directly loads the object from the cache. If the object is not in the memory pool, the system queries the remote storage index service to determine the storage location of the object. Once the object location is determined, the system will establish a high-speed CXL connection (high-speed interconnect protocol connection) and communicate with the remote daemon through the CXL agent (high-speed interconnect protocol agent) to prepare to perform an RDMA read (remote direct memory access read) operation. The RDMA operation allows the system to retrieve data objects directly from remote CXL devices and transfer data to local memory at high speed. Throughout the process, the system performs concurrency control and security checks to ensure data consistency and security. At the same time, the system continuously monitors performance and performs data management tasks, such as processing hot pages and locking mechanisms, to optimize data access and system performance. Once the data is successfully transferred and all monitoring and management tasks are completed, the workflow ends. In this way, the RDMA system combined with CXL technology can provide high-performance, low-latency data access while ensuring data security and system reliability.

[0184] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the memory management method introduced in the above embodiment when the computer program / instruction is executed by a processor.

[0185] Since the embodiments of the computer program product part correspond to the embodiments of the memory management method and system part, please refer to the description of the embodiments of the memory management method and system part for the embodiments of the computer program product part, which will not be repeated here.

[0186] An embodiment of the present invention further provides a non-volatile computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the memory management method described in the above embodiment is implemented.

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

[0188] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0189] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0190] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0191] The above is a detailed introduction to a memory management system, method, program product and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A memory management system, characterized in that: The invention comprises a host and a slave, wherein the host comprises a host processor and a host smart network card, wherein the host processor communicates with the host smart network card based on a high-speed interconnection protocol; the slave comprises a slave memory pool and a slave smart network card, wherein the slave memory pool communicates with the slave smart network card based on the high-speed interconnection protocol, and the host smart network card communicates with the slave smart network card based on a remote direct memory access protocol; The host intelligent network card is used to perform protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and send the first network packet to the slave intelligent network card; Performing protocol conversion on the second network packet sent by the slave intelligent network card to obtain a second transaction layer packet, and sending the second transaction layer packet to the host processor; wherein the first transaction layer packet includes a memory access request, and the second transaction layer packet includes memory data; The slave intelligent network card 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; 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 intelligent network card; The slave memory pool includes a transaction layer module and a link layer module, the transaction layer module is connected to the link layer module, and the transaction layer module is connected to the slave intelligent network card; The transaction layer module is used to perform transaction layer processing and send the processed transaction layer packet to the slave intelligent network card or the link layer module; The link layer module of the slave memory pool is used to send the transaction layer packet sent by the transaction layer module to its own memory for processing; and return the processing result of its own memory to the transaction layer module.

2. The memory management system according to claim 1, characterized in that: The host further includes a host memory pool, wherein the host memory pool is arranged between the host processor and the host smart network card; The host processor is configured to send the first transaction layer packet to the host memory pool; receiving a second transaction layer packet returned by the host memory pool; The host memory pool is used to generate the second transaction layer packet using the memory data and send it to the host processor if it is determined that the memory data accessed by the first transaction layer packet is stored in the host memory pool; If it is determined that the memory data requested to be accessed by the first transaction layer packet is not stored in the host memory pool, the first transaction layer packet is sent to the host intelligent network card, and the second transaction layer packet sent by the host intelligent network 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: Determining whether the memory data to be accessed is stored in the host memory pool; If yes, the first transaction layer packet is sent to the host memory pool.

4. The memory management system according to claim 2, characterized in that: The host memory pool includes: A transaction layer module and a link layer module, wherein the transaction layer module in the host memory pool is connected to the link layer module in the host memory pool, the transaction layer module in the host memory pool is connected to the host smart network card, and the link layer module in the host memory pool is connected to the host processor; The transaction layer module in the host memory pool is used to perform transaction layer processing and send the processed transaction layer packet to the host intelligent network card or the link layer module in the host memory pool; The link layer module of the host memory pool is used to transfer transaction layer packets between the host processor and 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 further include: A clock module, wherein the clock module is arranged between the transaction layer module and the link layer module, and is used for performing clock synchronization between the transaction layer module and the link layer module.

6. The memory management system according to claim 1, characterized in that: The host intelligent network card and the slave intelligent network card both include: A high-speed interconnect protocol processing module, a protocol controller, an encapsulation and unloading engine, and an Ethernet physical layer module, wherein 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 unloading engine is connected to the protocol controller, and the Ethernet physical layer module is connected to the encapsulation and unloading engine; The high-speed interconnection protocol processing module is used to receive or send transaction layer packets; The protocol controller is used to convert the transaction layer packet from the high-speed interconnection 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 interconnection protocol format to obtain a transaction layer packet, and send the transaction layer packet to the high-speed interconnection 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 packet.

7. The memory management system according to any one of claims 1 to 6, characterized in that: Also includes: A switching device is arranged between the host intelligent network card and the slave intelligent network card, and is used to forward the first network packet to the slave intelligent network card and forward the second network packet to the host intelligent network 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 intelligent network card is further configured to add a corresponding host address and a slave address in the first network packet according to a preset host identifier and a preset slave identifier in the first transaction layer packet when performing protocol conversion on the first transaction layer packet to obtain the first network packet; 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 intelligent network card is also used to add the corresponding host address and slave address in the second network packet according to the preset host identifier and preset slave identifier in the second transaction layer packet when performing protocol conversion on the second transaction layer packet to obtain the second network packet.

9. The memory management system according to claim 8, characterized in that: The host processor is further configured to: Querying the target slave machine where the memory data to be accessed is located in the preset remote storage index, and obtaining the preset slave machine identifier of the target slave machine; A preset host identifier and a preset slave identifier of the target slave are added to the first transaction layer packet.

10. The memory management system according to claim 8, characterized in that: The host processor is further configured to add a preset adjacent path identifier to the first transaction layer packet; The host intelligent network card is further configured to send the first network packet to the slave intelligent network card through a direct link between the host intelligent network card and the slave intelligent network card when determining that the first transaction layer packet has the preset adjacent path identifier; The slave memory pool is further used to add a preset adjacent path identifier to the second transaction layer packet; The slave intelligent network card is further used to send the second network packet to the host intelligent network card through the direct link between the slave intelligent network card and the host intelligent network card when it is determined that the second transaction layer packet has the preset adjacent path identifier.

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 a reserved position in the packet header of the transaction layer packet.

12. The memory management system according to claim 7, characterized in that: The switching device comprises: A first smart network card, a second smart network card, a controller and an extended memory, wherein the first smart network card is connected to the host smart network card and the controller, the second smart network card is connected to the slave smart network card and the controller, and the controller is connected to the extended memory; the host smart network card and the first smart network card, the slave smart network card and the second smart network card communicate based on the remote direct memory access protocol, and the controller and the first smart network card, and the controller and the second smart network card communicate based on the high-speed interconnection protocol; The first smart network card is used to perform protocol conversion on the first network packet to obtain the first transaction layer packet, and send it to the controller; 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 network card; The controller is configured to generate the second transaction layer packet using the memory data and send it to the host processor if it is determined that the memory data requested to be accessed by the first transaction layer packet is stored in the extended memory; if it is determined that the memory data requested to be accessed 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 card, and send the second transaction layer packet sent by the second smart network card to the first smart network card; The second smart network card 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 network card; perform protocol conversion on the second network packet sent by the slave smart network card to obtain a second transaction layer packet, and send it to the controller.

13. A memory management method, characterized in that: Applied to the memory management system according to any one of claims 1 to 12, the method comprising: The host intelligent network card performs protocol conversion on the first transaction layer packet sent by the host processor to obtain a first network packet, and sends the first network packet to the slave intelligent network card; wherein the first transaction layer packet includes a memory access request; The slave intelligent network card performs protocol conversion on the first network packet to obtain the first transaction layer packet, and sends the first transaction layer packet to the slave memory pool; The slave intelligent 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 the second network packet to the host intelligent network card; wherein the second transaction layer packet contains memory data; The host intelligent network card performs protocol conversion on the second network packet sent by the slave intelligent network card to obtain the second transaction layer packet, and sends the second transaction layer packet to the host processor; The slave memory pool includes a transaction layer module and a link layer module, the transaction layer module is connected to the link layer module, and the transaction layer module is connected to the slave intelligent network card; the method also includes: The transaction layer module performs transaction layer processing and sends the processed transaction layer packet to the slave intelligent network card or link layer module; The link layer module of the slave memory pool sends the transaction layer packet sent by the transaction layer module to its own memory for processing; and returns the processing result of its own memory to the transaction layer module.

14. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the memory management method as claimed in claim 13 is implemented.

15. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the memory management method according to claim 13 is implemented.

Citation Information

Patent Citations

  • Interface for remote memory

    CN117743253A

  • Memory extension device, operating method of memory extension device, and computer readable storage medium

    CN118897710A