Data transmission method, transmission channel allocation method, computing device and management device
By establishing target storage space between computing devices in high-performance computing clusters and using CXL storage devices for direct data transmission, the problems of slow data transmission speed and high latency in the cluster are solved, and efficient data transmission and performance improvement are achieved.
Patent Information
- Application Number
- CN202311786775.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-06-24
AI Technical Summary
In high-performance computing clusters, the speed of data transmission between servers is limited by network bandwidth and latency, resulting in overall performance limitations.
By establishing a target storage space between computing devices, using CXL storage devices for data transmission, avoiding data transmission over the network, and directly writing and reading data between storage devices.
Improves data transmission efficiency, reduces latency and bandwidth requirements, improves the overall performance of the cluster, and reduces hardware configuration costs.
Smart Images

Figure CN120201024A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and in particular, to a data transmission method, a transmission channel allocation method, a computing device, and a management device. Background Art
[0002] With the rapid development of technology, the scale of clusters ranging from big data to artificial intelligence training clusters and clusters for high-performance computing has gradually expanded. When the number of servers in a cluster gradually increases, the data transmission speed between servers affects the overall performance of the cluster.
[0003] In related technologies, data transmission between multiple servers in a cluster is usually performed through network cards installed on the servers. When data is transmitted between servers through network cards and traditional networks, network transmission protocols need to be used and protocol conversion is required. Due to the limited network bandwidth and network transmission speed when transmitting data over the network, if the amount of data to be transmitted is large, there will be problems such as slow data transmission speed and high network latency. Therefore, data transmission through network cards will limit the overall performance of the cluster. Summary of the Invention
[0004] Embodiments of this application provide a data transmission method, a transmission channel allocation method, a computing device, and a management device, which can improve data transmission efficiency and enhance the overall performance of the cluster.
[0005] To achieve the above technical objectives, the embodiments of this application adopt the following technical solutions:
[0006] In a first aspect, an embodiment of this application provides a data transmission method, which is applied to a first computing device. The method includes: determining the state of a first storage block in a target storage space based on the positions of a current write operation and a current read operation recorded in metadata blocks of the target storage space; where the target storage space is a target transmission channel between the first computing device and a second computing device, and a CXL storage device including the target storage space is connected to both the first computing device and the second computing device; the position of the current write operation is the first storage block, and the first storage block is used to store a data block transmitted from the first computing device to the second computing device. The state of the first storage block includes: an operable state, or, a non-operable state; in the case where the state of the first storage block is the operable state, writing the first data block into the first storage block so that the second computing device reads the first data block from the first storage block.
[0007] The structure of the target transmission channel proposed in the above method is simple, which can improve the data transmission efficiency and enhance the overall performance of the cluster. In addition, the first computing device and the second computing device realize data transmission through the target storage space provided by the CXL storage device. This method does not require data to be transmitted through a network and has the advantages of fast transmission speed, high bandwidth, and low latency. In addition, this method does not require network cards and switches with high configurations. Therefore, the method proposed in the embodiments of the present application can reduce the hardware configuration cost.
[0008] In a possible implementation manner, the target storage space includes multiple storage blocks. The first storage block is any one of the multiple storage blocks. Metadata is recorded in the metadata block, and the metadata includes: the storage capacities of the multiple storage blocks. Before writing the first data block into the first storage block when the state of the first storage block is an operable state, the method further includes: obtaining the storage capacities of the multiple storage blocks from the metadata block; dividing the target data into multiple data blocks based on the storage capacity of each storage block; where the target data is the data that the first computing device needs to send to the second computing device, and the multiple data blocks include the first data block, and the storage capacity required by the first data block is less than or equal to the storage capacity of the first storage block.
[0009] It can be understood that the first computing device divides the target data to be transmitted into multiple data blocks based on the number and storage capacity of the storage blocks, so as to write each data block into each storage block. Subsequently, the second computing device can read the data blocks from each storage block to implement parallel execution of read operations and write operations, thereby improving the data transmission efficiency.
[0010] In another possible implementation manner, determining the state of the first storage block in the target storage space based on the current write operation position and the current read operation position recorded in the metadata block of the target storage space includes: obtaining the current write operation position and the current read operation position of the target storage space from the metadata block; when the current write operation position and the current read operation position are different, the first computing device determines that the state of the first storage block in the target storage space is an operable state.
[0011] It can be understood that the target storage space includes multiple storage blocks. The first computing device performs write operations on the multiple storage blocks in sequence, and the second computing device performs read operations on the multiple storage blocks in sequence. After all the storage blocks are written, the first computing device repeats the write operations on the multiple storage blocks from the beginning. To avoid the second computing device being unable to read the complete target data due to data overwrite, the first computing device needs to perform write operations after the second computing device reads the data in the storage block. Therefore, the above optional method can quickly determine the operation status of the first storage block and avoid overwriting data.
[0012] In another possible implementation, the position of the current write operation is the position currently indicated by the write pointer, and the position of the current read operation is the position currently indicated by the read pointer.
[0013] It can be understood that the position of the current write operation and the position of the current read operation can be quickly and accurately determined through the pointer, and this implementation is simple to operate.
[0014] In another possible implementation, metadata is recorded in the metadata block, and the metadata includes the position of the current write operation. After writing the first data block into the first storage block, the method further includes: in the metadata recorded in the metadata block, updating the position of the current write operation from the first storage block to the next storage block.
[0015] It can be understood that since the first computing device performs write operations on the storage blocks in sequence, after the write operation on the first storage block is completed, the position of the current write operation needs to be updated so as to continue writing data to the next storage block, thereby completing data transmission.
[0016] In another possible implementation, metadata is recorded in the metadata block, and the metadata further includes: the storage location index of the data block, and the storage location index of the data block is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located. The method further includes: setting an identifier for the first data block; when the status of the first storage block is an operable state, after writing the first data block into the first storage block, the method further includes: at the storage location index of the data block in the metadata, recording the correspondence between the identifier of the first data block and the identifier of the first storage block.
[0017] It can be understood that since the first computing device divides the target data into multiple data blocks, in order to avoid confusing the order of the multiple data blocks after the second computing device obtains the multiple data blocks, an identifier can be set for each data block, and the correspondence between the identifier and the identifier of the storage block where it is located is recorded in the metadata block. Subsequently, the second computing device splices the multiple data blocks into the complete target data based on the identifier of each data block.
[0018] In another possible implementation, the method further includes: when the first computing device writes all the data blocks of the target data into the target storage space, recording an indication flag indicating the completion of the transmission of the target data in the metadata block; the indication flag indicating the completion of the transmission of the target data is used to indicate that the second computing device ends the read operation on the target storage space after obtaining the target data.
[0019] It can be understood that since the second computing device reads each storage block in sequence, when the second computing device obtains the indication flag that the transmission of the target data is completed and obtains the target data, it can stop the read operation on the storage block to save the computing resources of the second computing device.
[0020] In another possible implementation, the metadata block records metadata, which includes the identifier of the first computing device, the identifier of the second computing device, the position of the current write operation, and the position of the current read operation. The identifier of the first computing device is the sender identifier, and the identifier of the second computing device is the receiver identifier.
[0021] It can be understood that by recording the sender identifier and the receiver identifier in the metadata block, the first computing device can verify the sender identifier and the receiver identifier during data transmission, improving the reliability of data transmission.
[0022] In another possible implementation, both the first computing device and the second computing device are connected to the management unit, and the management unit is used to manage the storage space of one or more CXL storage devices. Before determining the state of the first storage block in the target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space, the method further includes: obtaining information about the target transmission channel from the management unit; the information about the target transmission channel includes: the identifier of the target transmission channel, the identifier of the first computing device, the identifier of the second computing device, the address of the target storage space, and the storage capacity of the target storage space.
[0023] It can be understood that the management unit is used to manage the storage space of the CXL storage device. By obtaining the target transmission channel from the management unit, a dedicated data transmission channel can be obtained. This transmission channel has the advantages of fast transmission speed, high bandwidth, and low latency. Therefore, using this transmission channel can improve the data transmission efficiency.
[0024] In a second aspect, an embodiment of the present application provides a data transmission method applied to a second computing device. The method includes: determining the state of a first storage block in a target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space; where the target storage space is the target transmission channel of the first computing device and the second computing device, and the CXL storage device including the target storage space is connected to both the first computing device and the second computing device; the position of the current read operation is the first storage block, and the first storage block is used to store the data block transmitted from the first computing device to the second computing device. The state of the first storage block includes: an operable state, or, an inoperable state; in the case where the state of the first storage block is an operable state, reading a first data block from the first storage block.
[0025] It can be understood that the second computing device obtains the first data block sent by the first computing device from the first storage block in the target transmission channel, thereby realizing data transmission with the first computing device. This method does not require data transmission through a network, and has the advantages of fast transmission speed, high bandwidth, and low latency. In addition, this method does not require a network card and switch with high configuration. Therefore, the method proposed in the embodiments of the present application can reduce the hardware configuration cost.
[0026] In a possible implementation, metadata is recorded in the metadata block, and the metadata includes the identifier of the first computing device, the identifier of the second computing device, the position of the current write operation, and the position of the current read operation. The identifier of the first computing device is the sender identifier, and the identifier of the second computing device is the receiver identifier.
[0027] It can be understood that by recording the sender identifier and the receiver identifier in the metadata block, the second computing device can verify the sender identifier and the receiver identifier when reading data, improving the reliability of data transmission.
[0028] In another possible implementation, determining the status of the first storage block in the target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space includes: obtaining the position of the current write operation and the position of the current read operation of the target storage space from the metadata block; when the position of the current read operation is different from the position of the current write operation, the second computing device determines that the status of the first storage block in the target storage space is an operable state.
[0029] It can be understood that the target storage space includes multiple storage blocks. The first computing device performs write operations on the multiple storage blocks in sequence, and the second computing device performs read operations on the multiple storage blocks in sequence. After all the storage blocks are written, the first computing device repeats the write operation on the multiple storage blocks from the beginning. To avoid the second computing device missing data read from the first storage block, the second computing device needs to wait for the first computing device to write data into the storage block and then perform a read operation on the storage block. Therefore, the above optional method can quickly determine the operation status of the first storage block and avoid missing data reading.
[0030] In another possible implementation, the position of the current write operation is the position currently indicated by the write pointer, and the position of the current read operation is the position currently indicated by the read pointer.
[0031] It can be understood that the position of the current write operation and the position of the current read operation can be quickly and accurately determined through the pointer, and this implementation is simple to operate.
[0032] In another possible implementation, metadata is recorded in the metadata block. The metadata includes the position of the current read operation. After reading the first data block from the first storage block, the method further includes: in the metadata recorded in the metadata block, updating the position of the current read operation from the first storage block to the next storage block.
[0033] It can be understood that since the second computing device performs read operations on the storage blocks in sequence, when the read operation on the first storage block is completed, the position of the current write operation needs to be updated to continue reading the data in the next storage block, thereby completing the data transmission.
[0034] In another possible implementation, metadata is recorded in the metadata block. The metadata includes: the storage location index of the data block, and the storage location index of the data block is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located. The method further includes: when reading the first data block from the first storage block, obtaining the identifier of the first data block from the metadata block of the first storage block; wherein, the storage location index of the data block recorded in the metadata block of the first storage block includes the correspondence between the identifier of the first data block and the identifier of the first storage block; deleting the correspondence between the identifier of the first data block and the identifier of the first storage block in the metadata block of the first storage block.
[0035] It can be understood that the second computing device obtains the identifier of the first data block, which is used to subsequently splice multiple data blocks in the target data into the complete target data based on the identifier of each data block, avoiding confusion of the data lines of multiple data blocks. The second computing device deletes this correspondence, which can indicate that the second computing device has obtained the data in this storage block. When the first computing device writes data to this storage block again later, it can record the correspondence between the identifier of the new data and the identifier of this storage block again.
[0036] In another possible implementation, the method further includes: when the second computing device obtains an indication flag indicating that the target data has been sent in the metadata block and obtains the target data, recording an indication flag indicating that the target data has been obtained in the metadata block; wherein, the target data is the data that the first computing device needs to send to the second computing device, and the indication flag indicating that the target data has been obtained is used to indicate that the data transmission between the first computing device and the second computing device is completed.
[0037] It can be understood that the second computing device records the indication flag indicating that the target data has been obtained, and the first computing device can determine that the second computing device has received the target data based on this flag, improving the reliability of data transmission.
[0038] In another possible implementation, both the first computing device and the second computing device are connected to the management unit, and the management unit is used to manage the storage space of one or more CXL storage devices. Before determining the state of the first storage block in the target storage space based on the positions of the current write operation and the current read operation recorded in the metadata block of the target storage space, the method further includes: obtaining information about the target transmission channel from the management unit; the information about the target transmission channel includes: the identifier of the target transmission channel, the identifier of the first computing device, the identifier of the second computing device, the address of the target storage space, and the storage capacity of the target storage space.
[0039] It can be understood that the management unit is used to manage the storage space of the CXL storage device. Through the target transmission channel obtained from the management unit, an exclusive data transmission channel can be obtained, and this transmission channel has the advantages of fast transmission speed, high bandwidth, and low latency. Therefore, using this transmission channel can improve the data transmission efficiency.
[0040] In a third aspect, an embodiment of the present application provides a method for allocating a transmission channel, which is applied to a management unit. The management unit is connected to one or more CXL storage devices, and the management unit is used to manage the CXL storage space of one or more CXL storage devices. The method includes: allocating a target storage space in the CXL storage space for the first computing device and the second computing device based on the data transmission requirements between the first computing device and the second computing device; the CXL storage device to which the target storage space belongs is connected to both the first computing device and the second computing device, and the target storage space is used as the target transmission channel for data transmission between the first computing device and the second computing device; dividing the target storage space into a metadata block and a storage block; where the metadata block is used to record the metadata of the target storage space; the metadata includes the position of the current write operation and the position of the current read operation; the storage block is used to store at least some of the data blocks in the target data transmitted from the first computing device to the second computing device; sending the information about the target transmission channel to the first computing device and the second computing device respectively, so that the first computing device writes at least some of the data blocks into the corresponding storage block based on the metadata in the metadata block of the target storage space; the information about the target transmission channel includes: the identifier of the first computing device, the identifier of the second computing device, the identifier of the target transmission channel, the address of the target storage space, and the storage capacity of the target storage space.
[0041] It can be understood that the management unit allocates a target transmission channel that meets the requirements for the first computing device and the second computing device based on the data transmission requirements between the first computing device and the second computing device. The structure of this transmission channel is simple, which is convenient for the computing device to quickly obtain the metadata in the transmission channel to complete data writing and reading. Therefore, the structure of the transmission channel proposed by this method can improve the data transmission efficiency.
[0042] In another possible implementation, the number of storage blocks is multiple, and the multiple storage blocks are used to enable the first computing device to divide the target data into multiple data blocks based on the storage capacity of the multiple storage blocks.
[0043] It can be understood that the management unit divides the target storage space into multiple storage blocks, and subsequently, the first computing device and the second computing device can implement parallel execution of read operations and write operations, improving the efficiency of reading and writing.
[0044] In a fourth aspect, an embodiment of the present application provides a computing device, where the computing device applies to each module of the data transmission method in the first aspect or any possible implementation manner in the first aspect; or, the computing device applies to each module of the data transmission method in the second aspect or any possible implementation manner in the second aspect.
[0045] In a fifth aspect, an embodiment of the present application provides a management device, where the management device applies to each module of the transmission channel allocation method in the third aspect or any possible implementation manner in the third aspect.
[0046] In a sixth aspect, an embodiment of the present application provides a computing device, including a memory and a processor. The memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the computing device is caused to execute the data transmission method in the first aspect and any possible implementation manner thereof; or, when the processor executes the computer instructions, the computing device is caused to execute the data transmission method in the second aspect and any possible implementation manner thereof.
[0047] In a seventh aspect, an embodiment of the present application provides a management device, including a processor. The processor and the memory are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the computing device is caused to execute the data transmission method in the third aspect and any possible implementation manner thereof.
[0048] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, and the computer-readable storage medium includes computer instructions. Wherein, when the computer instructions run on a computing device, the computing device is caused to execute the data transmission method in the first aspect and any possible implementation manner thereof; or, when the computer instructions run on a computing device, the computing device is caused to execute the data transmission method in the second aspect and any possible implementation manner thereof; or, when the computer instructions run on a management device, the management device is caused to execute the transmission channel allocation method in the third aspect and any possible implementation manner thereof.
[0049] In a ninth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions run on a computing device, the computing device is caused to execute the data transmission method as described in the first aspect and any possible implementation thereof; or, when the computer instructions run on a computing device, the computing device is caused to execute the data transmission method as described in the second aspect and any possible implementation thereof; or, when the computer instructions run on a management device, the management device is caused to execute the transmission channel allocation method as described in the third aspect and any possible implementation thereof.
[0050] For the specific descriptions of the fourth aspect to the ninth aspect and various implementation manners in the embodiments of the present application, reference may be made to the detailed descriptions in the first aspect, the second aspect, or the third aspect and various implementation manners thereof; and, for the beneficial effects of the fourth aspect to the ninth aspect and various implementation manners, reference may be made to the beneficial effect analysis in the first aspect, the second aspect, or the third aspect and various implementation manners thereof, which will not be elaborated herein.
[0051] These aspects or other aspects of the embodiments of the present application will be more clearly understood in the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 FIG. is a schematic diagram of a system architecture related to a data transmission method and a transmission channel allocation method provided by an embodiment of the present application;
[0053] Figure 2 FIG. is a schematic diagram of another system architecture related to a data transmission method and a transmission channel allocation method provided by an embodiment of the present application;
[0054] Figure 3 FIG. is a flowchart of a transmission channel allocation method provided by an embodiment of the present application;
[0055] Figure 4 FIG. is a schematic diagram of the structure of a target storage space provided by an embodiment of the present application;
[0056] Figure 5 FIG. is a flowchart of a data transmission method provided by an embodiment of the present application;
[0057] Figure 6 FIG. is a flowchart of another data transmission method provided by an embodiment of the present application;
[0058] Figure 7 FIG. is a schematic diagram of a read operation and a write operation provided by an embodiment of the present application;
[0059] Figure 8 FIG. is a schematic diagram of another read operation and a write operation provided by an embodiment of the present application;
[0060] Figure 9 This is a flowchart of another data transmission method provided by an embodiment of the present application;
[0061] Figure 10 This is a schematic diagram of another read operation and write operation provided by an embodiment of the present application;
[0062] Figure 11 This is a data transmission comparison chart provided by an embodiment of the present application;
[0063] Figure 12 This is a schematic diagram of the structure of a computing device provided by an embodiment of the present application;
[0064] Figure 13 This is a schematic diagram of the structure of another computing device provided by an embodiment of the present application;
[0065] Figure 14 This is a schematic diagram of the structure of a management device provided by an embodiment of the present application;
[0066] Figure 15 This is a schematic diagram of the structure of a device provided by an embodiment of the present application. Detailed implementation manners
[0067] For the convenience of understanding, the following first briefly introduces the relevant terms involved in the embodiments of the present application:
[0068] (1) Compute Express Link (CXL) technology is a new type of high-speed interconnection technology designed to provide higher data throughput and lower latency to meet the requirements of modern computing and storage systems.
[0069] (2) CXL storage device: A storage device based on CXL technology, which has the characteristics of unlimited expansion and can meet the needs of data center resource sharing, memory pooling, and efficient operation scheduling.
[0070] Hereinafter, terms such as "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", or "third" etc. may explicitly or implicitly include one or more of such features.
[0071] In the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B. Herein, "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more.
[0072] In the related art, when data is transmitted between servers in a cluster, it is mainly through the network cards installed on the servers and transmitted through the network. Since data transmission in this method is through the network, when transmitting data, it is necessary to use a network transmission protocol and perform protocol conversion. The whole process is relatively complex and prone to data transmission delay. In addition, if the cluster scale is large and there is a large amount of data transmission demand between servers, this will have certain requirements for the hardware scale of the network cards. At the same time, high - configuration switches and high network transmission speeds are required, which will increase the communication cost between the servers in the cluster. Therefore, using network cards for a large amount of data transmission has problems such as slow data transmission speed, high network latency, increased communication cost, and limitation of the overall performance of the cluster.
[0073] Based on this, the embodiments of the present application propose a data transmission method and a transmission channel allocation method. In this method, the first computing device can send target data to the second computing device through the target storage space. Specifically, the target storage space is divided into a metadata block and a storage block. The metadata block records the position of the current write operation and the position of the current read operation. The first computing device determines the state of the first storage block through the position of the current write operation and the position of the current read operation. If the state of the first storage block is an operable state, the first computing device writes the first data in the target data into the first storage block; the second computing device can read the first data from the first storage block.
[0074] It can be understood that this method provides a data transmission channel, and the first computing device realizes data transmission to the second computing device through this transmission channel. In this method, the transmission channel structure is simple, the data transmission efficiency is relatively high, and the overall performance of the cluster can be improved. In addition, the first computing device and the second computing device realize data transmission through the target storage space provided by the CXL storage device. This method does not need to transmit data through the network, has the advantages of fast transmission speed, high bandwidth, and low latency. In addition, this method does not require high - configuration network cards and switches. Therefore, the method proposed in the embodiments of the present application can reduce the hardware configuration cost.
[0075] The following will describe in detail the implementation manners of the embodiments of the present application with reference to the accompanying drawings.
[0076] Please refer to Figure 1 , which shows a schematic diagram of a system architecture involved in the data transmission method and the transmission channel allocation method provided by the embodiments of the present application. As Figure 1 shown, the system architecture may include: a plurality of computing devices 110, a CXL storage device 120, and a CXL connection device 130.
[0077] Multiple computing devices 110 are communicatively connected to a CXL storage device 120 via a CXL connection device 130.
[0078] In one embodiment, each computing device 110 accesses the PCIE interface of the CXL storage device 120 via the CXL connection device 130 for communicative connection. Each computing device 110 communicates with the CXL storage device 120 via the CXL protocol, e.g., Input / Output Protocol (CXL.io), Access Cache Protocol (CXL.cache), and Access Memory Protocol (CXL.mem).
[0079] The computing device 110 is a computing device with data processing, logical operation, and storage functions. For example, the computing device 110 may include computing devices such as servers, tablets, desktop computers, laptops, notebooks, computing nodes, or netbooks. Among them, the server may be different types of servers such as rack servers, blade servers, or tower servers. The server may include one computing node or multiple computing nodes, and each computing node includes at least one central processing unit (CPU). When the server includes multiple computing nodes, the multiple CPUs in the multiple computing nodes share a set of operating systems.
[0080] The CXL storage device 120 is used to provide storage space and serve as a data transmission channel between any two of the multiple computing devices 110. In the system architecture shown in the embodiments of the present application, there may be one CXL storage device 120, or multiple CXL storage devices 120. The storage space provided by one or more storage devices 120 constitutes the CXL storage space, which may also be referred to as the CXL storage pool and is uniformly managed by the management unit.
[0081] If there are multiple CXL storage devices 120, the multiple storage devices 120 are respectively connected to multiple computing devices 110. Figure 1 Taking one CXL storage device 120 connected to multiple computing devices 110 respectively as an example for illustration.
[0082] The CXL storage device 120 may include a CXL controller 121 and a memory 122.
[0083] Among them, the CXL controller 121 is used to receive a request from any computing device 110 to write data into the storage space provided by the memory 122, or a request to read data from the storage space provided by the memory 122, so as to implement the function of using the storage space of the CXL storage device 120 as a data transmission channel.
[0084] Exemplarily, the CXL controller 121 may be a control chip integrated in the CXL storage device 120, which may also be referred to as a memory expansion (CXL memory expander) chip, a CXL memory controller (CXL memory expander controller), or a CXL memory pooling (CXL memory expander pooling) chip.
[0085] The memory 122 is the actual physical carrier that provides storage space in the CXL storage device 120 and can provide storage space as a data transmission channel between any two computing devices 110.
[0086] Exemplarily, the memory 122 may include a dual inline memory module (DIMM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a solid state disk (SSD), or a persistent memory (PMEM).
[0087] In the embodiments of the present application, the number of the above-mentioned memories 122 may be one or more. When there is one memory, the memory may be a DIMM or an SSD. When there are multiple memories 122, the multiple memories 122 may all be DIMMs, or the multiple memories 122 may all be SSDs, or some of the multiple memories 122 are DIMMs and some are SSDs.
[0088] Of course, in other embodiments, when there is one memory 122, the memory 122 may also be other types of memories such as SDRAM or PMEM. When the number of memories 122 is multiple, the multiple memories 122 may all be other types of memories such as SDRAM or PMEM, or the multiple memories 122 include at least two of SDRAM, PMEM, DIMM, or SSD. The above flexible implementation and deployment methods can make the CXL storage device 120 compatible with more media types of memories. The embodiments of the present application do not limit the media type, number, and deployment method of the memories.
[0089] Generally, since volatile storage media such as DIMM, DRAM, or SDRAM have the characteristics of fast data reading and writing, in order to improve the speed between the computing devices 110, volatile storage media may be selected as the memory 122.
[0090] The CXL connection device 130 can provide an expansion interface to connect multiple computing devices 110 to the CXL storage device 120. The CXL connection device 130 can be set independently, or integrated on any one of the computing devices 110, or integrated on the CXL storage device 120.
[0091] Exemplarily, when the CXL connection device 130 is set independently, the CXL connection device 130 can be a CXL switch, and the CXL switch includes a CXL switching chip; or the CXL connection device 130 can be a multi-head CXL memory expansion card (multi head single logic device, MH-SLD). When the CXL connection device 130 is a multi-head CXL memory expansion card, the CXL connection device 130 can be integrated on the CXL storage device 120, and the multi-head CXL memory expansion card can serve as the CXL controller of the CXL storage device 120, and the multi-head CXL memory expansion card can be respectively connected to multiple computing devices. When the number of CXL storage devices is one, the multi-head CXL memory expansion cards of one CXL storage device are respectively connected to multiple computing devices. When the number of CXL storage devices is multiple, the multi-head CXL memory expansion cards of each CXL storage device are respectively connected to at least two of the multiple computing devices connected, and the computing devices connected to each CXL storage device can be the same.
[0092] When the CXL connection device 130 is integrated on a computing device, the CXL connection device 130 can be a CXL switch, a CXL switch chip, or a multi-head CXL memory expansion card. Among them, in addition to the expansion function, the CXL Switch also has a processor and has processing functions, such as being able to run a fabric manager (FM).
[0093] In some other embodiments, the number of CXL connection devices 130 can be one or more, and multiple CXL connection devices 130 can be connected to multiple CXL storage devices 120.
[0094] In some other embodiments, as Figure 2 shown, Figure 2 it is shown that multiple CXL connection devices 130 are respectively connected to multiple CXL storage devices 120, Figure 2 and further includes a management device 140 running an FM. From Figure 2It can be seen that multiple computing devices 110 are respectively connected to some CXL storage devices 120 through CXL connection devices 130. The embodiments of the present application do not limit the number and connection manner of the CXL storage devices 120, CXL connection devices 130, and computing devices 110 in the system.
[0095] FM, a process for managing the CXL storage space provided for one or more CXL storage devices 120, can allocate storage space to any two computing devices 110 for use as a transmission channel. Additionally, optionally, FM can also reclaim the transmission channels allocated to the two computing devices 110 after the data transmission between the two computing devices 110 is completed.
[0096] In some embodiments, FM divides the storage space used as a transmission channel into a metadata block and a storage block. The metadata block stores the metadata of the storage space, and the storage block is used to store the data to be transmitted. FM realizes data transmission through the metadata and storage block recorded in the metadata block.
[0097] In the embodiments of the present application, FM can run in the CPU or baseboard management controller (BMC) of any computing device 110, or in the processor of the CXL connection device 130. Alternatively, FM can also run in the CPU, BMC, or controller of an independent device (such as the management device 140). The embodiments of the present application do not limit the specific running location of FM.
[0098] It should be noted that different computing devices have different names for the BMC. For example, some computing devices are called BMC, some are called iLO (integrated lights-out), and some are called integrated dell remote access controller (iDRAC). Whether it is called BMC, iLO, or iDRAC, it can be understood as the BMC in the embodiments of the present invention.
[0099] In some embodiments, if the FM runs on any one of the multiple computing devices 110, the other computing devices 110 can communicate with the computing device running the FM through a network and / or a 485 link (a link using the RS-485 serial bus standard). The CXL connection device 130 is respectively connected to the multiple computing devices 110 and the CXL storage device 120 through a bus (such as a UART, a universal asynchronous receiver / transmitter (UART) integrated circuit bus (inter-integrated circuit, IIC), or a system management bus (SMBus)).
[0100] In some other embodiments, if the FM runs in the CXL connection device 130, the CXL connection device 130 is respectively connected to the multiple computing devices 110 and the CXL storage device 120 through a bus (such as a UART, an IIC, or an SMBUS bus).
[0101] In an application scenario, based on the data transmission requirements of the first computing device and the second computing device, the FM allocates a target storage space for the first computing device and the second computing device, which is used as the target transmission channel between the two computing devices. The FM divides the target storage space into a metadata block and a storage block. The metadata block is used to record the metadata of the target storage space, and the storage block is used to store the data that needs to be transmitted between the first computing device and the second computing device. During data transmission, the first computing device writes data blocks into the storage block. After the first computing device writes the data, the second computing device starts to read the data blocks from the storage block. When the first computing device writes all the target data into the target storage space and the second computing device reads all the target data, the first computing device and the second computing device complete the data transmission.
[0102] The data transmission method and the transmission channel allocation method provided by the embodiments of the present application are described below:
[0103] The method proposed by the embodiments of the present application mainly includes the following two processes:
[0104] The first process, the transmission channel allocation method proposed by the embodiments of the present application is mainly used to allocate a transmission channel for any two computing devices in a cluster.
[0105] The second process, the data transmission method proposed by the embodiments of the present application is mainly used to perform data transmission between two computing devices that have obtained the transmission channel.
[0106] The following first introduces the first process. Please refer to Figure 3, is a flowchart of a transmission channel allocation method provided by an embodiment of the present application. This method is applied to a management unit, such as Figure 1 the FM shown. The management unit, the first computing device, and the second computing device are all connected to one or more CXL storage devices. As Figure 3 shown, this method may include S101 - S104.
[0107] S101: Based on the data transmission requirements between the first computing device and the second computing device, the management unit allocates target storage space in the CXL storage space for the first computing device and the second computing device.
[0108] The CXL storage device to which the target storage space belongs is connected to both the first computing device and the second computing device, and the target storage space is used as the target transmission channel for data transmission between the first computing device and the second computing device.
[0109] The data transmission requirement is the requirement for the data transmission channel. Generally, two computing devices in a cluster have data transmission requirements during the process of processing tasks issued by an application program in the upper - layer client.
[0110] The data transmission requirement includes the identifiers of the two computing devices that need to perform data transmission, and optionally also includes the capacity of the transmission channel required for transmitting data.
[0111] For the data transmission requirements of the first computing device and the second computing device, it may include: the identifier of the first computing device, the identifier of the second computing device, and the capacity of the transmission channel required by the first computing device and the second computing device.
[0112] Exemplarily, the identifier of the first computing device is "Computing Device 1", the identifier of the second computing device is "Computing Device 2", and the capacity of the transmission channel required by the first computing device and the second computing device is 10G.
[0113] The identifier of a computing device can be information such as the number of the computing device, the host name, the Internet Protocol (IP) address, or the Media Access Control (MAC) address that can represent the identity of the computing device.
[0114] The number of a computing device can be the number uniformly assigned by the management unit to the accessed computing device when the computing device is connected to the management unit. Assigning numbers to computing devices facilitates managing the transmission channels of each computing device when allocating transmission channels to the computing devices later.
[0115] The capacity of the transmission channel required for data transmission can be the default value set in the management unit or the capacity of the transmission channel determined based on the type of tasks processed by the cluster.
[0116] Exemplarily, when the types of tasks processed by the cluster are tasks such as cloud computing, artificial intelligence, or big data, the amount of data that the computing device needs to transmit is relatively large. The computing device can estimate the amount of data to be transmitted based on the historical operation data of the tasks and determine the capacity of the transmission channel.
[0117] In one implementation, before the cluster starts running, the management unit receives the data transmission requirement between the first computing device and the second computing device input by the user. The management unit distributes a target transmission channel for the first computing device and the second computing device according to the data transmission requirement between the first computing device and the second computing device.
[0118] The user can input the data transmission requirement between the first computing device and the second computing device by means of a file, a command line, or a human-machine interaction interface connected to the management unit, etc.
[0119] Exemplarily, the user sends a form containing the data transmission requirement between the first computing device and the second computing device to the management device where the management unit is located through any computing device.
[0120] Exemplarily, the management device where the management unit is located has an input device, and the user inputs a command line in the operating system of the management device through the input device to configure the data transmission requirement between the first computing device and the second computing device.
[0121] Exemplarily, the management device where the management unit is located has a human-machine interaction interface, and the user configures the data transmission requirement between the first computing device and the second computing device through the human-machine interaction interface.
[0122] In another implementation, the management unit distributes transmission channels pairwise for multiple connected computing devices based on the default data transmission requirements in the system of the management unit, where the multiple connected computing devices include the first computing device and the second computing device, and the distributed transmission channels include the target transmission channels distributed for the first computing device and the second computing device.
[0123] In yet another implementation, after the cluster starts running, if the first computing device needs to send data to the second computing device, at this time the first computing device sends a data transmission channel establishment request to the management unit. The data transmission channel establishment request includes the data transmission requirement between the first computing device and the second computing device, and the management unit distributes a target transmission channel for the first computing device and the second computing device based on the data transmission requirement included in the data transmission channel establishment request.
[0124] Exemplarily, Table 1 shows the data transmission requirements between the first computing device and the second computing device obtained by the management unit. Table 1 includes: "identifier of the first computing device", "identifier of the second computing device", and "capacity of the transmission channel". Among them, the first computing device is the sending end in data transmission, and the second computing device is the receiving end in data transmission.
[0125] Table 1
[0126] Identifier of the computing device (sender) Identifier of the computing device (receiver) Capacity of the transmission channel Computing device 1 Computing device 2 10G
[0127] In fact, if there are data transmission requirements between multiple computing devices in the cluster, the management unit can allocate transmission channels to multiple computing devices respectively based on the data transmission requirements between the multiple computing devices. In the embodiments of the present application, any two computing devices (the first computing device and the second computing device) in the cluster are taken as an example for illustration.
[0128] After the management unit obtains the data transmission requirements of the first computing device and the second computing device, the specific process of allocating the target storage space in the CXL storage space for the first computing device and the second computing device includes: S101a - S101c.
[0129] S101a: The management unit determines the target CXL storage device in the CXL storage space.
[0130] Specifically, the target CXL storage device is one or more CXL storage devices connected to both the first computing device and the target computing device.
[0131] In one implementation, the CXL storage space managed by the management unit is composed of multiple CXL storage devices, and the multiple CXL storage devices are respectively connected to multiple computing devices in the cluster. The management unit determines the target CXL storage device connected to the first computing device and the target computing device from the multiple CXL storage devices.
[0132] Exemplarily, as shown in Table 2, Table 2 shows multiple CXL storage devices managed by the management unit, and the computing devices connected to each CXL storage device. Table 2 includes: "identifier of the CXL storage device" and "identifier of the computing device connected to the CXL storage device".
[0133] Table 2
[0134] Identifier of the CXL storage device Identifier of the computing device to which the CXL storage device is connected CXL storage device 1 Computing device 1, Computing device 2, Computing device 3, Computing device 4 CXL storage device 2 Computing device 2, Computing device 3, Computing device 4 CXL storage device 3 Computing device 3, Computing device 4
[0135] If the identifier of the first computing device is "Computing Device 1" and the identifier of the second computing device is "Computing Device 2", it can be seen from Table 2 above that the CXL storage devices connected to Computing Device 1 and Computing Device 2 are "CXL Storage Device 1" respectively. Then, the management unit determines that the target CXL storage device is CXL Storage Device 1.
[0136] S101b: The management unit determines the available storage space in the target CXL storage device.
[0137] The available storage space is the unallocated storage space in the storage space of the target CXL storage device.
[0138] In one implementation, the management unit manages the allocation status of the storage space of the target CXL storage device. The allocation status includes the allocated storage space and the unallocated storage space. The management unit determines the available storage space of the target CXL storage device based on the allocation status of the storage space of the target CXL storage device.
[0139] Exemplarily, the allocation status of the storage space of the target CXL storage device managed by the management unit is shown in Table 3. Table 3 includes: "Allocation Status", "Address", and "Storage Capacity".
[0140] Table 3
[0141]
[0142] It can be seen from the allocation status of the storage space of the target CXL storage device shown in Table 3 that the address of the unallocated storage space is Addr3 and the storage capacity is 20G. Then, the management unit determines that the available storage space is the storage space with the address "Addr3" and the storage capacity of "20G".
[0143] S101c: The management unit determines the target storage space allocated to the first computing device and the second computing device from the available storage space of the target CXL storage device.
[0144] Exemplarily, if the capacity of the transmission channels required by the first computing device and the second computing device is 10G, the management unit determines from the available storage space with the address "Addr3" and the storage capacity of "20G" shown in Table 3 the target storage space with the address "Addr3-1" and the storage capacity of "10G" as the target transmission channels for the first computing device and the second computing device. At this time, the unallocated storage space is Addr3-2 and the storage capacity is 10G. The allocation status of the storage space of the target CXL storage device in Table 3 can be correspondingly updated to the allocation status of the storage space of the target CXL storage device shown in Table 4.
[0145] Table 4
[0146]
[0147] S102: The management unit sends the information of the target transmission channel to the first computing device and the second computing device respectively.
[0148] The information of the target transmission channel includes: the identifier of the first computing device, the identifier of the second computing device, the identifier of the target transmission channel, the address of the target storage space, and the storage capacity of the target storage space. Among them, the identifier of the first computing device is the identifier of the sending end, and the identifier of the second computing device is the identifier of the receiving end.
[0149] Optionally, before sending the information of the target transmission channel to the first computing device and the second computing device, the management unit sets an identifier for the target transmission channel.
[0150] Exemplarily, the management unit sets the identifier of the target transmission channel as Channel 1.
[0151] Exemplarily, the first computing device is "Computing Device 1", the second computing device is "Computing Device 2", and the information of the target transmission channel includes: the identifier of the sending end: "Computing Device 1", the identifier of the receiving end: "Computing Device 2", the identifier of the target transmission channel "Channel 1", the address of the target storage space "Addr3-1", and the storage capacity of the target storage space "10G". The management unit sends the above information of the target transmission channel to "Computing Device 1" and "Computing Device 2" respectively.
[0152] Optionally, the management unit records the target communication relationship entry corresponding to the target transmission channel in the data transmission channel table. Among them, the target communication relationship entry includes the identifier of the target transmission channel, the identifier of the first computing device, the identifier of the second computing device, the address of the target storage space, and the storage capacity of the target storage space. The management unit sends the data transmission channel table containing the information of the target transmission channel to the first computing device and the second computing device respectively.
[0153] Exemplarily, the target communication relationship entry includes: the identifier of the target transmission channel "1", the identifier of the first computing device "Computing Device 1", the identifier of the second computing device "Computing Device 2", the address of the target storage space is Addr3-1, and the storage capacity is 10G. As shown in Table 5, the management unit stores the target communication relationship entry in the data transmission channel table.
[0154] Table 5
[0155]
[0156] The identifier of one computing device in Table 5 above is generally the identifier of the computing device applying for the transmission channel, and the identifier of the other computing device is generally the identifier of the computing device receiving data.
[0157] When the management unit manages the transmission channels of multiple computing devices, it can manage each transmission channel and the allocated computing devices based on the identifier of each transmission channel to avoid confusion. In addition, the management unit can record the information of the transmission channels of multiple computing devices in the data transmission channel table to improve the management efficiency of multiple transmission channels. Subsequently, the first computing device or the second computing device can use the allocated target transmission channel for data transmission. For details, please refer to the subsequent second process.
[0158] S103: The management unit divides the target storage space into a metadata block and a storage block.
[0159] Among them, the metadata block is used to record the metadata of the target storage space; the metadata includes: the position of the current write operation, the position of the current read operation, and optionally also includes: the identifier of the target transmission channel, the identifier of the sending end, the identifier of the receiving end, the storage capacity of multiple storage blocks, the storage location index of the data block, the storage location index of the data block is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located, the indication flag indicating the completion of the target data transmission, and the indication flag indicating that the target data has been obtained.
[0160] The storage block is used to store the data in the target data transmitted from the first computing device to the second computing device. Optionally, the number of storage blocks can be one or more. When the number of storage blocks is multiple, the multiple storage blocks are used to enable the first computing device to divide the target data into multiple data blocks based on the storage capacity of the multiple storage blocks, and the multiple data blocks can be respectively stored in the corresponding storage blocks.
[0161] The management unit divides the target storage space into multiple storage blocks, and subsequently, the first computing device and the second computing device can implement parallel execution of read operations and write operations to improve the read-write efficiency.
[0162] Exemplarily, as shown in Table 6, Table 6 summarizes multiple fields of the metadata block, and each field is used to record fixed metadata. Table 6 includes "sequence number" and "metadata field", each "sequence number" represents a field of the metadata block, and each row of "sequence number" corresponds to each row of "metadata field".
[0163] Table 6
[0164] Serial number Metadata field 1 Heartbeat packet 2 Identifier of the target transmission channel 3 Identifier of the sender 4 Identifier of the receiver 5 Storage capacity of multiple storage blocks 6 Position of the current write operation 7 Position of the current read operation 8 Storage location index of the data block 9 Indicator flag indicating that the transmission of the target data is completed, and / or, indicator flag indicating that the target data has been acquired 10 Timestamp of the data block 11 Number of bytes currently sent / received 12 Total amount of data sent by the sender and total amount of data received by the receiver 13 Cyclic redundancy check (CRC) verification result of the data block 14 Identifier of the data block with parity check failure 15 Reserved field
[0165] Among the above metadata, serial number 1, the heartbeat packet is a kind of management information used to record the heartbeat information of two computing devices for data transmission in real time, which can verify whether the sending end and the receiving end are online. If both are online, the sending end and the receiving end can perform data transmission. If either end is not online, the sending end and the receiving end cannot perform data transmission.
[0166] Serial number 5, the storage capacities of multiple storage blocks, records the storage capacity of each storage block divided by the record management unit. The storage capacities of multiple storage blocks can be equal or unequal. If the storage capacities of multiple storage blocks are equal, only one storage capacity value can be recorded at serial number 5. If the storage capacities of multiple storage blocks are unequal, the storage capacity values of each storage block can be recorded separately at serial number 5.
[0167] Exemplarily, if the management unit divides a target storage space with a storage capacity of 10G into 1 metadata block of 1G and 9 storage blocks of 1G, the storage capacity of the storage blocks recorded at serial number 5 is 1G.
[0168] Exemplarily, if the management unit divides a target storage space with a storage capacity of 10G into 1 metadata block of 1G, 3 storage blocks of 1G, and 2 storage blocks of 3G, the management unit can set numbers 1 - 3 for the 3 storage blocks of 1G, set numbers 4 and 5 for the 2 storage blocks of 3G, and record 1 - 1G, 2 - 1G, 3 - 1G, 4 - 3G, 5 - 3G at serial number 5.
[0169] Serial number 6, the position of the current write operation, is used to record the position of the storage block being operated on when the first computing device performs a write operation on the target storage space. Exemplarily, if the first computing device uses a write pointer to indicate the position of the current write operation, the position of the current write operation is the position currently indicated by the write pointer. The management unit sets the initial value of the write pointer to NULL, that is, the write pointer w_hdr = NULL, indicating that the write pointer does not point to any storage block.
[0170] Serial number 7, the position of the current read operation, is used to record the position of the storage block being operated on when the second computing device performs a read operation on the target storage space. Exemplarily, if the second computing device uses a read pointer to indicate the position of the current read operation, the position of the current read operation is the position currently indicated by the read pointer. The management unit sets the initial value of the read pointer to NULL, that is, the read pointer r_hdr = NULL, indicating that the read pointer does not point to any storage block.
[0171] Serial number 8, the storage location index of the data block, which is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located. For example, if the identifier of the unread data block is Data Block 1 and Data Block 1 is written into Storage Block 1, then "Data Block 1 - 1" is recorded at this serial number 8. If the identifier of the unread data block is Data Block 3 and Data Block 3 is written into Storage Block 5, then "Data Block 3 - 5" is recorded at this serial number 8. When the first computing device writes a data block into a storage block, it records the correspondence between the identifier of the data block and the identifier of the storage block at serial number 8. When the second computing device reads a data block from the storage block, it deletes the correspondence between the identifier of the data block and the identifier of the storage block at serial number 8.
[0172] Serial number 9, the indication mark for the completion of the target data transmission, and / or the indication mark for having obtained the target data. After the first computing device finishes sending the target data, it records the indication mark for the completion of the target data transmission at this serial number 9. After the second computing device obtains the target data, it records the indication mark for having obtained the target data at this serial number 9.
[0173] Serial number 10, the timestamp of the data block, which is used to record the writing time of each data block written by the first computing device.
[0174] During subsequent operation and maintenance, technicians can view the writing time of each data block based on the metadata in this serial number 10, improving the operation and maintenance efficiency.
[0175] Serial number 11, the currently sent / received number of bytes. The currently sent number of bytes is used to record the data volume currently written by the first computing device, which is updated by the first computing device. The currently received number of bytes is used to record the data volume currently received by the second computing device, which is updated by the second computing device.
[0176] The metadata in this serial number 11 can be used to verify whether the sent data volume is equal to the received data volume, avoiding data omission.
[0177] Serial number 12, the total data volume sent by the sending end. After the first computing device finishes sending the data, it updates this data. The total data volume received by the receiving end. After the second computing device finishes receiving the data, it updates this data.
[0178] The metadata in this serial number 12 can be used to check whether the total sent data volume is equal to the total received data volume, avoiding omission.
[0179] Serial number 13, the CRC check result of the data block, which is used to record the check result of each data block sent by the sending end, and is checked and recorded by the sending end of the data block.
[0180] Serial number 14, the identifier of the data block with parity check failure, used to record the identifier of the data block with data check error, which is verified and recorded by the receiving end of the database.
[0181] The metadata recorded in the above serial number 13 and serial number 14 are both for judging whether there is an error in the data transmission process, and then in the subsequent operation and maintenance process, it is convenient to quickly query the data block with an error, improving the operation and maintenance efficiency.
[0182] Serial number 15, a reserved field, used for extended functions.
[0183] In one implementation, the management unit abstracts the target storage space into a logical unit based on the storage capacity of the default storage block, and then divides this logical unit into a metadata block and multiple storage blocks.
[0184] Exemplarily, the storage capacity of the default storage block is 1G, and the target storage space is 10G. The management unit divides the target storage space into 1 metadata block of 1G and 9 storage blocks of 1G.
[0185] Exemplarily, as Figure 4 shown, Figure 4 A schematic diagram showing the metadata block and multiple storage blocks of the target storage space. The storage capacity of each storage block can be equal, unequal, or partially equal and partially unequal, and can be specifically determined based on actual requirements. This application embodiment does not make limitations on this.
[0186] Generally, the storage capacities of the multiple storage blocks divided by the management unit are equal, which is convenient for the management unit to manage the multiple storage blocks, and also convenient for the subsequent first computing device to divide the target data based on the storage capacity of the storage block.
[0187] S104: The management unit records the information of the target transmission channel and the storage capacity of the storage block in the metadata block.
[0188] In one implementation, the management unit records the information of the target transmission channel at the field corresponding to the information of the target transmission channel in the metadata block, and records the storage capacities of the multiple storage blocks at the field corresponding to the storage capacities of the multiple storage blocks.
[0189] Optionally, the management unit sets the initial value of the current write operation position to NULL at the field corresponding to the current write operation position, that is, the write pointer w_hdr = NULL, and sets the initial value of the current read operation position to NULL at the field corresponding to the current read operation position, that is, the read pointer r_hdr = NULL.
[0190] Subsequently, the current write operation position is updated in real time by the first computing device, and the actual position of the current read operation position is updated in real time by the second computing device.
[0191] Exemplarily, if the identifier of the first computing device is "Computing Device 1", the identifier of the second computing device is "Computing Device 2", the identifier of the target transmission channel is "Channel 1", the address of the target storage space is "Addr3-1", the storage capacity of the target storage space is "10G", and the storage capacity of each of the multiple storage blocks is 1G, the management unit correspondingly records "Channel 1" at the serial number "2" as shown in Table 6 in the metadata block, records "Computing Device 1" at the serial number "3", records "Computing Device 2" at the serial number "4", records "1G" at the serial number "5", records w_hdr = NULL at the serial number "6", and records the read pointer r_hdr = NULL at the serial number "7". After the management unit records the above information in Table 6, Table 6 is updated to Table 7.
[0192] Table 7
[0193] Serial number Metadata 1 Heartbeat packet 2 Identifier of the target transmission channel: Channel 1 3 Identifier of the sender: Computing device 1 4 Identifier of the receiver: Computing device 2 5 Storage capacity of multiple storage blocks: 1G 6 Position of the current write operation: w_hdr = NULL 7 Position of the current read operation: r_hdr = NULL 8 Storage location index of the data block 9 Indicator flag indicating that the transmission of the target data is completed, and / or, indicator flag indicating that the target data has been acquired 10 Timestamp of the data block 11 Number of bytes currently sent / received 12 Total amount of data sent by the sender and total amount of data received by the receiver 13 CRC verification result of the data block 14 Identifier of the data block with parity check failure 15 Reserved field
[0194] Optionally, after the management unit allocates the target transmission channel to the first computing device and the second computing device, at the serial number "1" shown in Table 6, the management unit correspondingly and real-time records the heartbeat information of the first computing device and the second computing device.
[0195] The above S102 can be executed after S103-S104, can also be executed before S103-S104, or can be executed synchronously. The embodiments of the present application do not limit the execution order of S102 and S103-S104.
[0196] If S102 is executed before S103-S104, the first computing device and the second computing device can obtain the information of the target transmission channel as soon as possible. If S102 is executed after S103-S104, the management unit can send the metadata in the metadata block to the first computing device and the second computing device together when sending the information of the target transmission channel. When the first computing device writes data for the first time and the second computing device reads data for the first time, it does not need to repeatedly read the metadata from the metadata block of the target storage space, improving the data transmission efficiency. If S102 and S103-S104 are executed simultaneously, the management unit can improve the allocation and management efficiency of the target transmission channel.
[0197] It should be noted that the management unit records the sender identifier and the receiver identifier in the metadata block. Subsequently, the first computing device or the second computing device can verify the sender or the receiver based on this identifier during data transmission, improving the reliability of data transmission. And this identifier also indicates that the target transmission channel is a unidirectional transmission channel. For example, if the sender is the first computing device and the receiver is the second computing device, only the first computing device can send data to the second computing device through this target transmission channel subsequently. If the second computing device needs to send data to the first computing device subsequently, it can apply for a new transmission channel, or the first computing device or the second computing device applies to the management unit to modify the sender identifier and the receiver identifier recorded in the metadata block.
[0198] That is to say, after the management unit allocates the transmission channel and sets the sender identifier and the receiver identifier on the transmission channel, this transmission channel is a unidirectional data transmission channel. During the same time period, only one computing device can send data to the other computing device. With this allocation method, the structure of the transmission channel is simple, facilitating the computing device to quickly obtain the metadata in the transmission channel to complete data writing and reading. Therefore, the structure of the transmission channel proposed by this method can improve the efficiency of data transmission.
[0199] Optionally, after the first computing device and the second computing device complete data transmission, the management unit reclaims the target transmission channel allocated to the first computing device and the second computing device.
[0200] In some embodiments, the first computing device or the second computing device sends an indication message to the management unit. The indication message is used to indicate that the first computing device and the second computing device have completed data transmission, and the management unit reclaims the target transmission channel.
[0201] Specifically, the management unit deletes the target communication relationship entry recorded in the data transmission channel table and deletes the data stored in the target storage space.
[0202] After the management unit reclaims the target transmission channel, it can send a message indicating that the target transmission channel has been reclaimed to the first computing device and the target computing device. Subsequently, if the first computing device and the target computing device need to perform data transmission, they cannot use this target transmission channel anymore and need to apply for a new transmission channel. Therefore, this message indicating the reclaiming of the target transmission channel can prevent data transmission failures caused by the first computing device or the target computing device using the target transmission channel again.
[0203] In the above optional steps, after the data transmission between computing devices is completed, the management unit promptly reclaims the allocated transmission channels, i.e., storage spaces. Subsequently, these storage spaces can be continuously allocated to other computing devices with data transmission requirements, improving the utilization rate of storage spaces. Promptly reclaiming storage spaces can reduce the storage capacity configuration of CXL storage devices and lower the usage cost of CXL storage devices.
[0204] The following introduces the second process, which includes two parts. The first part is the process of the first computing device sending data. As Figure 5 shown, the first part mainly includes: the first step, the first computing device determines the status of the first storage block in the target storage space based on the positions of the current write operation and the current read operation recorded in the metadata block of the target storage space; the second step, when the status of the first storage block is an operable state, the first computing device writes the first data block into the first storage block so that the second computing device reads the first data block from the first storage block.
[0205] Please refer to Figure 6 , which is a flowchart of a data transmission method provided by an embodiment of this application. This flowchart introduces the specific process of the first part. This method is applied to the first computing device, such as Figure 1 any computing device other than the second computing device in the computing device 110 shown, as Figure 6 shown. This method may include S201 - S208.
[0206] S201: The first computing device obtains information about the target transmission channel from the management unit.
[0207] In one implementation, when the first computing device needs to send data to the second computing device, it obtains information about the allocated target transmission channel from the management unit.
[0208] In another implementation, the first computing device receives the information about the target transmission channel sent by the management unit before it needs to send data to the second computing device.
[0209] Exemplarily, the information about the target transmission channel obtained by the first computing device includes: the identifier of the sending end: "Computing Device 1", the identifier of the receiving end: "Computing Device 2", the identifier of the target transmission channel "Channel 1", the address of the target storage space "Addr3", and the storage capacity of the target storage space "10G".
[0210] Optionally, the first computing device obtains a data transmission channel table containing information about the target transmission channel from the management unit, and the first computing device obtains information about the target transmission channel from the data transmission channel table.
[0211] S202 (Optional): The first computing device obtains the storage capacity of the storage block from the metadata block.
[0212] The first computing device determines the address of the transmission channel based on the information of the target transmission channel, and reads the storage capacity of the storage block in the metadata block from the storage space corresponding to the address of the transmission channel.
[0213] It can be understood that the number of storage blocks can be one or more. When the number of storage blocks is one, the first computing device obtains the storage capacity of one storage block from the metadata block. When the number of storage blocks is multiple, the first computing device obtains the storage capacity of each storage block from the metadata block.
[0214] In some embodiments, if the first computing device reads that the storage capacities of each storage block are equal, the first computing device sends an instruction to the CXL controller to obtain the storage capacities of multiple storage blocks recorded in the metadata block.
[0215] Exemplarily, "Computing Device 1" sends an instruction to the CXL controller to obtain the storage capacities of multiple storage blocks recorded in "Sequence Number 5" of "Channel 1", and the CXL controller returns to "Computing Device 1" that the storage capacities of multiple storage blocks are "1G".
[0216] Optionally, the metadata includes the identifier of the first computing device, the identifier of the second computing device, the position of the current write operation, and the position of the current read operation. The identifier of the first computing device is the sender identifier, and the identifier of the second computing device is the receiver identifier.
[0217] Before obtaining the storage capacity of the storage block, the first computing device determines that the transmission direction of the target transmission channel is from the first computing device to the second computing device based on the sender identifier and the receiver identifier in the metadata block.
[0218] This step can improve the reliability of data transmission between the first computing device and the second computing device. Of course, in some embodiments, the metadata may not include the identifier of the first computing device and the identifier of the second computing device.
[0219] S203 (Optional): The first computing device divides the target data into multiple data blocks based on the storage capacity of each storage block.
[0220] Among them, the multiple data blocks include the first data block, and the storage capacity required to store the first data block is less than or equal to the storage capacity of the first storage block.
[0221] Exemplarily, if the target data is 10.5G, the first computing device divides the target data into ten 1G data blocks and one 0.5G data block.
[0222] Exemplarily, if the target data is 12G, the first computing device divides the target data into twelve 1G data blocks.
[0223] In the above optional step S203, after the first computing device divides the target data into multiple data blocks, the first computing device starts to transmit the multiple data blocks respectively. The following S204 - S208 is the process of the first computing device transmitting any one of the multiple data blocks, for example, the first data block.
[0224] Based on the number of storage blocks and the storage capacity, the first computing device divides the target data to be transmitted into multiple data blocks, so as to write each data block into each storage block. Subsequently, the second computing device can read the data blocks from each storage block to implement parallel execution of read operations and write operations, thereby improving data transmission efficiency.
[0225] S204: The first computing device determines the state of the first storage block in the target storage space based on the current write operation position and the current read operation position recorded in the metadata block of the target storage space.
[0226] Among them, the first storage block is the storage block where the current write operation position of the target storage space is located. The state of the first storage block includes: an operable state, or, an inoperable state.
[0227] When the state of the first storage block is an operable state, the first computing device executes S205;
[0228] When the state of the first storage block is an inoperable state, the first computing device repeats S204 until it determines that the state of the first storage block is an operable state.
[0229] For the first computing device, when there is no data stored in the first storage block, or the stored data has been read by the second computing device, the state of the first storage block is an operable state, and at this time, the first storage block is a writable storage block; when there is data stored in the first storage block and the data has not been read by the second computing device, the state of the first storage block is an inoperable state, and at this time, the first storage block is a non - writable storage block.
[0230] For a non - writable storage block, the first computing device needs to wait for the second computing device to read the data in the storage block before it can perform a write operation on the storage block. Therefore, when the second computing device reads the data in the storage block, the state of the storage block changes from an inoperable state to an operable state.
[0231] In one implementation manner, a specific method is proposed for S204, including S204a - S204b:
[0232] S204a: The first computing device obtains the positions of the current write operation and the current read operation of the target storage space from the metadata block. Among them, the position of the current write operation is in the first storage block.
[0233] In one implementation, the position of the current write operation is the position currently indicated by the write pointer, and the position of the current read operation is the position currently indicated by the read pointer. The positions currently indicated by the read pointer and the write pointer are recorded in the metadata block. The first computing device obtains the positions currently indicated by the write pointer and the read pointer from the metadata block.
[0234] Exemplarily, if the target storage space includes 10 storage blocks, the first computing device obtains that the numbers of the 10 storage blocks are set as 1 - 10 respectively. The first computing device uses the write pointer w_hdr = 1 - 10 to indicate the storage blocks numbered 1 - 10 respectively.
[0235] Exemplarily, if the target storage space includes 10 storage blocks, the second computing device obtains that the numbers of the 10 storage blocks are set as 1 - 10 respectively. The second computing device uses the read pointer r_hdr = 1 - 10 to indicate the storage blocks numbered 1 - 10 respectively.
[0236] Exemplarily, if the first computing device obtains from the serial number "6" in the metadata block that the write pointer w_hdr = 2, it means that the position of the current write operation is the storage block numbered 2, and obtains from the serial number "7" that the read pointer r_hdr = 1, it means that the position of the current read operation is the storage block numbered 1.
[0237] It should be noted that if the value of the current write pointer in the metadata is the initial value NULL, it means that no data has been written into the target storage space. At this time, the first computing device can point the current write pointer to the first storage block among multiple storage blocks. For example, the first computing device changes the value of the current write pointer to "1", indicating that the current write pointer is pointed to the storage block numbered "1", then the first storage block is the storage block numbered "1".
[0238] In addition, after obtaining the information of the target transmission channel in S201, the first computing device can obtain all the metadata from the metadata block, and then select the required metadata from multiple metadata when needed. For example, in S202, it obtains the storage capacities of multiple storage blocks from multiple metadata, or in this S204a, it obtains the positions of the current write operation and the current read operation from multiple metadata; or, the first computing device can obtain the storage capacities of multiple storage blocks in S202 or the positions of the current write operation and the current read operation in S204a from the metadata block respectively when needed. The embodiments of the present application do not make any limitations in this regard.
[0239] S204b: When the position of the current write operation is different from the position of the current read operation, the first computing device determines that the first storage block of the target storage space is in an operable state.
[0240] In one implementation, when the position indicated by the current write pointer is different from the position indicated by the current read pointer, the first computing device determines that the first storage block of the target storage space is in an operable state.
[0241] Exemplarily, if the first computing device obtains the write pointer w_hdr = 2 from the serial number "6" in the metadata block and the read pointer r_hdr = 1 from the serial number "7", then the position of the current write operation is different from the position of the current read operation, and the first computing device determines the first storage block of the target storage space, that is, the storage block numbered "2", as the operable state.
[0242] Exemplarily, as Figure 7 shown, Figure 7 it shows that the position of the current write operation is the storage block numbered 2, and the position of the current read operation is the storage block numbered 2. As Figure 8 shown, Figure 8 it shows that the position of the current write operation is the storage block numbered 2, and the position of the current read operation is the storage block numbered 3.
[0243] As described above Figure 7 shown, the positions of the write operation and the read operation are equal. Since the write operation and the read operation are executed cyclically for multiple storage blocks, for the first computing device, the second computing device is performing a read operation on the first storage block (the storage block numbered 2). At this time, the first computing device repeatedly obtains the position of the current write operation and the position of the current read operation in the metadata block until the position of the current read operation is different from the position of the current write operation. As described above Figure 8 shown, this indicates that the second computing device has obtained the data in the first storage block and is performing a read operation on the next storage block. At this time, the first computing device determines that the first storage block is in an operable state.
[0244] It can be understood that the target storage space includes multiple storage blocks. The first computing device performs write operations on the multiple storage blocks in sequence, and the second computing device performs read operations on the multiple storage blocks in sequence. After all the storage blocks are written, the first computing device repeats the write operation on the multiple storage blocks from the beginning. To avoid data overwrite and prevent the second computing device from being unable to read the complete target data, the first computing device needs to perform a write operation after the second computing device reads the data in the storage block. Therefore, the above optional method can quickly determine the operation status of the first storage block and avoid data overwrite.
[0245] The above S203 is an optional step. If the storage capacities of multiple storage blocks are equal, the first computing device may execute the above steps S202 - S203. If the storage capacities of multiple storage blocks are not equal, the first computing device may not split the target data first. When executing S204, it obtains the storage capacity of the storage block (the first storage block) where the position of the write operation in the metadata block is located. Before executing S205, it then splits the corresponding data block (the first data block) from the target data.
[0246] Exemplarily, the storage block where the current write operation position of the first computing device is located is the first storage block. The first computing device obtains the storage capacity of the first storage block as 2G from the metadata, and the first computing device splits a 2G data block from the target data.
[0247] S205: The first computing device writes the first data block into the first storage block so that the second computing device reads the first data block from the first storage block.
[0248] The first data block is part of the target data that the first computing device needs to send to the second computing device, and the storage capacity required to store the first data block is less than or equal to the storage capacity of the first storage block.
[0249] In one implementation, the first computing device sends a write data indication to the CXL controller, and the write data indication is used to instruct the CXL controller to write the first data block into the first storage block.
[0250] Exemplarily, if the first computing device obtains the number of the first storage block where the current write operation position is located as "2", then the first computing device sends a write data indication to the CXL controller, and the write data indication includes: writing the first data block into the storage block numbered "2" in "Channel 1".
[0251] Correspondingly, the address of the storage block numbered "2" in "Channel 1" is recorded in the CXL controller, and the CXL controller writes the first data block into the storage space indicated by this address.
[0252] Optionally, based on the working principle of the computing device, when the first computing device writes the first data block into the first storage block, some data in the first data block is cached in the cache space processed by the first computing device. Therefore, after the first computing device finishes writing the first data block each time, it performs a cache invalidation operation to ensure that all data in the first data block is written into the first storage block.
[0253] S206: The first computing device updates the metadata recorded in the metadata block.
[0254] Specifically, the metadata updated by the first computing device includes: S206a - S206c.
[0255] S206a: In the metadata recorded in the metadata block, the first computing device updates the position of the current write operation from the first storage block to the next storage block.
[0256] The next storage block is the next storage block adjacent to the first storage block among the multiple storage blocks of the target storage space. For example, if the first storage block is the storage block numbered "2", the next storage block is the storage block numbered "3".
[0257] Exemplarily, the position of the current write operation is the position indicated by the current write pointer. The first storage block is the storage block numbered "2", and the next storage block is the storage block numbered "3". The current write pointer in the metadata block is w_hdr = 2. The first computing device updates the current write pointer w_hdr = 2 recorded in the metadata block to w_hdr = 3, indicating that the current write pointer is updated from indicating the storage block numbered "2" to indicating the storage block numbered "3".
[0258] Since the first computing device performs write operations on the storage blocks sequentially, after the write operation on the first storage block is completed, it is necessary to update the position of the current write operation in order to continue writing data to the next storage block and thus complete the data transfer.
[0259] S206b: The first computing device sets an identifier for the first data block.
[0260] Exemplarily, the first computing device sets the identifier for the first data block as "data block 2".
[0261] In one implementation, after the first computing device divides the target data into multiple data blocks in S203, it sets an identifier for each data block, including the identifier of the first data block.
[0262] Exemplarily, the first computing device divides the target data into ten data blocks, and the identifiers set for the multiple data blocks are "data block 1", "data block 2", "data block 3",..., "data block 10" respectively. Among them, the first data block is "data block 2" among the multiple data blocks.
[0263] The first computing device can set an identifier for each data block in S203, or can also set an identifier for each data block when writing the data block into the storage block in this S206. This application does not make a limitation on this.
[0264] S206c: The first computing device records the correspondence between the identifier of the first data block and the identifier of the first storage block at the storage location index of the data block in the metadata.
[0265] The identifier of the first storage block can be the number of the first storage block. For example, the storage block numbered "2".
[0266] Exemplarily, the identifier of the first data block is "Data Block 2", the identifier of the first storage block is numbered "2", and the first computing device records the correspondence between "Data Block 2" and the number "2" at the storage location index of the data block in the metadata. As shown in Table 8, Table 8 shows the storage location index of the data block recorded in the metadata block, and Table 8 includes "Identifier of the Data Block" and "Identifier of the Storage Block".
[0267] Table 8
[0268] Identifier of the data block Identifier of the storage block Data block 5 1 Data block 2 2 Data block 3 3 Data block 4 4
[0269] The first computing device records the correspondence between this "Data Block 2" and the number "2", indicating that the first computing device records "Data Block 2" in the storage block numbered "2". Subsequently, when the read operation pointer of the second computing device indicates the storage block numbered "2", based on this correspondence, it can be known that the data block stored in this storage block is "Data Block 2".
[0270] The above S206b - S206c are optional steps. If the first computing device divides the target data into multiple data blocks and does not write them into the target storage space in the order of the data blocks, at this time, S206b - S206c can be used to identify the multiple data blocks to avoid confusing the order of the data blocks. The second computing device can also splice the multiple data blocks in the target data into the complete target data based on the identifier of the data block.
[0271] The first computing device can execute S206a first, or can execute S206b - S206c first, or can execute them synchronously. The embodiments of the present application do not limit the execution order of S206a and S206b - S206c.
[0272] S207: The first computing device determines whether all the multiple data blocks of the target data have been written into the target storage space.
[0273] If not, it indicates that there are still data blocks not written into the target storage space. After the first computing device obtains the next data block, it executes S204;
[0274] If so, it indicates that all the target data has been written into the target storage space, and S208 is executed.
[0275] In one implementation, if the first computing device divides the target data into multiple data blocks and writes them into the target storage space in the order of the data blocks, then the next data block is the next data block adjacent to the first data block.
[0276] Exemplarily, if the first computing device divides the target data into "data block 1", "data block 2", "data block 3" ... "data block 10", and the first computing device writes the data blocks into the target storage space in the order from "data block 1" to "data block 10", if the first data block is "data block 2", then the next data block is "data block 3".
[0277] In this case, if the first data block is "data block 10", then the first computing device determines that all the data blocks have been written into the target storage space.
[0278] In another implementation, if after the first computing device divides the target data into multiple data blocks, it does not write the data blocks into the target storage space in the order of the data blocks, then the next data block is any data block among the multiple data blocks in the target data that has not been written into the target storage space.
[0279] Exemplarily, if the first computing device divides the target data into "data block 1", "data block 2", "data block 3" ... "data block 10", and the first computing device does not write the data blocks into the target storage space in the order of the data blocks, if "data block 1" and "data block 2" have been written into the target storage space, then the next data block is any data block among "data block 3" to "data block 10".
[0280] In this case, if all of "data block 1" to "data block 10" have been written into the target storage space, then the first computing device determines that all the data blocks have been written into the target storage space.
[0281] S208 (optional): The first computing device records an indication mark indicating the completion of the transmission of the target data in the metadata block.
[0282] The indication mark indicating the completion of the transmission of the target data is used to instruct the second computing device to end the read operation on the target storage space after obtaining the target data.
[0283] The indication mark indicating the completion of the transmission of the target data can be a string, a number, or predefined information, for example: "finished".
[0284] Since the second computing device reads each storage block in sequence, when the second computing device obtains the indication mark indicating the completion of the transmission of the target data and obtains the target data, it can stop the read operation on the storage block to save the computing resources of the second computing device.
[0285] The following is the second part of the second process. The second part is the process of the second computing device reading data. Please refer to Figure 9 , which is a flowchart of a data transmission method provided by an embodiment of the present application. This method is applied to the second computing device, for example Figure 1Any computing device other than the first computing device in the computing device 110 shown, such as Figure 9 shown, the method may include: S301 - S306.
[0286] S301: The second computing device obtains information about the target transmission channel from the management unit.
[0287] In one implementation, the second computing device receives the information about the target transmission channel sent by the management unit.
[0288] Optionally, the second computing device receives a data transmission channel table sent by the management unit that contains the information about the target transmission channel, and the second computing device obtains the information about the target transmission channel from the data transmission channel table.
[0289] Exemplarily, the information about the target transmission channel obtained by the second computing device includes: the identifier of the sending end: "Computing Device 1", the identifier of the receiving end: "Computing Device 2", the identifier of the target transmission channel "Channel 1", the address of the target storage space "Addr3", and the storage capacity of the target storage space "10G".
[0290] After the second computing device obtains the information about the target transmission channel, it can perform a read operation on the target storage space under the instruction of the first computing device or the CXL controller, or the second computing device can periodically check whether the target data is written into the target storage space. If the target data is written, the second computing device performs a read operation on the target storage space.
[0291] The following S302 - S306 is the process of the second computing device performing a read operation on any storage block in the target storage space, such as the first storage block.
[0292] S302: The second computing device determines the state of the first storage block in the target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata of the target storage space.
[0293] Wherein, the first storage block is the storage block where the position of the current read operation of the target storage space is located, and the state of the first storage block includes: an operable state, or, an inoperable state.
[0294] When the state of the first storage block is in the operable state, the second computing device executes S303;
[0295] When the state of the first storage block is in the inoperable state, the second computing device repeats S302 until it determines that the state of the first storage block is in the operable state.
[0296] For the second computing device, when data is stored in the first storage block and the state of the first storage block is an operable state, the first storage block is a readable storage block at this time; when there is no data stored in the first storage block, or when the first storage block is being written with data, the state of the first storage block is an inoperable state, and the first storage block is an unreadable storage block at this time.
[0297] For an unreadable storage block, the second computing device needs to wait for the first computing device to write data into the storage block before it can perform a read operation on the storage block. Therefore, when the first computing device writes data into the storage block, the operation status of the storage block changes from an inoperable state to an operable state.
[0298] In one implementation, a specific implementation method is proposed for S302, including S302a - S302b:
[0299] S302a: The second computing device obtains the current write operation position and the current read operation position of the target storage space from the metadata block. Among them, the current read operation position is in the first storage block.
[0300] In one implementation, the current write operation position is the position currently indicated by the write pointer, and the current read operation position is the position currently indicated by the read pointer. The position currently indicated by the read pointer and the position currently indicated by the write pointer are recorded in the metadata block. The second computing device obtains the position currently indicated by the write pointer and the position currently indicated by the read pointer from the metadata block.
[0301] Exemplarily, if the target storage space includes 10 storage blocks, the first computing device obtains that the numbers of the 10 storage blocks are set to 1 - 10 respectively, and the first computing device uses the write pointer w_hdr = 1 - 10 to indicate the storage blocks numbered 1 - 10 respectively.
[0302] Exemplarily, if the target storage space includes 10 storage blocks, the second computing device obtains that the numbers of the 10 storage blocks are set to 1 - 10 respectively, and the second computing device uses the read pointer r_hdr = 1 - 10 to indicate the storage blocks numbered 1 - 10 respectively.
[0303] Exemplarily, if the second computing device obtains from the serial number "6" in the metadata block that the write pointer w_hdr = 2, it means that the current write operation position is the storage block numbered 2, and obtains from the serial number "7" that the read pointer r_hdr = 1, it means that the current read operation position is the storage block numbered 1.
[0304] It should be noted that if the value of the current read pointer in the metadata is the initial value NULL, it means that the second computing device has not started reading any data in the target storage space. At this time, the second computing device can point the current read pointer to the first storage block among multiple storage blocks. For example, if the second computing device changes the value of the current read pointer to "1", indicating that the current read pointer is pointed to the storage block numbered "1", then the first storage block is the storage block numbered "1".
[0305] S302b: When the position of the current read operation is different from the position of the current write operation, the second computing device determines that the first storage block of the target storage space is in an operable state.
[0306] In one implementation, when the position indicated by the current read pointer is different from the position indicated by the current write pointer, the second computing device determines that the first storage block of the target storage space is in an operable state.
[0307] Exemplarily, if the second computing device obtains the write pointer w_hdr = 2 from the serial number "6" in the metadata block and the read pointer r_hdr = 1 from the serial number "7", then the position of the current write operation is different from the position of the current read operation. The second computing device determines the first storage block of the target storage space, that is, the storage block numbered "1", to be in an operable state.
[0308] As Figure 7 shown, the positions of the write operation and the read operation are equal. Since the write operation and the read operation are executed cyclically for multiple storage blocks, for the second computing device, the first computing device is performing a write operation on the first storage block (the storage block numbered 2). At this time, the second computing device repeatedly obtains the position of the current write operation and the position of the current read operation in the metadata block until the position of the current read operation is different from the position of the current write operation. As Figure 10 shown, it indicates that the first computing device has written data into the first storage block and is performing a write operation on the next storage block. At this time, the second computing device determines that the first storage block is in an operable state.
[0309] It can be understood that the target storage space includes multiple storage blocks. The first computing device performs write operations on the multiple storage blocks in sequence, and the second computing device performs read operations on the multiple storage blocks in sequence. After all the storage blocks are written, the first computing device repeats the write operation on the multiple storage blocks from the beginning. To avoid the second computing device missing the data in the first storage block, the second computing device needs to wait for the first computing device to write data into the storage block and then perform a read operation on the storage block. Therefore, the above optional method can quickly determine the operation status of the first storage block and avoid missing data.
[0310] S303: The second computing device reads the first data block from the first storage block.
[0311] In one implementation, the second computing device sends a read data indication to the CXL controller, and the read data indication is used to instruct the CXL controller to read the first data in the first storage block.
[0312] Exemplarily, if the second computing device obtains that the number of the first storage block where the current read operation position is located is "2", the second computing device sends a read data indication to the CXL controller, and the read data indication includes: reading the first data block in the storage block numbered "2" of "Channel 1".
[0313] Correspondingly, the address of the storage block numbered "2" in "Channel 1" is recorded in the CXL controller, and the CXL controller reads the first data block from the storage space indicated by this address and sends it to the second computing device.
[0314] S304: The second computing device updates the metadata recorded in the metadata block.
[0315] Specifically, the metadata updated by the second computing device in the metadata block includes S304a - S304c:
[0316] S304a: In the metadata recorded in the metadata block, the second computing device updates the position of the current read operation from the first storage block to the next storage block.
[0317] The next storage block is the next storage block adjacent to the first storage block among the multiple storage blocks of the target storage space. For example, if the first storage block is the storage block numbered "2", the next storage block is the storage block numbered "3".
[0318] Exemplarily, the position of the current read operation is the position indicated by the current read pointer, the first storage block is the storage block numbered "2", the next storage block is the storage block numbered "3", the current read pointer in the metadata block is r_hdr = 2, and the second computing device updates the current read pointer r_hdr = 2 recorded in the metadata block to r_hdr = 3, indicating that the current read pointer is updated from indicating the storage block numbered "2" to indicating the storage block numbered "3".
[0319] S304b: When the second computing device reads the first data block from the first storage block, it correspondingly obtains the identifier of the first data block from the metadata block of the first storage block.
[0320] Among them, the storage location index of the data blocks recorded in the metadata block of the first storage block includes the correspondence between the identifier of the first data block and the identifier of the first storage block.
[0321] Exemplarily, the identifier of the first data block is "Data Block 2", the identifier of the first storage block is the number "2", and the corresponding relationship between "Data Block 2" and the number "2" is recorded at the storage location index of the data block in the metadata. The second computing device obtains the identifier "Data Block 2" of the first data block in this corresponding relationship.
[0322] The second computing device obtains the identifier of the first data block, which is used to, after obtaining multiple data blocks in the target data, splice the multiple data blocks into a complete target data based on the identifier of each data block, so as to avoid confusing the data lines of the multiple data blocks.
[0323] S304c: The second computing device deletes the corresponding relationship between the identifier of the first data block and the identifier of the first storage block in the metadata block of the first storage block.
[0324] Exemplarily, as shown in Table 8, the corresponding relationship between "Data Block 2" and the number "2" is recorded at the storage location index of the data block in the metadata. The second computing device deletes this corresponding relationship between "Data Block 2" and the number "2". When the second computing device deletes the corresponding relationship between "Data Block 2" and the number "2" in Table 8, Table 8 is updated to Table 9.
[0325] Table 9
[0326] Identifier of the data block Identifier of the storage block Data block 5 1 Data block 3 3 Data block 4 4
[0327] This S304c is an optional step. The second computing device deleting this corresponding relationship can indicate that the second computing device has obtained the data in this storage block. When the first computing device writes data into this storage block again later, the corresponding relationship between the identifier of the new data and the identifier of this storage block can be recorded again.
[0328] The second computing device can also not delete this corresponding relationship. This optional step can also be executed by the first computing device when the first computing device writes data into this storage block again. The embodiments of the present application do not make any limitations in this regard.
[0329] S305: The second computing device determines whether it has completed obtaining the target data.
[0330] If not, it indicates that the second computing device has not obtained all the data blocks in the target data, and then S302 is executed;
[0331] If so, it indicates that the second computing device has obtained all the data blocks in the target data, and then S306 is executed.
[0332] In one implementation, the second computing device obtains an indication mark indicating the completion of the transmission of the target data in the metadata block, and the total amount of data sent by the sending end recorded in the metadata block is equal to the total amount of data received by the receiving end. At this time, the second computing device determines that it has obtained the complete target data.
[0333] S306: The second computing device records an indication flag indicating that the target data has been acquired in the metadata block.
[0334] The indication flag indicating that the target data has been acquired is used to indicate that the data transmission between the first computing device and the second computing device is completed.
[0335] The indication flag indicating that the target data has been acquired can be a string, a number, or predefined information, such as: "accepted".
[0336] Optionally, the second computing device splices multiple data blocks into the complete target data in the order of the identifiers based on the identifiers of multiple data blocks in the target data.
[0337] Exemplarily, the identifiers of multiple data blocks acquired by the second computing device are respectively "data block 1", "data block 2", "data block 3"... "data block 10", and the second computing device splices the multiple data blocks into the target data in the order of "data block 1" to "data block 10" based on the identifiers of the multiple data blocks.
[0338] In the data transmission method provided by the embodiments of the present application, the first computing device writes multiple data blocks into multiple storage blocks of the target storage space respectively, and the second computing device reads multiple data blocks from multiple data blocks of the target storage space respectively. The read operation of the second computing device can start after the first computing device finishes writing the first data block. Therefore, the method provided by the embodiments of the present application can implement parallel execution of the read operation and the write operation, and improve the data transmission efficiency.
[0339] In an example, as Figure 11 shown, Figure 11 is a comparative schematic diagram of the data writing method, Figure 11 where the horizontal axis represents time, Figure 11 the upper half is a data transmission method in which the target storage space is divided into a metadata block and a storage block. When the first computing device fills the target storage space, the second computing device reads data from the target storage space. After the second computing device finishes reading the data, the first computing device repeats the write operation on the target storage space. Figure 11The lower part is a data transfer method that divides the target storage space into metadata blocks and multiple storage blocks. The target storage space is divided into 6 storage blocks. When the first computing device fills the storage block numbered 1, the second computing device starts to read the storage block numbered 1. When the first computing device fills all the multiple storage blocks (1-6) of the target storage space, the first computing device then writes to the 6 storage blocks in sequence again, and the second computing device also reads the data blocks in sequence. From the comparison above and below, it can be seen that dividing the target storage space into multiple storage blocks can achieve parallel execution of read and write operations and improve data transfer efficiency.
[0340] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of the method. To implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.
[0341] The embodiments of the present application also provide a computing device 200. As Figure 12 shown, it is a schematic structural diagram of a computing device 200 provided by the embodiments of the present application.
[0342] Among them, the computing device 200 includes: a determination unit 201, configured to determine the state of the first storage block in the target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space; wherein, the target storage space is the target transmission channel of the first computing device and the second computing device, and the CXL storage device of the target storage space is connected to both the first computing device and the second computing device; the position of the current write operation is the first storage block, and the first storage block is used to store the data block transmitted from the first computing device to the second computing device. The state of the first storage block includes: an operable state, or, an inoperable state; a write unit 202, configured to write the first data block into the first storage block when the state of the first storage block is an operable state, so that the second computing device reads the first data block from the first storage block.
[0343] In some embodiments, the target storage space includes multiple storage blocks. The first storage block is any one of the multiple storage blocks. Metadata is recorded in the metadata block, and the metadata includes: the storage capacities of the multiple storage blocks. The computing device 200 further includes an obtaining unit 203, configured to obtain the storage capacities of the multiple storage blocks from the metadata block before writing the first data block into the first storage block when the state of the first storage block is an operable state; the computing device 200 further includes a dividing unit 204, configured to divide the target data into multiple data blocks based on the storage capacity of each storage block; wherein, the target data is data that the first computing device needs to send to the second computing device, and the multiple data blocks include a first data block, and the storage capacity required by the first data block is less than or equal to the storage capacity of the first storage block.
[0344] In some embodiments, based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space, the determining unit 201 is specifically configured to obtain the position of the current write operation and the position of the current read operation of the target storage space from the metadata block; when the position of the current write operation is different from the position of the current read operation, the first computing device determines that the state of the first storage block of the target storage space is an operable state.
[0345] In some embodiments, the position of the current write operation is the position currently indicated by the write pointer, and the position of the current read operation is the position currently indicated by the read pointer.
[0346] In some embodiments, metadata is recorded in the metadata block, and the metadata includes the position of the current write operation. The computing device 200 further includes an updating unit 205, configured to, after writing the first data block into the first storage block, update the position of the current write operation from the first storage block to the next storage block in the metadata recorded in the metadata block.
[0347] In some embodiments, the metadata further includes: a storage location index of the data block, and the storage location index of the data block is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located. The computing device 200 further includes a setting unit 206, configured to set an identifier for the first data block; when the state of the first storage block is an operable state, after writing the first data block into the first storage block, record the correspondence between the identifier of the first data block and the identifier of the first storage block at the storage location index of the data block in the metadata.
[0348] In some embodiments, the setting unit 206 is further configured to, when the first computing device writes all the multiple data blocks of the target data into the target storage space, record an indication flag indicating that the transmission of the target data is completed in the metadata block; the indication flag indicating that the transmission of the target data is completed is used to instruct the second computing device to end the read operation on the target storage space after obtaining the target data.
[0349] In some embodiments, metadata is recorded in the metadata block. The metadata includes the identifier of the first computing device, the identifier of the second computing device, the position of the current write operation, and the position of the current read operation. The identifier of the first computing device is the sender identifier, and the identifier of the second computing device is the receiver identifier.
[0350] In some embodiments, both the first computing device and the second computing device are connected to the management unit. The management unit is used to manage the storage space of one or more CXL storage devices. Before determining the state of the first storage block in the target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space, the acquisition unit 203 is further configured to obtain information about the target transmission channel from the management unit. The information about the target transmission channel includes: the identifier of the target transmission channel, the identifier of the first computing device, the identifier of the second computing device, the address of the target storage space, and the storage capacity of the target storage space.
[0351] The embodiment of the present application further provides a computing device 300. As Figure 13 shown, it is a schematic structural diagram of a computing device 300 provided by the embodiment of the present application.
[0352] Among them, the computing device 300 includes: a determination unit 301, configured to determine the state of the first storage block in the target storage space based on the position of the current write operation and the position of the current read operation recorded in the metadata block of the target storage space. The target storage space is the target transmission channel of the first computing device and the second computing device, and the CXL storage device including the target storage space is connected to both the first computing device and the second computing device. The position of the current read operation is the first storage block, and the first storage block is used to store the data block transmitted from the first computing device to the second computing device. The state of the first storage block includes: an operable state, or, an inoperable state; a reading unit 302, configured to read the first data block from the first storage block when the state of the first storage block is the operable state.
[0353] In a possible implementation manner, metadata is recorded in the metadata block. The metadata includes the identifier of the first computing device, the identifier of the second computing device, the position of the current write operation, and the position of the current read operation. The identifier of the first computing device is the sender identifier, and the identifier of the second computing device is the receiver identifier.
[0354] In some embodiments, based on the positions of the current write operation and the current read operation recorded in the metadata block of the target storage space, the determining unit 301 is specifically configured to obtain the positions of the current write operation and the current read operation of the target storage space from the metadata block; when the position of the current read operation is different from the position of the current write operation, the second computing device determines that the state of the first storage block of the target storage space is an operable state.
[0355] In some embodiments, the position of the current write operation is the position currently indicated by the write pointer, and the position of the current read operation is the position currently indicated by the read pointer.
[0356] In some embodiments, the metadata block records metadata, and the metadata includes the position of the current read operation. After reading the first data block from the first storage block, the computing device 300 further includes an updating unit 303, configured to update the position of the current read operation from the first storage block to the next storage block in the metadata recorded in the metadata block.
[0357] In some embodiments, the metadata block records metadata, and the metadata includes: a storage location index of the data block, where the storage location index of the data block is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located. The computing device 300 further includes an obtaining unit 304, configured to obtain the identifier of the first data block from the metadata block of the first storage block correspondingly when reading the first data block from the first storage block; where the storage location index of the data block recorded in the metadata block of the first storage block includes the correspondence between the identifier of the first data block and the identifier of the first storage block; the computing device 300 further includes a deleting unit 305, configured to delete the correspondence between the identifier of the first data block and the identifier of the first storage block in the metadata block of the first storage block.
[0358] In some embodiments, the computing device 300 further includes a recording unit 306, configured to record an indication mark of having obtained the target data in the metadata block when the second computing device obtains an indication mark indicating that the transmission of the target data is completed in the metadata block and has obtained the target data; where the target data is the data that the first computing device needs to send to the second computing device, and the indication mark of having obtained the target data is used to indicate that the data transmission between the first computing device and the second computing device is completed.
[0359] In some embodiments, both the first computing device and the second computing device are connected to the management unit, and the management unit is used to manage the storage space of one or more CXL storage devices. Before determining the status of the first storage block in the target storage space based on the positions of the current write operation and the current read operation recorded in the metadata block of the target storage space, the acquisition unit 304 is further configured to obtain information about the target transmission channel from the management unit; the information about the target transmission channel includes: the identifier of the target transmission channel, the identifier of the first computing device, the identifier of the second computing device, the address of the target storage space, and the storage capacity of the target storage space.
[0360] The embodiments of the present application further provide a management device 400. As Figure 14 shown, it is a schematic structural diagram of a management device 400 provided by the embodiments of the present application.
[0361] Among them, the management device 400 includes: an allocation unit 401, configured to allocate a target storage space in the CXL storage space for the first computing device and the second computing device based on the data transmission requirements between the first computing device and the second computing device; the CXL storage device to which the target storage space belongs is connected to both the first computing device and the second computing device, and the target storage space is used as a target transmission channel for data transmission between the first computing device and the second computing device; a partitioning unit 402, configured to divide the target storage space into a metadata block and a storage block; wherein, the metadata block is used to record the metadata of the target storage space; the metadata includes the position of the current write operation and the position of the current read operation; the storage block is used to store at least some data blocks of the target data transmitted from the first computing device to the second computing device; a sending unit 403, configured to send the information about the target transmission channel to the first computing device and the second computing device respectively, so that the first computing device writes at least some data blocks into the corresponding storage block based on the metadata in the metadata block of the target storage space; the information about the target transmission channel includes: the identifier of the first computing device, the identifier of the second computing device, the identifier of the target transmission channel, the address of the target storage space, and the storage capacity of the target storage space.
[0362] In some embodiments, the number of storage blocks is multiple, and the multiple storage blocks are used to enable the first computing device to divide the target data into multiple data blocks based on the storage capacities of the multiple storage blocks.
[0363] Of course, the computing device 200, the computing device 300, or the management device 400 provided by the embodiments of the present application includes but is not limited to the above modules.
[0364] Figure 15 It is a schematic structural diagram of a device 500 provided by the embodiments of the present application, and the device 500 may be Figure 1 the computing device 110 in, or a management device installed with FM. As Figure 15As shown, the device 500 includes a processor 501, a memory 502, and a network interface 503.
[0365] Among them, the processor 501 includes one or more CPUs. The CPU can be a single-core CPU or a multi-core CPU.
[0366] The memory 502 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, or an optical memory, etc.
[0367] In some embodiments, the processor 501 implements the data transmission method or the transmission channel allocation method provided by the embodiments of the present application by reading the instructions stored in the memory 502. Alternatively, the processor 501 implements the data transmission method or the transmission channel allocation method provided by the embodiments of the present application by the instructions stored internally. In the case where the processor 501 implements the method in the above embodiments by reading the instructions stored in the memory 502, the memory 502 stores the instructions for implementing the data transmission method or the transmission channel allocation method provided by the embodiments of the present application.
[0368] The network interface 503, a type of device including a transmitter and a receiver, is used to communicate with other devices or communication networks. It can be a wired interface (port), such as a fiber distributed data interface (FDDI) or a gigabit ethernet (GE) interface. Alternatively, the network interface 503 is a wireless interface. It should be understood that the network interface 503 includes multiple physical ports and is used for communication, etc.
[0369] In some embodiments, the device 500 further includes a bus 504. The above-mentioned processor 501, memory 502, and network interface 503 are usually interconnected through the bus 504 or interconnected in other ways.
[0370] In actual implementation, the determination unit 201, the writing unit 202, the obtaining unit 203, the dividing unit 204, the updating unit 205, and the setting unit 206, or the determination unit 301, the reading unit 302, the updating unit 303, the obtaining unit 304, the deleting unit 305, and the recording unit 306, or the allocating unit 401, the dividing unit 402, and the sending unit 403 can be implemented by a processor calling computer program code in a memory. The specific execution process can refer to the description in the above method section and will not be elaborated here.
[0371] An embodiment of the present application provides a computing device, including a memory and at least one processor connected to the memory. The memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the at least one processor, the computing device is caused to execute each step of the data transmission method shown in the above method embodiment.
[0372] Another embodiment of the present application further provides a management device, including a processor. The processor is coupled to a memory, and the memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the management device is caused to execute each step of the transmission channel allocation method shown in the above method embodiment.
[0373] Another embodiment of the present application further provides a computer-readable storage medium. Computer instructions are stored in the computer-readable storage medium. When the computer instructions run on a computing device, the computing device is caused to execute each step that the computing device executes in the data transmission method process shown in the above method embodiment; or when the computer instructions run on a management device, the management device is caused to execute each step that the management device executes in the transmission channel allocation method process shown in the above method embodiment.
[0374] Another embodiment of the present application further provides another chip system, which is applied to a computing device. The chip system includes one or more interface circuits and one or more processors. The interface circuits and the processors are interconnected by lines. The interface circuits are used to receive signals from the memory of the computing device and send signals to the processors. The signals include computer instructions stored in the memory. When the processor of the computing device executes the computer instructions, the computing device executes each step that the computing device executes in the data transmission method process shown in the above method embodiment.
[0375] Another embodiment of the present application further provides a chip system, which is applied to a management device. The chip system includes one or more interface circuits and one or more processors. The interface circuits and the processors are interconnected by lines. The interface circuit is configured to receive signals from the memory of the management device and send signals to the processors, and the signals include computer instructions stored in the memory. When the processor of the management device executes the computer instructions, the management device performs each step executed by the management device in the transmission channel allocation method flow shown in the above method embodiment.
[0376] In another embodiment of the present application, there is also provided another computer program product, which includes computer instructions. When the computer instructions run on a computing device, the computing device is caused to perform each step executed by the computing device in the data transmission method flow shown in the above method embodiment.
[0377] In another embodiment of the present application, there is also provided a computer program product, which includes computer instructions. When the computer instructions run on a management device, the management device is caused to perform each step executed by the management device in the transmission channel allocation method flow shown in the above method embodiment.
[0378] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a server, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0379] The above is only the specific implementation manner of the present application. Those skilled in the art can think of changes or substitutions according to the specific implementation manner provided by the present application, and all of them should be covered within the protection scope of the present application.
Claims
1. A data transmission method, characterized in that, Applied to a first computing device, the method includes: Based on the positions of the current write operation and the current read operation recorded in the metadata block of the target storage space, determining the state of the first storage block in the target storage space; wherein, the target storage space is the target transmission channel between the first computing device and the second computing device, and a Compute Express Link (CXL) storage device including the target storage space is connected to both the first computing device and the second computing device; the position of the current write operation is the first storage block, and the first storage block is used to store the data block transmitted from the first computing device to the second computing device, and the state of the first storage block includes: an operable state, or, an inoperable state; When the state of the first storage block is the operable state, writing a first data block into the first storage block so that the second computing device reads the first data block from the first storage block.
2. The method according to claim 1, characterized in that, The target storage space includes multiple storage blocks, and the first storage block is any one of the multiple storage blocks. Metadata is recorded in the metadata block, and the metadata includes: the storage capacities of the multiple storage blocks. Before writing the first data block into the first storage block when the state of the first storage block is the operable state, the method further includes: Obtaining the storage capacities of the multiple storage blocks from the metadata block; Based on the storage capacity of each storage block, dividing the target data into multiple data blocks; wherein, the target data is the data that the first computing device needs to send to the second computing device, and the multiple data blocks include the first data block, and the storage capacity required by the first data block is less than or equal to the storage capacity of the first storage block.
3. The method according to claim 1 or 2, characterized in that The determining the state of the first storage block in the target storage space based on the positions of the current write operation and the current read operation recorded in the metadata block of the target storage space includes: Obtaining the position of the current write operation and the position of the current read operation of the target storage space from the metadata block; When the position of the current write operation is different from the position of the current read operation, the first computing device determines that the state of the first storage block in the target storage space is the operable state.
4. The method according to any one of claims 1 to 3, characterized in that, Metadata is recorded in the metadata block, and the metadata includes the position of the current write operation. After writing the first data block into the first storage block, the method further includes: In the metadata recorded in the metadata block, updating the position of the current write operation from the first storage block to the next storage block.
5. The method according to any one of claims 1 to 4, characterized in that, Metadata is recorded in the metadata block, and the metadata further includes: a storage location index of the data block, and the storage location index of the data block is used to record the correspondence between the identifier of the unread data block and the identifier of the storage block where the unread data block is located. The method further includes: Setting an identifier for the first data block; After writing the first data block into the first storage block when the state of the first storage block is the operable state, the method further includes: At the storage location index of the data block in the metadata, record the correspondence between the identifier of the first data block and the identifier of the first storage block.
6. The method according to any one of claims 2 to 5, characterized in that The method further includes: After the first computing device writes all data blocks of the target data to the target storage space, record an indication flag indicating that the transmission of the target data is completed in the metadata block; the indication flag indicating that the transmission of the target data is completed is used to instruct the second computing device to end the read operation on the target storage space after obtaining the target data.
7. A data transmission method, characterized in that, Applied to a second computing device, the method includes: Based on the current write operation position and the current read operation position recorded in the metadata block of the target storage space, determine the status of the first storage block in the target storage space; wherein, the target storage space is the target transmission channel between the first computing device and the second computing device, and the Compute Express Link (CXL) storage device including the target storage space is connected to both the first computing device and the second computing device; the current read operation position is the first storage block, and the first storage block is used to store the data blocks transmitted from the first computing device to the second computing device, and the status of the first storage block includes: an operable state, or, an inoperable state; In the case where the status of the first storage block is the operable state, read the first data block from the first storage block.
8. A transmission channel allocation method, characterized in that Applied to a management unit, the management unit is connected to one or more Compute Express Link (CXL) storage devices, and the management unit is used to manage the CXL storage space of the one or more CXL storage devices. The method includes: Based on the data transmission requirements between the first computing device and the second computing device, allocate a target storage space in the CXL storage space for the first computing device and the second computing device; the CXL storage device to which the target storage space belongs is connected to both the first computing device and the second computing device, and the target storage space is used as the target transmission channel for data transmission between the first computing device and the second computing device; Divide the target storage space into a metadata block and a storage block; wherein, the metadata block is used to record the metadata of the target storage space; the metadata includes the current write operation position and the current read operation position; the storage block is used to store at least some of the data blocks of the target data transmitted from the first computing device to the second computing device; Send the information of the target transmission channel to the first computing device and the second computing device respectively, so that the first computing device writes the at least some data blocks into the corresponding storage block based on the metadata in the metadata block of the target storage space; the information of the target transmission channel includes: the identifier of the first computing device, the identifier of the second computing device, the identifier of the target transmission channel, the address of the target storage space, and the storage capacity of the target storage space.
9. A computing device, characterized in that, Comprising a memory and at least one processor connected to the memory, the memory being used to store computer program code, the computer program code including computer instructions, which, when executed by the at least one processor, cause the computing device to execute the method according to any one of claims 1 to 7.
10. A management device, characterized in that, Comprising a processor, the processor being coupled to a memory, the memory being used to store a program or instructions, which, when executed by the processor, cause the management device to execute the method according to claim 8.