A communication transmission method, product, electronic device, and medium
By directly transmitting data between devices, bypassing the host memory relay, the problems of data transmission latency and resource consumption between devices are solved, the security of data transmission and the efficiency of device resource utilization are improved, and efficient data transmission between devices is achieved.
Patent Information
- Application Number
- CN202511350286.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-09-22
AI Technical Summary
Data transmission between devices needs to pass through the host memory, resulting in high latency and high consumption of host resources.
By obtaining the device's address information, the non-volatile memory host controller interface specification protocol commands are determined, and data transmission is performed directly between devices, bypassing the host memory intermediary and utilizing the device's internal resources to complete the data transmission.
It reduces data transmission latency, decreases the occupation of host resources, improves the performance of software RAID, and frees up the host CPU's computing resources.
Smart Images

Figure CN120848811B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage technology, and in particular to a communication transmission method, product, electronic device, and medium. Background Technology
[0002] The Non-Volatile Memory Express (NVMe) host controller interface specification is used for data transfer between devices. The related Redundant Array of Independent Disks (RAID) read / write data flow process is as follows: data from one NVMe device is read into host memory using an NVMe read command; after the new location is calculated, the data is then written to another NVMe device using an NVMe write command.
[0003] Because data transmission between devices requires passing through the host memory, it results in high latency and consumes significant host resources. Therefore, reducing data transmission latency and host resource consumption is a pressing technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a communication transmission method, product, electronic device, and medium to solve the problem that data transmission between devices requires passing through the host memory, resulting in high latency and excessive host resource consumption.
[0005] To address the aforementioned technical problems, this invention provides a communication transmission method applied to a host terminal, the method comprising:
[0006] Obtain the address information of the devices it manages;
[0007] Determine the non-volatile memory host controller interface specification protocol command based on the device's address information;
[0008] The Non-volatile Memory Host Controller Interface Specification Protocol (NTSCIP) commands are sent to the devices so that the devices can determine the address information of multiple devices according to the NSCIPIP commands.
[0009] The end-to-end data transmission instructions are determined based on the address information of the source device and the address information of the target device; wherein, both the source device and the target device are devices managed by themselves;
[0010] The data transmission instruction is sent to the source device so that the source device can transmit data to the target device according to the data transmission instruction.
[0011] On the one hand, obtaining the address information of the devices it manages includes:
[0012] When it detects that it is in a startup state or that there is a hot-plugged device, it obtains the information in the base address register of the device it manages, and allocates base address space to the device according to the information in the base address register;
[0013] The internal storage region of the device is obtained by configuring the registers related to the memory block in the base address space;
[0014] The physical address range of the device is determined based on its internal storage area.
[0015] On the other hand, after determining the physical address range of the device based on its internal storage area, and before determining the non-volatile memory host controller interface specification protocol commands based on the device's address information, the following steps are also included:
[0016] Convert the device's physical address range to the device's virtual address range;
[0017] The step of determining the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device includes:
[0018] The end-to-end data transmission instructions are determined based on the virtual address information of the source device and the virtual address information of the target device.
[0019] On the other hand, converting the device's physical address range to the device's virtual address range includes:
[0020] Get the start and end values of the physical address;
[0021] Establish the translation relationship between physical addresses and virtual addresses based on memory management mechanisms and device storage architecture;
[0022] The starting value of the virtual address is determined based on the conversion relationship and the starting value of the physical address;
[0023] The end value of the virtual address is determined based on the conversion relationship and the end value of the physical address;
[0024] The virtual address range corresponding to the physical address range of the device is determined by the start value and the end value of the virtual address.
[0025] On the other hand, before determining the non-volatile memory host controller interface specification protocol commands based on the device's address information, the process also includes:
[0026] When it detects that it is in a powered-on state or that there is a hot-swappable device, it obtains the device by enumeration and obtains the unique identifier of the device;
[0027] In its own device resource manager, an inter-device address mapping table is established based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices;
[0028] The command to determine the non-volatile memory host controller interface specification protocol based on the device's address information includes:
[0029] Based on the device address information recorded in the device address mapping table, determine the non-volatile memory host controller interface specification protocol command.
[0030] On the other hand, the inter-device address mapping table also includes access permission information for the devices; before determining the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the inter-device address mapping table, the following is also included:
[0031] Retrieve device access permission information recorded in the device address mapping table;
[0032] If the device access permission information is found to meet the preset requirements, the step of determining the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the device address mapping table is initiated.
[0033] On the other hand, communication transmission methods also include:
[0034] Starting from obtaining the inter-device address mapping table, it acquires its own topology and detects device configuration within a preset time period;
[0035] Update the device address mapping table based on its own topology and the configuration of the detection equipment.
[0036] On the other hand, determining the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the device address mapping table includes:
[0037] Obtain the initial characteristics of the configuration characteristic command in the non-volatile memory host controller interface specification protocol;
[0038] The device address information recorded in the device address mapping table is used to determine the characteristics of the device address mapping configuration.
[0039] Based on the initial characteristics and the characteristics used to characterize the inter-device address mapping configuration, the non-volatile memory host controller interface specification protocol commands are determined.
[0040] On the other hand, the Non-volatile Memory Host Controller Interface Specification Protocol (NTSCIP) commands are sent to the devices so that the devices can determine the address information of multiple devices according to the NSCIPIP commands, including:
[0041] Obtain the drivers corresponding to the devices it manages;
[0042] The device uses the driver corresponding to the device it manages to send the Non-volatile Memory Host Controller Interface Specification Protocol (NCONMIP) command to the device. After receiving the NCONMIP command, the device parses the NCONMIP command field to obtain the inter-device address mapping table and determines the address information of multiple devices based on the inter-device address mapping table.
[0043] On the other hand, determining the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device includes:
[0044] Obtain the high and low bits of the virtual address from the address information of the source device;
[0045] Obtain the high and low bits of the virtual address from the address information of the target device;
[0046] Obtain the data transfer operation and the corresponding data volume;
[0047] The end-to-end data transmission instructions are determined based on the high and low bits of the virtual address in the address information of the source device, the high and low bits of the virtual address in the address information of the target device, and the data volume corresponding to the data transmission operation and the data operation.
[0048] On the other hand, sending the data transmission instruction to the source device includes:
[0049] Write the data transmission instruction to the input / output extraction queue;
[0050] Receive a request from the source device that represents an instruction to acquire input / output;
[0051] The data transmission instruction in the input / output extraction queue is used to respond to the request of the source device to send the data transmission instruction to the source device.
[0052] On the other hand, after sending the data transmission instruction to the source device, and before the source device transmits data to the target device according to the data transmission instruction, the method further includes:
[0053] The source device parses the data transmission instruction and extracts the identification information related to the submission queue operation;
[0054] Based on the identification information, locate the target position to be processed in the submission queue;
[0055] Send a signal to the control module of the submission queue to indicate an update to the target location;
[0056] The control module that submits the queue responds to the signal used to characterize the update of the target position and updates the queue head position information stored in the head register to the information corresponding to the target position.
[0057] On the other hand, the source device transmitting data to the target device according to the data transmission instruction includes:
[0058] The source device obtains the data transmission operation, the virtual address of the source device, and the virtual address of the target device after parsing the data transmission instruction.
[0059] The virtual address of the source device is converted to the physical address of the source device according to the inter-device address mapping table;
[0060] The virtual address of the target device is converted to the physical address of the target device according to the inter-device address mapping table;
[0061] Based on the physical address of the source device, the physical address of the target device, and the data transmission operation, a transaction request is initiated to the target device to characterize the data transmission.
[0062] On the other hand, after the source device initiates a transaction request to the target device to characterize the data transmission based on the source device's physical address, the target device's physical address, and the data transmission operation, the method further includes:
[0063] The target device parses the transaction request used to characterize data transmission and verifies the address in the parsed transaction request;
[0064] If the verification passes, and the data transmission operation is detected to be a write operation, the data carried in the parsed transaction request is written to the destination address in the target device; a transaction layer protocol packet containing a status code indicating that the data writing is complete is obtained, and the transaction layer protocol packet is sent to the source device;
[0065] If the data transmission operation is detected to be a read data operation, the target data is read from the destination address in the target device; a transaction layer protocol packet containing a status code indicating that the data reading is complete and the target data is obtained, and the transaction layer protocol packet is sent to the source device.
[0066] On the other hand, after the target device sends the transaction layer protocol packet to the source device, the method further includes:
[0067] The operation of writing the completion status into the input / output queue of the source device in response to the input / output completion queue;
[0068] Receive information sent by the source device to itself, indicating that the data transmission command response has been completed.
[0069] On the other hand, after receiving information sent by the source device to itself indicating the completion of the data transmission instruction response, the method further includes:
[0070] Extract the completion status from its own input / output completion queue to determine the results of the input / output operations that the source device has completed;
[0071] Determine the value to be written to the input / output completion queue head register of the source device; wherein, the value to be written is determined by the position of the processed entry in the input / output completion queue of the source device;
[0072] The write instruction, which includes the identifier of the input / output completion queue head register and the value to be written, is sent to the source device via the communication bus, so that the source device, upon receiving the write instruction, stores the value to be written into the corresponding head register.
[0073] To address the aforementioned technical problems, the present invention also provides a communication transmission method applied at the source device end, the method comprising:
[0074] The system receives a data transmission instruction from a host device; wherein the data transmission instruction is for the host device to obtain the address information of the devices it manages; determines a Non-volatile Memory Host Controller Interface Specification Protocol (NVISP) command based on the device's address information; sends the NVISP command to the devices so that the devices can determine the address information of multiple devices based on the NVISP command; and determines an end-to-end data transmission instruction based on the address information of the source device and the address information of the target device; wherein both the source device and the target device are devices managed by the host device.
[0075] Data is transmitted to the target device according to the data transmission instruction.
[0076] To address the aforementioned technical problems, the present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the aforementioned communication transmission method.
[0077] To address the aforementioned technical problems, the present invention also provides an electronic device, comprising:
[0078] Memory, used to store computer programs;
[0079] A processor is used to implement the steps of the above-described communication transmission method when executing the computer program.
[0080] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned communication transmission method.
[0081] The beneficial effects of this invention are as follows: In this communication transmission method, the host determines the Non-Volatile Memory Host Controller Interface Specification (NVMC) command based on the address information of the devices it manages and sends the command to the devices, enabling any device to obtain the address information of other devices, which is a prerequisite for direct data transmission between devices. Furthermore, the host determines an end-to-end data transmission instruction based on the address information of the source device and the target device and sends the instruction to the source device. That is, in this method, when any device stores the address information of other devices, an end-to-end data transmission instruction between the source and target devices is added, enabling direct data transmission between the source and target devices, bypassing the host memory intermediary, reducing the number of data copies, and lowering latency. Secondly, in the host, the RAID software offloads read and write operations to the device internally, effectively utilizing the device's internal resources, thereby offloading host system resources, reducing the occupation of host resources, and improving the overall performance of the software RAID. Thirdly, the host CPU does not need to participate in data transmission, freeing up computing resources for other tasks and reducing the host CPU overhead.
[0082] In addition, when the host obtains the physical address it manages, it directly relies on the configuration register of the device's base address space, which improves the efficiency of address acquisition. Secondly, by determining the physical address range based on the device's internal storage area, the address information of the device can be accurately obtained, reducing the error of address identification.
[0083] After obtaining the physical address, it is converted into a virtual address. On the one hand, the end-to-end data transmission instructions do not use the real physical address, but the virtual address, thus ensuring transmission security. On the other hand, since the physical addresses of different devices are different, converting the physical address into a virtual address improves the universality of the instructions.
[0084] In the process of translating physical addresses to virtual addresses, based on a pre-defined conversion relationship between physical and virtual addresses, the start and end values of the physical address are converted to their corresponding start and end values for the virtual address, thereby determining the range of virtual addresses. This conversion relationship enables rapid calculation and improves the efficiency of physical address to virtual address conversion.
[0085] Before determining the Non-Volatile Memory Host Controller Interface Specification (NVMC) protocol command based on the device's address information, the system establishes an inter-device address mapping table in its own device resource manager, based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices. The NVMC protocol command is then determined based on this inter-device address mapping table, ensuring that after the host sends the NVMC protocol command to the device, any device can obtain the address information of the devices managed by the host.
[0086] Before issuing the Non-volatile Memory Host Controller Interface Specification Protocol (NTMS) command containing the inter-device address mapping table, authentication is performed based on the device access permission information recorded in the inter-device address mapping table. Only when the device access permission information meets the preset requirements is the NMS command issued, thus improving the security of data transmission between the end (one device managed by the host) and the end (another device managed by the host).
[0087] The host can update the inter-device address mapping table according to its own topology and the configuration of the detection devices, ensuring the accuracy of the information in the inter-device address mapping table, thereby improving the accuracy and success rate of end-to-end data transmission.
[0088] When determining the Non-volatile Memory Host Controller Interface Specification (NTH Controller) Protocol command based on the device address information recorded in the device address mapping table, the NTH Controller Interface Specification adds an inter-device address mapping configuration to the original content of the setting feature command in the NTH Controller Interface Specification. This extends the NTH Controller Interface Specification, achieving compatibility with existing devices while supporting future new devices.
[0089] The end-to-end data transmission instructions are determined based on the high and low bits of the virtual address in the address information of the source device, the high and low bits of the virtual address in the address information of the target device, and the data volume corresponding to the data transmission operation and the data operation, so that the commands have universality.
[0090] When data transmission commands are sent to the source device, they are submitted through input / output queues, allowing the host and device to transmit commands asynchronously without continuous synchronous waiting, thus improving the efficiency of data transmission and command processing.
[0091] Before transmitting data to the target device according to the data transmission command, the source device updates its header register to ensure that key information such as the starting address of the transmission is accurate, thereby improving the accuracy and reliability of data transmission. Furthermore, by parsing the command, accurately locating the target, triggering a targeted update signal, and having the control module directly operate the register, redundant processing steps are reduced, ensuring accurate update position and rapid response.
[0092] Based on the physical address of the source device, the physical address of the target device, and the data transmission operation, a transaction request is initiated to the target device to characterize the data transmission. By encapsulating data transmission-related operations into standardized transactions, unified management is facilitated.
[0093] In addition, the present invention also provides a communication transmission method, computer program product, electronic device and computer-readable storage medium applied to the source device, which have the same or corresponding technical features as the communication transmission method applied to the host described above, and have the same effect. Attached Figure Description
[0094] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0095] Figure 1 This is a schematic diagram of a typical software RAID read / write data flow framework;
[0096] Figure 2 A flowchart illustrating a communication transmission method applied to a host side, provided as an embodiment of the present invention;
[0097] Figure 3 A schematic diagram of a novel software RAID read / write data stream framework provided in an embodiment of the present invention;
[0098] Figure 4 A schematic diagram illustrating a data transmission process provided in an embodiment of the present invention;
[0099] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0100] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0101] The core of this invention is to provide a communication transmission method, product, electronic device, and medium to solve the problem that data transmission between devices needs to pass through the host memory, resulting in high latency and excessive host resource consumption.
[0102] RAID can be categorized into three types based on its implementation: software RAID, hardware RAID, and hybrid software / hardware RAID. Software RAID relies on the operating system or third-party software to implement its functions, requiring no additional hardware, resulting in low cost and good compatibility, but it consumes system resources and memory bandwidth. Figure 1 This is a schematic diagram of a typical software RAID read / write data flow framework, such as... Figure 1 As shown, the system includes a host, switch one, switch two, and solid-state drives (SSDs). The host includes memory, a software independent disk redundant array (RAID), device drivers (non-volatile memory host controller interface specification drivers), and a root complex. The root port in the root complex is connected to the uplink port of switch one. Port one (i.e., downlink port one) of switch one is connected to the uplink port of switch two. Ports one (i.e., downlink port one) to four (i.e., downlink port four) of switch two are connected to SSDs one through four, respectively. Ports two (i.e., downlink port two) and three (i.e., downlink port three) of switch one are connected to SSDs five and six.
[0103] RAID expansion functionality allows for the expansion of storage (such as...). Figure 1 During the process of adding solid-state drives (SSDs) in the RAID stripe, the data blocks in the RAID stripe will be rearranged, involving the migration of data from SSD1 to SSD4. In traditional NVMe architecture, data transfer between devices requires relaying through host memory. The general process is: data from SSD1 is read into host memory via NVMe read commands, the new location is calculated, and then the data is written to SSD4 via NVMe write commands. This relay mechanism results in additional memory copying and CPU intervention, increasing latency and system load. However, with the surge in data volume, the expansion of storage system scale, and the continuous improvement of PCIe interface performance and NVMe SSD performance, the system performance bottleneck has gradually shifted from disk I / O to the host system, and the advantages of software RAID have diminished. However, given its low cost, strong compatibility, and ease of operation, it cannot be completely abandoned.
[0104] Based on this, this invention proposes a novel end-to-end data transmission method for software RAID read / write mechanisms, leveraging the high performance advantages of NVMe disks. This method aims to reduce latency, improve the performance of software RAID, and significantly free up system resources to enhance the overall performance of the storage system.
[0105] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Figure 2 A flowchart of a communication transmission method applied to a host side provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method includes:
[0106] S10: Obtain the address information of the devices managed by itself;
[0107] S11: Determine the non-volatile memory host controller interface specification protocol command based on the device's address information;
[0108] S12: Send the Non-volatile Memory Host Controller Interface Specification Protocol (NTMS) command to the device so that the device can determine the address information of multiple devices according to the NMS command.
[0109] S13: Determine the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device; wherein, both the source device and the target device are devices managed by themselves;
[0110] S14: Send a data transmission command to the source device so that the source device can transmit data to the target device according to the data transmission command.
[0111] This communication transmission method is specifically used for host-side software RAID. The device specifically refers to an NVMe device, such as an NVMe disk. In implementation, obtaining the address information of the devices managed by the system includes:
[0112] When it detects that it is in a startup state or that there is a hot-plugged device, it obtains the information in the base address register of the device it manages, and allocates base address space to the device according to the information in the base address register;
[0113] The internal storage region of the device is obtained by configuring the registers related to the memory block in the base address space;
[0114] The physical address range of the device is determined based on its internal storage area.
[0115] When the host obtains the physical address it manages, it directly relies on the configuration register of the device's base address space, which improves the efficiency of address acquisition. Secondly, by determining the physical address range based on the device's internal storage area, it can accurately obtain the device's address information and reduce address recognition errors.
[0116] Data transfer occurs between devices managed by software RAID, i.e., NVMe disks (such as SSDs). This data transfer between devices is the end-to-end data transfer provided in this invention. Before the source device transmits data to the target device, the host sends an end-to-end data transfer command to the source device. If the end-to-end data transfer command is created directly based on the device's physical address, i.e., the actual address, the security of the end-to-end data transfer command is low; moreover, the physical addresses of different devices vary significantly. Therefore, to ensure the security of the end-to-end data transfer command and improve its universality, in implementation, after determining the physical address range of the device based on its internal storage area, and before determining the non-volatile memory host controller interface specification protocol command based on the device's address information, the following steps are also included:
[0117] Convert the device's physical address range to the device's virtual address range.
[0118] To improve the efficiency of address translation, converting the device's physical address range to the device's virtual address range includes:
[0119] Get the start and end values of the physical address;
[0120] Establish the translation relationship between physical addresses and virtual addresses based on memory management mechanisms and device storage architecture;
[0121] The starting value of the virtual address is determined based on the translation relationship and the starting value of the physical address;
[0122] The end value of the virtual address is determined based on the translation relationship and the end value of the physical address;
[0123] The virtual address range corresponding to the physical address range of the device is determined by the start value and end value of the virtual address.
[0124] In this method, during the conversion of physical addresses to virtual addresses, based on a pre-defined conversion relationship between physical and virtual addresses, the start and end values of the physical address are converted to the corresponding start and end values of the virtual address, thereby determining the range of the virtual address. This conversion relationship enables rapid calculation and improves the efficiency of converting physical addresses to virtual addresses.
[0125] After obtaining the address information of the devices it manages, it determines the Non-volatile Memory Host Controller Interface Specification (NTMS) protocol commands based on the device address information. Specifically, before determining the NMS protocol commands based on the device address information, the process also includes:
[0126] When it detects that it is in a powered-on state or that there is a hot-swappable device, it obtains the device by enumeration and obtains the unique identifier of the device;
[0127] In its own device resource manager, a device-to-device address translation table (D2DATT) is established based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices.
[0128] The non-volatile memory host controller interface specification protocol commands determined based on the device's address information include:
[0129] Based on the device address information recorded in the device address mapping table, determine the non-volatile memory host controller interface specification protocol command.
[0130] In this method, before determining the Non-volatile Memory Host Controller Interface Specification (NTMS) command based on the device's address information, an inter-device address mapping table is established in the device's own device resource manager based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices. The NMS command is then determined based on this inter-device address mapping table, ensuring that after the host sends the NMS command to the device, any device can obtain the address information of the devices managed by the host.
[0131] To enhance the security of end-to-end data transmission, the inter-device address mapping table also includes device access permission information. Before determining the non-volatile memory host controller interface specification protocol commands based on the device address information recorded in the inter-device address mapping table, the following steps are also included:
[0132] Retrieve device access permission information recorded in the device address mapping table;
[0133] If the device access permission information is found to meet the preset requirements, the process proceeds to determine the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the device address mapping table.
[0134] Device access permission information refers to read / write permissions. Device access permission information must meet preset requirements, such as allowing the device to read or write.
[0135] In this method, before issuing the Non-volatile Memory Host Controller Interface Specification (NTCAPI) protocol command containing the inter-device address mapping table, authentication is performed based on the device access permission information recorded in the inter-device address mapping table. Only when the device access permission information meets the preset requirements is the NTCAPI protocol command issued. Access permissions are used for secure access control to prevent unauthorized access between devices from causing data tampering, thereby improving the security of end-to-end data transmission.
[0136] In practice, the devices managed by software RAID may change. If the previous address mapping table between devices is still used, the accuracy and success rate of end-to-end data transmission will decrease. Therefore, in order to improve the accuracy of end-to-end data transmission, the communication transmission method also includes:
[0137] Starting from obtaining the inter-device address mapping table, it acquires its own topology and detects device configuration within a preset time period;
[0138] Update the device address mapping table based on its own topology and the configuration of the detection equipment.
[0139] In this method, the host can update the inter-device address mapping table according to its own topology and the configuration of the detection devices, ensuring the accuracy of the information in the inter-device address mapping table, thereby improving the accuracy and success rate of end-to-end data transmission.
[0140] In this embodiment of the invention, the Non-Volatile Memory Host Controller Interface (NMIC) specification protocol requires the configuration of inter-device address mapping. To improve the compatibility of the NMIC, in implementation, based on the device address information recorded in the inter-device address mapping table, the NMIC command is determined to include:
[0141] Obtain the initial characteristics of the configuration characteristic command in the non-volatile memory host controller interface specification protocol;
[0142] The device address mapping configuration characteristics are determined based on the device address information recorded in the device address mapping table.
[0143] The non-volatile memory host controller interface specification protocol commands are determined based on initial characteristics and configuration characteristics used to characterize inter-device address mapping.
[0144] The Set Features command is a feature setting command in the Non-volatile Memory Host Controller Interface Specification protocol.
[0145] When determining the Non-volatile Memory Host Controller Interface Specification (NTH Controller) Protocol command based on the device address information recorded in the device address mapping table, the NTH Controller Interface Specification adds an inter-device address mapping configuration to the original content of the setting feature command in the NTH Controller Interface Specification. This extends the NTH Controller Interface Specification, achieving compatibility with existing devices while supporting future new devices.
[0146] After determining the Non-Volatile Memory Host Controller Interface (NVMC) specification protocol commands, these commands are sent to the devices. This allows the devices to determine the address information of multiple devices based on the NVMC specification protocol commands. Enabling any device to obtain the address information of other devices is a prerequisite for direct data transmission between devices.
[0147] Specifically, the Non-volatile Memory Host Controller Interface Specification Protocol (NTSCIP) commands are sent to the devices so that the devices can determine the address information of multiple devices based on the NSCIPIP commands, including:
[0148] Obtain the drivers corresponding to the devices it manages;
[0149] The system uses the driver corresponding to the device it manages to send the Non-volatile Memory Host Controller Interface Specification Protocol (NTMS) command to the device. After receiving the NMS command, the device can obtain the inter-device address mapping table by parsing the NMS command fields and determine the address information of multiple devices based on the inter-device address mapping table.
[0150] The entire process of sending the non-volatile memory host controller interface specification protocol commands described above to the device is called the initialization phase in the communication transmission method. To help those skilled in the art better understand the entire process of sending the non-volatile memory host controller interface specification protocol commands to the device, the following section combines... Figure 3 Specific embodiments will be described below.
[0151] Figure 3 This is a schematic diagram of a novel software RAID read / write data stream framework provided in an embodiment of the present invention, as shown below. Figure 3 As shown, in Figure 1 Building upon this foundation, device resource management and device drivers are added between the Software Independent Disk Redundancy Array (Software Independent Disk Redundancy Array) and the root complex within the host system. Device resource management includes an inter-device address mapping table and an authentication module. The inter-device address mapping table is stored in each of the SSDs (Solid State Drives 1 through 4). The Software Independent Disk Redundancy Array sends end-to-end write commands to the SSDs, or sends end-to-end read commands to the SSDs, enabling end-to-end data transfer between the SSDs.
[0152] The following describes an embodiment of the entire process of sending non-volatile memory host controller interface specification protocol commands to the device, namely the initialization phase of the communication transmission method. The initialization phase includes the following processes:
[0153] 1) When the host starts up or hot-plugs, it uses the Peripheral Component Interconnect Express (PCIe) enumeration to detect all devices (such as NVMe SSDs), assigns a unique BDF number to each device, reads the device's PCIe configuration space Bar register, and allocates Bar space to each device.
[0154] 2) After the PCIe enumeration is complete, the NVMe SSD device performs NVMe driver initialization. A centralized device resource manager is integrated into the host system, introducing D2D ATT for dynamically managing the physical addresses of SSD devices. The specific entries in D2D ATT are shown in Table 1.
[0155] Table 1
[0156] .
[0157] Among them, the device identifier is used to uniquely identify the managed device, and its value is the PCIe BDF number of the device (unique in the host).
[0158] Virtual address range: Used to represent the range of virtual addresses that a device can recognize. The introduction of virtual addresses is mainly to consider various scenarios such as address compatibility, prevention of unauthorized device access, and support for hot-swapping and system configuration changes.
[0159] Physical address range: This refers to the PCIe BAR address range of the target device. This address is used as the target address for end-to-end data transmission between devices and is obtained through the CMB reported by the NVMe device.
[0160] Access permissions: including read / write permissions, used for secure access control to prevent unauthorized access between devices from causing data tampering, thereby enhancing data security.
[0161] The host obtains the internal storage area of the NVMe device by reading the relevant registers (such as CMBLOC and CMBSZ) in the Bar space CMB. At this time, the Device Resource Manager initializes the Inter-Device Address Mapping Table (D2D ATT) and creates an address mapping record for the NVMe device. The record index is the NVMe device's BDF number, the physical address range is calculated using the CMB registers CMBLOC and CMBSZ, and the virtual address range is calculated accordingly. Access permissions are disabled for reading and writing by default and can be modified after successful software RAID authentication. Furthermore, when the system topology or device configuration changes, the host can dynamically update the D2D ATT to ensure the accuracy of the address mapping.
[0162] 3) Host software RAID initialization: First, complete the RAID array configuration to obtain the information of the array member disks. Based on the member disk list, the software RAID requests the device resource manager to obtain the mapping addresses of all RAID member disks. After authentication, the device resource manager returns the record of the requested NVMe disk in the inter-device address mapping table (D2D ATT) to the software RAID.
[0163] 4) Supports dynamically distributing D2D ATT to RAID member disks after the software RAID has been authenticated by the device resource manager, for use in target address translation during data transfer between devices.
[0164] The NVMe protocol's Set Features command now includes a D2D ATT configuration feature. Table 2 shows the contents of the D2D ATT configuration feature after its addition to the Set Features command.
[0165] Table 2
[0166] .
[0167] After obtaining the Device-to-Device Address Mapping Table (D2D ATT) for its member disks, the software RAID constructs an NVMe SetFeatures command (FID: D2D_ATT_Config) and sends the D2D ATT to all member disks of the RAID via the NVMe driver. Upon receiving the Set Features command, the NVMe disk parses the command fields according to the process specified by the NVMe protocol, obtains the D2D ATT, and saves it for subsequent source / destination virtual address to physical address conversion and assignment during end-to-end data transmission.
[0168] Building upon the aforementioned communication transmission method, further end-to-end transmission between devices is performed. After converting the physical addresses of the devices to virtual addresses, the end-to-end data transmission instructions are determined based on the address information of the source device and the address information of the destination device, including:
[0169] The end-to-end data transmission instructions are determined based on the virtual address information of the source device and the virtual address information of the target device.
[0170] Specifically, determining the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device includes:
[0171] Obtain the high and low bytes of the virtual address from the address information of the source device;
[0172] Obtain the high and low bytes of the virtual address from the address information of the target device;
[0173] Obtain the data transfer operation and the corresponding data volume;
[0174] The end-to-end data transmission instructions are determined based on the high and low bits of the virtual address in the address information of the source device, the high and low bits of the virtual address in the address information of the target device, and the data volume corresponding to the data transmission operation and the data operation.
[0175] To enable those skilled in the art to better understand the process of establishing end-to-end data transmission instructions and end-to-end data transmission methods, specific embodiments are described below. The process of establishing end-to-end data transmission instructions and end-to-end data transmission methods includes:
[0176] The NVMe command set has been expanded to allow devices to directly initiate read and write requests to remote devices via PCIe BAR addresses, enabling end-to-end data transfer. Therefore, the NVMe protocol adds the P2P_READ / P2P_WRITE commands for software RAID to initiate data transfer instructions to NVMe devices. When an NVMe device receives a P2P_READ or P2P_WRITE command, it queries the D2D ATT stored in the device, translates the virtual address of the target device in the command into a physical address, and directly initiates a Direct Memory Access (DMA) request via the PCIe bus. This allows data to be transferred to or retrieved from the target device without going through the host memory. The new commands are detailed in Table 3.
[0177] Table 3
[0178] .
[0179] To improve the efficiency of data transmission and command processing, in implementation, sending data transmission instructions to the source device includes:
[0180] Write the data transfer instruction to the input / output extraction queue;
[0181] Receive a request from the source device that represents an instruction to acquire input or output;
[0182] The data transfer instruction in the input / output fetch queue is used to respond to the source device's request in order to send the data transfer instruction to the source device.
[0183] In this method, when a data transmission command is sent to the source device, an input / output submission queue is used, enabling the host and device to transmit commands asynchronously without continuous synchronous waiting, thus improving the efficiency of data transmission and command processing.
[0184] After the data transmission command is sent to the source device, and before the source device transmits data to the target device according to the data transmission command, the process also includes:
[0185] The source device parses the data transmission instructions and extracts the identification information related to the submission queue operation;
[0186] Based on the identification information, locate the target position to be processed in the submission queue;
[0187] Send a signal to the control module of the submission queue to indicate an update to the target location;
[0188] The control module responds to the signal indicating an update to the target position by submitting the queue, and updates the queue head position information stored in the head register to the information corresponding to the target position.
[0189] In this method, before the source device transmits data to the target device according to the data transmission instruction, the source device updates the header register, which can ensure that key information such as the starting address of the transmission is accurate, thereby improving the accuracy and reliability of data transmission. Furthermore, by parsing the instruction, accurately locating the target, triggering a targeted update signal, and having the control module directly operate the register, redundant processing steps are reduced, ensuring accurate update position and rapid response.
[0190] In practice, the source device transmits data to the target device according to the data transmission instructions, including:
[0191] The source device obtains the data transmission operation, the virtual address of the source device, and the virtual address of the target device after parsing the data transmission command;
[0192] The virtual address of the source device is translated into the physical address of the source device according to the inter-device address mapping table;
[0193] The virtual address of the target device is translated into the physical address of the target device according to the inter-device address mapping table;
[0194] Based on the physical address of the source device, the physical address of the target device, and the data transmission operation, a transaction request is initiated to the target device to characterize the data transmission.
[0195] Furthermore, after the source device initiates a transaction request to the target device to characterize the data transmission based on the source device's physical address, the target device's physical address, and the data transmission operation, the method further includes:
[0196] The target device parses the transaction request used to characterize data transmission and verifies the address in the parsed transaction request;
[0197] If the verification passes, and the data transmission operation is detected to be a write operation, the data carried in the parsed transaction request is written to the destination address in the target device; the transaction layer protocol packet containing the status code indicating that the data writing is complete is obtained and sent to the source device;
[0198] If the data transmission operation is detected to be a read operation, the target data is read from the destination address in the target device; a transaction layer protocol packet containing a status code indicating that the data reading is complete and the target data is obtained is obtained, and the transaction layer protocol packet is sent to the source device.
[0199] After the target device sends the transaction layer protocol packet to the source device, the method further includes:
[0200] The response source device writes the completion status to its own input / output completion queue.
[0201] The receiver sends information to itself from the source device to indicate that the data transmission command response has been completed.
[0202] After receiving information from the source device indicating the completion of a data transmission command response, the host also includes:
[0203] Extract the completion status from its own input / output completion queue to determine the results of the input / output operations that the source device has completed;
[0204] Determine the value to be written to the head register of the input / output completion queue of the source device; wherein, the value to be written is determined by the position of the processed entry in the input / output completion queue of the source device;
[0205] The write command, which includes the identifier of the input / output completion queue head register and the value to be written, is sent to the source device via the communication bus, so that the source device can store the value to be written into the corresponding head register after receiving the write command.
[0206] To enable those skilled in the art to better understand the above-described transmission process, namely, the host sending an end-to-end data transmission command to the source device, and the data transmission process between the source device and the target device (these two processes are referred to as the data transmission phases), the following description is provided in conjunction with the accompanying drawings and specific embodiments. Figure 4 This is a schematic diagram of a data transmission process provided in an embodiment of the present invention. Figure 4 In this process, interaction occurs between the host, member disk A (i.e., the source device), and member disk B (i.e., the target device). This process includes:
[0207] S15: Software Independent Redundant Array of Disks determines the direction of data transfer between disk A and disk B, and constructs end-to-end data write or read commands.
[0208] S16: Host writes to the tail register of the input / output commit queue;
[0209] S17: Disk A retrieves instructions from the submission queue;
[0210] S18: Update the input / output commit queue head register for disk A;
[0211] S19: Disk A parses end-to-end data write or read instruction parameters to obtain the source address and destination address;
[0212] S20: Disk A queries the device address mapping table locally, converts the virtual address in the command to a physical address, and determines the read / write direction;
[0213] S21: Initiate a transaction request to disk B that conforms to the Fast Peripheral Interconnect standard;
[0214] S22: The Fast Peripheral Interconnect Standard Controller of disk B receives transaction layer data packets, verifies the address validity, and if it is a write request, directly writes the data to the destination address; if it is a read request, it reads the data from the target address and constructs the transaction layer data packet.
[0215] S23: Return the completed transaction layer data packet to disk A;
[0216] S24: Data transmission of disk A is complete;
[0217] S25: Disk A writes a completion status to the input / output completion queue;
[0218] S26: The command to send an interrupt report to the host from disk A has been completed;
[0219] S27: The host retrieves the completion status from the input / output completion queue;
[0220] S28: Host writes to the input / output completion queue head register.
[0221] The end-to-end data transmission method provided in this invention relies on the NVMe protocol and utilizes the NVMe CMB (Controller Memory Buffer) feature. By integrating a device resource manager into the host system and introducing an inter-device address mapping table for dynamic management of device physical addresses, it enables direct data transmission between devices, bypassing host memory relay and significantly reducing latency and CPU overhead. Simultaneously, in terms of security isolation, a device authentication mechanism is implemented to enhance the security of end-to-end data.
[0222] Furthermore, this method achieves the following:
[0223] Improve software RAID performance: The host software offloads RAID data reading and writing to the member disks, effectively utilizing the internal resources of the SSD disks, thereby offloading host system resources and improving the overall performance of software RAID.
[0224] Achieve end-to-end zero-copy transmission: Bypass host memory relay, reduce the number of data copies, and significantly reduce latency;
[0225] Reduce CPU overhead: The host CPU does not need to participate in data transfer, freeing up computing resources for other tasks;
[0226] Compatibility and Scalability: The Set Feature-D2D ATT Config command is defined in the NVMe command set, supporting the distribution of host D2D ATT Config to NVMe devices, thus enabling address source for end-to-end data transmission; the P2P_READ and P2P_WRITE commands are defined in the NVMe command set, supporting direct data transmission between devices. In short, based on NVMe protocol extensions, it is compatible with existing NVMe devices while supporting future new devices.
[0227] Wide range of applications: Suitable for latency-sensitive scenarios such as AI training, high-performance computing, and financial database synchronization;
[0228] Extended system lifespan: The flexibility and scalability of the solution extend the lifespan of the storage system.
[0229] The preceding text describes a communication transmission method applied to the host side. This embodiment also provides a communication transmission method applied to the source device side. This method includes:
[0230] The system receives data transmission instructions from the host; these instructions involve the host obtaining the address information of the devices it manages; determining the Non-volatile Memory Host Controller Interface Specification (NTMS) protocol command based on the device's address information; sending the NMS protocol command to the devices so that the devices can determine the address information of multiple devices according to the NMS protocol command; and determining an end-to-end data transmission instruction based on the address information of the source and target devices; where both the source and target devices are devices managed by the system.
[0231] Data is transmitted to the target device according to the data transmission instructions.
[0232] The communication transmission method applied to the source device provided in this embodiment has the same or corresponding technical features as the communication transmission method applied to the host described above. The communication transmission method applied to the host has been described in detail above, and the embodiment of the communication transmission method applied to the source device will not be repeated here, but the effect is the same as above.
[0233] In the above embodiments, the communication transmission method applied to the host side has been described in detail. The present invention also provides embodiments corresponding to the communication transmission device and electronic device. It should be noted that the present invention describes the embodiments of the device part from two perspectives: one based on functional modules, and the other based on hardware.
[0234] This invention provides a communication transmission device. This embodiment, based on functional modules, includes:
[0235] The first acquisition module is used to acquire the address information of the devices it manages;
[0236] The first determining module is used to determine the non-volatile memory host controller interface specification protocol command based on the device's address information;
[0237] The first sending module is used to send the Non-volatile Memory Host Controller Interface Specification Protocol (NTMS) command to the device so that the device can determine the address information of multiple devices according to the NMS command.
[0238] The second determining module is used to determine the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device; wherein, both the source device and the target device are devices managed by themselves;
[0239] The second sending module is used to send data transmission instructions to the source device, so that the source device can transmit data to the target device according to the data transmission instructions.
[0240] In some embodiments, the first acquisition module includes:
[0241] The second acquisition module is used to acquire information from the base address register of the device it manages when it detects that it is in the startup state or that there is a hot-plugged device, and to allocate base address space for the device according to the information in the base address register.
[0242] The third acquisition module is used to acquire the internal storage area of the device through registers related to the memory block in the base address space;
[0243] The third determination module is used to determine the physical address range of the device based on the device's internal storage area.
[0244] In some embodiments, the communication transmission device further includes:
[0245] The first conversion module is used to convert the physical address range of the device into the virtual address range of the device.
[0246] The second determining module is specifically used to: determine end-to-end data transmission instructions based on the virtual address information of the source device and the virtual address information of the target device.
[0247] In some embodiments, the first conversion module specifically includes:
[0248] The fourth acquisition module is used to acquire the start value and end value of the physical address;
[0249] The first module is used to establish the translation relationship between physical addresses and virtual addresses based on the memory management mechanism and the device storage architecture.
[0250] The fourth determining module is used to determine the starting value of the virtual address based on the translation relationship and the starting value of the physical address;
[0251] The fifth determining module is used to determine the end value of the virtual address based on the translation relationship and the end value of the physical address;
[0252] The sixth determining module is used to determine the virtual address range corresponding to the physical address range of the device based on the start value and end value of the virtual address.
[0253] In some embodiments, the communication transmission device further includes:
[0254] The fifth acquisition module is used to acquire devices by enumeration and obtain the unique identifier of the devices when it detects that it is in the startup state or that there are hot-swappable devices.
[0255] The second module is used to establish an inter-device address mapping table in its own device resource manager based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices.
[0256] The first determining module is specifically used to determine the non-volatile memory host controller interface specification protocol command based on the address information of the devices recorded in the device address mapping table.
[0257] In some embodiments, the inter-device address mapping table also includes access permission information for the devices. The communication transmission apparatus further includes:
[0258] The sixth module is used to obtain device access permission information recorded in the device address mapping table;
[0259] The detection and triggering module is used to trigger the first determination module when the device access permission information is detected to meet the preset requirements.
[0260] In some embodiments, the communication transmission device further includes:
[0261] The seventh acquisition module is used to acquire its own topology and detect device configuration within a preset time period after acquiring the inter-device address mapping table.
[0262] The update module is used to update the address mapping table between devices based on its own topology and the configuration of the detection devices.
[0263] In some embodiments, the first determining module specifically includes:
[0264] The eighth acquisition module is used to acquire the initial characteristics of the setting characteristic command in the non-volatile memory host controller interface specification protocol;
[0265] The seventh determination module is used to determine the characteristics of the inter-device address mapping configuration based on the device address information recorded in the inter-device address mapping table.
[0266] The eighth determination module is used to determine the non-volatile memory host controller interface specification protocol commands based on initial characteristics and characteristics used to characterize inter-device address mapping configuration.
[0267] In some embodiments, the first sending module specifically includes:
[0268] The ninth module is used to obtain the drivers corresponding to the devices it manages;
[0269] The first sending submodule is used to send the Non-volatile Memory Host Controller Interface Specification Protocol (NTMS) command to the device using the driver corresponding to the device it manages. After receiving the NMS command, the device can obtain the inter-device address mapping table by parsing the NMS command field and determine the address information of multiple devices based on the inter-device address mapping table.
[0270] In some embodiments, the second determining module specifically includes:
[0271] The tenth acquisition module is used to acquire the high and low bits of the virtual address in the address information of the source device;
[0272] The eleventh acquisition module is used to acquire the high and low bits of the virtual address in the address information of the target device;
[0273] The twelfth acquisition module is used to acquire data transmission operations and the amount of data corresponding to the data operations.
[0274] The ninth determining module is used to determine the end-to-end data transmission instructions based on the high and low bits of the virtual address in the address information of the source device, the high and low bits of the virtual address in the address information of the target device, and the data volume corresponding to the data transmission operation and the data operation.
[0275] In some embodiments, the second sending module specifically includes:
[0276] The write module is used to write data transmission instructions to the input / output extraction queue;
[0277] The first receiving module is used to receive a request sent by the source device that represents an instruction to acquire input or output;
[0278] The first response module is used to respond to the source device's request by using the data transmission instructions in the input / output extraction queue, so as to send the data transmission instructions to the source device.
[0279] In some embodiments, the communication transmission device further includes:
[0280] The parsing and extraction module is used by the source device to parse the data transmission instructions and extract the identification information related to the submission queue operation;
[0281] The positioning module is used to locate the target position to be processed in the submission queue based on the identification information;
[0282] The third sending module is used to send a signal representing an update of the target position to the control module of the submission queue.
[0283] The second response module is used to respond to the signal representing the update of the target position through the control module of the submission queue, and update the queue head position information stored in the head register to the information corresponding to the target position.
[0284] In some embodiments, the communication transmission device includes a first transmission module, used by the source device to transmit data to the target device according to a data transmission instruction.
[0285] The first transmission module specifically includes:
[0286] The thirteenth acquisition module is used for the source device to acquire the data transmission operation, the virtual address of the source device, and the virtual address of the target device obtained after parsing the data transmission command.
[0287] The second conversion module is used to convert the virtual address of the source device into the physical address of the source device according to the inter-device address mapping table;
[0288] The third conversion module is used to convert the virtual address of the target device into the physical address of the target device according to the inter-device address mapping table;
[0289] The request module is used to initiate a transaction request to the target device to characterize the data transmission, based on the physical address of the source device, the physical address of the target device, and the data transmission operation.
[0290] In some embodiments, the communication transmission device further includes:
[0291] The parsing and verification module is used by the target device to parse the transaction request that represents the data transmission and to verify the address in the parsed transaction request.
[0292] The write module is used to write the data carried in the parsed transaction request to the destination address in the target device if the verification passes and the data transmission operation is detected to be a write operation; and to obtain a transaction layer protocol packet containing a status code indicating that the data writing is complete and send the transaction layer protocol packet to the source device.
[0293] The read module is used to read target data from the destination address in the target device when the data transmission operation is detected to be a read data operation; obtain a transaction layer protocol packet containing a status code indicating that the data reading is complete and the target data; and send the transaction layer protocol packet to the source device.
[0294] In some embodiments, the communication transmission device further includes:
[0295] The third response module is used to respond to the input / output completion queue of the source device and write the completion status to its own queue.
[0296] The second receiving module is used to receive information sent by the source device to itself, which indicates that the data transmission command response has been completed.
[0297] In some embodiments, the communication transmission device further includes:
[0298] The extraction module is used to extract the completion status from its own input / output completion queue to determine the results of the input / output operations that the source device has completed.
[0299] The tenth determination module is used to determine the value to be written to the input / output completion queue head register of the source device; wherein, the value to be written is determined by the position of the processed entry in the input / output completion queue of the source device;
[0300] The fourth sending module is used to send a write instruction containing the identifier of the input / output completion queue head register and the value to be written to the source device via the communication bus, so that the source device can store the value to be written into the corresponding head register after receiving the write instruction.
[0301] This invention also provides another communication transmission device. The device includes:
[0302] The third receiving module is used to receive data transmission instructions sent by the host. These instructions involve the host obtaining the address information of the devices it manages; determining the Non-volatile Memory Host Controller Interface Specification (NTMS) command based on the device address information; sending the NMS command to the devices so that the devices can determine the address information of multiple devices according to the NMS command; and determining an end-to-end data transmission instruction based on the address information of the source and target devices. Both the source and target devices are devices managed by the host.
[0303] The second transmission module is used to transmit data to the target device according to the data transmission instructions.
[0304] The embodiments of the device part correspond to the embodiments of the method part. Therefore, please refer to the description of the embodiments of the method part for the embodiments of the device part, and they will not be repeated here.
[0305] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of the present invention. This embodiment is based on a hardware perspective, such as... Figure 5 As shown, the electronic device includes:
[0306] Memory 20 is used to store computer programs;
[0307] The processor 21 is used to implement the steps of the communication transmission method mentioned in the above embodiments when executing a computer program.
[0308] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array. The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0309] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the communication transmission method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the aforementioned communication transmission method.
[0310] In some embodiments, the electronic device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0311] Those skilled in the art will understand that Figure 5 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.
[0312] The electronic device provided in this embodiment of the invention includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a communication transmission method, with the same effect as above.
[0313] This invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described communication transmission method.
[0314] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.
[0315] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0316] The computer-readable storage medium provided by this invention includes the aforementioned communication transmission method, and has the same effect.
[0317] The foregoing has provided a detailed description of the communication transmission method, product, electronic device, and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the present invention.
[0318] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A communication transmission method, characterized in that, Applied to the host side, the method includes: Obtain the address information of the devices it manages; Determine the non-volatile memory host controller interface specification protocol command based on the device's address information; The Non-volatile Memory Host Controller Interface Specification Protocol (NTSCIP) commands are sent to the devices so that the devices can determine the address information of multiple devices according to the NSCIPIP commands. The end-to-end data transmission instructions are determined based on the address information of the source device and the address information of the target device; wherein, both the source device and the target device are devices managed by themselves; The data transmission instruction is sent to the source device so that the source device can transmit data to the target device according to the data transmission instruction; Before determining the non-volatile memory host controller interface specification protocol commands based on the device's address information, the following is also included: When it detects that it is in a powered-on state or that there is a hot-swappable device, it obtains the device by enumeration and obtains the unique identifier of the device; In its own device resource manager, an inter-device address mapping table is established based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices; The command to determine the non-volatile memory host controller interface specification protocol based on the device's address information includes: Based on the device address information recorded in the device address mapping table, determine the non-volatile memory host controller interface specification protocol command.
2. The communication transmission method according to claim 1, characterized in that, Obtaining the address information of the devices it manages includes: When it detects that it is in a startup state or that there is a hot-plugged device, it obtains the information in the base address register of the device it manages, and allocates base address space to the device according to the information in the base address register; The internal storage region of the device is obtained by configuring the registers related to the memory block in the base address space; The physical address range of the device is determined based on its internal storage area.
3. The communication transmission method according to claim 2, characterized in that, After determining the physical address range of the device based on its internal storage area, and before determining the non-volatile memory host controller interface specification protocol commands based on the device's address information, the following steps are also included: Convert the device's physical address range to the device's virtual address range; The step of determining the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device includes: The end-to-end data transmission instructions are determined based on the virtual address information of the source device and the virtual address information of the target device.
4. The communication transmission method according to claim 3, characterized in that, Converting a device's physical address range to its virtual address range includes: Get the start and end values of the physical address; Establish the translation relationship between physical addresses and virtual addresses based on memory management mechanisms and device storage architecture; The starting value of the virtual address is determined based on the conversion relationship and the starting value of the physical address; The end value of the virtual address is determined based on the conversion relationship and the end value of the physical address; The virtual address range corresponding to the physical address range of the device is determined by the start value and the end value of the virtual address.
5. The communication transmission method according to claim 1, characterized in that, The inter-device address mapping table also includes access permission information for the devices; before determining the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the inter-device address mapping table, the following is also included: Retrieve device access permission information recorded in the device address mapping table; If the device access permission information is found to meet the preset requirements, the step of determining the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the device address mapping table is initiated.
6. The communication transmission method according to claim 5, characterized in that, Also includes: Starting from obtaining the address mapping table between devices, it acquires its own topology and detects device configuration within a preset time period; Update the device address mapping table based on its own topology and the configuration of the detection equipment.
7. The communication transmission method according to claim 5, characterized in that, The step of determining the non-volatile memory host controller interface specification protocol command based on the device address information recorded in the inter-device address mapping table includes: Obtain the initial characteristics of the configuration characteristic command in the non-volatile memory host controller interface specification protocol; The device address information recorded in the device address mapping table is used to determine the characteristics of the device address mapping configuration. Based on the initial characteristics and the characteristics used to characterize the inter-device address mapping configuration, the non-volatile memory host controller interface specification protocol commands are determined.
8. The communication transmission method according to claim 7, characterized in that, The Non-Volatile Memory Host Controller Interface Specification (NVMC) protocol commands are sent to the devices so that the devices can determine the address information of multiple devices, including: Obtain the drivers corresponding to the devices it manages; The device uses the driver corresponding to the device it manages to send the Non-volatile Memory Host Controller Interface Specification Protocol (NCONMIP) command to the device. After receiving the NCONMIP command, the device parses the NCONMIP command field to obtain the inter-device address mapping table and determines the address information of multiple devices based on the inter-device address mapping table.
9. The communication transmission method according to claim 8, characterized in that, The step of determining the end-to-end data transmission instructions based on the address information of the source device and the address information of the target device includes: Obtain the high and low bits of the virtual address from the address information of the source device; Obtain the high and low bits of the virtual address from the address information of the target device; Obtain the data transfer operation and the corresponding data volume; The end-to-end data transmission instructions are determined based on the high and low bits of the virtual address in the address information of the source device, the high and low bits of the virtual address in the address information of the target device, and the data volume corresponding to the data transmission operation and the data operation.
10. The communication transmission method according to claim 9, characterized in that, Sending the data transmission instruction to the source device includes: Write the data transmission instruction to the input / output extraction queue; Receive a request from the source device that represents an instruction to acquire input / output; The data transmission instruction in the input / output extraction queue is used to respond to the request of the source device to send the data transmission instruction to the source device.
11. The communication transmission method according to claim 10, characterized in that, After the data transmission instruction is sent to the source device, and before the source device transmits data to the target device according to the data transmission instruction, the method further includes: The source device parses the data transmission instruction and extracts the identification information related to the submission queue operation; Based on the identification information, locate the target position to be processed in the submission queue; Send a signal to the control module of the submission queue to indicate an update to the target location; The control module that submits the queue responds to the signal used to characterize the update of the target position and updates the queue head position information stored in the head register to the information corresponding to the target position.
12. The communication transmission method according to claim 11, characterized in that, The source device transmits data to the target device according to the data transmission instruction, including: The source device obtains the data transmission operation, the virtual address of the source device, and the virtual address of the target device after parsing the data transmission instruction. The virtual address of the source device is converted to the physical address of the source device according to the inter-device address mapping table; The virtual address of the target device is converted to the physical address of the target device according to the inter-device address mapping table; Based on the physical address of the source device, the physical address of the target device, and the data transmission operation, a transaction request is initiated to the target device to characterize the data transmission.
13. The communication transmission method according to claim 12, characterized in that, After the source device initiates a transaction request to the target device to characterize the data transmission based on the source device's physical address, the target device's physical address, and the data transmission operation, the method further includes: The target device parses the transaction request used to characterize data transmission and verifies the address in the parsed transaction request; If the verification passes, and the data transmission operation is detected to be a write operation, the data carried in the parsed transaction request is written to the destination address in the target device; a transaction layer protocol packet containing a status code indicating that the data writing is complete is obtained, and the transaction layer protocol packet is sent to the source device; If the data transmission operation is detected to be a read data operation, the target data is read from the destination address in the target device; a transaction layer protocol packet containing a status code indicating that the data reading is complete and the target data is obtained, and the transaction layer protocol packet is sent to the source device.
14. The communication transmission method according to claim 13, characterized in that, After the target device sends the transaction layer protocol packet to the source device, the method further includes: The operation of writing the completion status into the input / output queue of the source device in response to the input / output completion queue; Receive information sent by the source device to itself, indicating that the data transmission command response has been completed.
15. The communication transmission method according to claim 14, characterized in that, After receiving information sent by the source device indicating the completion of the data transmission command response, the method further includes: Extract the completion status from its own input / output completion queue to determine the results of the input / output operations that the source device has completed; Determine the value to be written to the input / output completion queue head register of the source device; wherein, the value to be written is determined by the position of the processed entry in the input / output completion queue of the source device; The write instruction, which includes the identifier of the input / output completion queue head register and the value to be written, is sent to the source device via the communication bus, so that the source device, upon receiving the write instruction, stores the value to be written into the corresponding head register.
16. A communication transmission method, characterized in that, Applied to the source device, the method includes: The system receives a data transmission instruction from a host device; wherein the data transmission instruction is for the host device to obtain the address information of the devices it manages; determines a Non-volatile Memory Host Controller Interface Specification Protocol (NVISP) command based on the device's address information; sends the NVISP command to the devices so that the devices can determine the address information of multiple devices based on the NVISP command; and determines an end-to-end data transmission instruction based on the address information of the source device and the address information of the target device; wherein both the source device and the target device are devices managed by the host device. Data is transmitted to the target device according to the data transmission instruction; The communication transmission device also includes: The fifth acquisition module is used to acquire devices by enumeration and obtain the unique identifier of the devices when it detects that it is in the startup state or that there are hot-swappable devices. The second module is used to establish an inter-device address mapping table in its own device resource manager based on the unique identifiers, virtual address ranges, and physical address ranges of multiple devices. The first determining module is specifically used to determine the non-volatile memory host controller interface specification protocol command based on the address information of the devices recorded in the device address mapping table.
17. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the communication transmission method according to any one of claims 1 to 16.
18. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the communication transmission method as described in any one of claims 1 to 16 when executing the computer program.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the communication transmission method as described in any one of claims 1 to 16.
Citation Information
Patent Citations
Virtual machine communication method and device, equipment and storage medium
CN120540783A