Data access method, device and first computing device
By introducing a first computing device with hardware functions into the computer system, data processing operations are performed on the written data, the problem of large overhead of the cloud service provider host system is solved, the system processing performance and utilization rate are improved, and the cost is reduced.
Patent Information
- Application Number
- CN202110839400.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-18
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2039-10-18
AI Technical Summary
Cloud service providers occupy a large system overhead in hosts, resulting in low utilization of hosts, which in turn increases the cost of cloud services.
By introducing a first computing device into a computer system, the device has a hardware function and can perform data processing operations, including operations such as erasure coding, data consistency protection and encryption, etc., on data to be written to the storage pool.
It reduces the system overhead of the host, improves the processing performance of the computer system, reduces I/O delay, thereby improving the utilization rate of the host and reducing the cost of cloud services.
Smart Images

Figure CN113721840B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and in particular, to a data access method, apparatus, and a first computing device. Background Art
[0002] With the rapid development of cloud computing technologies, the use of cloud services has become increasingly common. Generally, cloud service providers deploy cloud services on hosts to provide services for users. For cloud service providers, the system overhead of a host is related to the utilization rate of the host. The main manifestation is that the larger the proportion of the system overhead of the host that occupies the computing resources of the host, the less computing resources of the host can be used to provide cloud services, and thus the lower the utilization rate of the host. Therefore, reducing the system overhead of the host is an effective measure to improve the utilization rate of the host. Summary of the Invention
[0003] This application provides a data access method, apparatus, and a first computing device, which can reduce the system overhead of a host.
[0004] In a first aspect, a data access method is provided. The method can be applied to a first computing device. The first computing device is connected to a host, a second computing device, and a storage pool. The method includes: receiving a second write operation command sent by the second computing device, where the second write operation command is obtained by preprocessing a first write operation command generated by the second computing device for the host, and the first write operation command is used to write data to be written into the storage pool; performing a data processing operation on the data to be written based on the second write operation command; and writing the processed data to be written into the storage pool.
[0005] In the data access method provided in the embodiments of this application, by using the first computing device to perform a data processing operation on the data to be written into the storage pool, the speed of performing the data processing operation on the data is improved. In this way, on the one hand, the system overhead of the host can be reduced, and on the other hand, the processing performance of the computer system can be improved, and the I / O latency can be reduced. Moreover, the first computing device has hardware functions, and the hardware functions of the first computing device can be used to perform a data processing operation on the data to be written, which can ensure the speed of performing the data processing operation on the data.
[0006] Wherein, the first computing device performing a data processing operation on the data to be written based on the second write operation command may include: performing one or more of erasure coding, data consistency protection, and encryption on the data to be written based on the second write operation command.
[0007] Since operations such as erasure coding, data consistency protection, and encryption involve a large amount of computational work, when performing one or more of erasure coding, data consistency protection, and encryption through the first computing device, the I / O speed of the data can be unaffected by factors such as the main frequency and instruction set of the second computing device, and the processing performance of the storage computer system where the first computing device and the second computing device are located can be ensured.
[0008] In an implementable manner, the processed data to be written may include: check data of the data to be written. Writing the processed data to be written into the storage pool includes: storing the check data in the memory of the first computing device; storing the check data from the memory of the first computing device to the storage pool.
[0009] Moreover, the processed data to be written further includes: the data to be written. Correspondingly, before performing a data processing operation on the data to be written based on a second write operation command, the method may further include: storing the data to be written from the host to the memory of the first computing device. At this time, writing the processed data to be written into the storage pool further includes: storing the data to be written from the memory of the first computing device to the storage pool.
[0010] By storing the data to be written in the memory of the host and storing the check data in the memory of the first computing device, duplicate data storage in the computer system can be avoided, and the memory space of the computer system can be effectively utilized.
[0011] Alternatively, the processed data to be written further includes: the data to be written. At this time, since the data to be written is not stored from the host to the memory of the first computing device, writing the processed data to be written into the storage pool may further include: storing the data to be written from the host to the storage pool.
[0012] By storing both the data to be written and the check data in the memory of the first computing device, the network card can read the data to be written and the check data from the same memory, without having to read data from the memory of the first computing device and the memory of the host separately, which can reduce the time consumed for reading data and reduce the write latency.
[0013] Optionally, the second computing device and the host may be connected through the first computing device. At this time, before receiving a second write operation command sent by the second computing device, the method may further include: obtaining a first write operation command generated by the host; sending the first write operation command to the second computing device.
[0014] Moreover, when the first computing device receives multiple write operation commands including a first write operation command, before sending the first write operation command to the second computing device, the method may further include: sorting the multiple write operation commands according to a specified policy. At this time, the implementation process of sending the first write operation command to the second computing device may include: during the process of sequentially sending the sorted multiple write operation commands to the second computing device, sending the first write operation command to the second computing device according to the order of the first write operation command in the sorted multiple write operation commands.
[0015] Sort the multiple write operation commands and send the sorted multiple write operation commands to the second computing device, so that the second computing device can preferentially process write operation commands with higher priorities to improve the user experience.
[0016] In one implementation, the first computing device may be electrically connected to the storage pool through a network card. At this time, after performing a data processing operation on the data to be written based on the second write operation command, the method may further include: sending a second write operation response to the second computing device, where the second write operation response is used to indicate that the data processing operation has been completed; receiving a third write operation command sent by the second computing device based on the second write operation response, where the third write operation command is used to instruct the network card to read the processed data to be written and write the processed data to be written into the storage pool; forwarding the third write operation command to the network card.
[0017] Optionally, after performing a data processing operation on the data to be written based on the second write operation command, the method may further include: receiving a first write operation response sent by the second computing device for the first write operation command, where the first write operation response is obtained by the second computing device through preprocessing according to a write completion command sent by the storage pool; after determining that the data write operation requested by the first write operation command is completed according to the first write operation response, sending the first write operation response to the host.
[0018] During the process of reading data, the first computing device may further receive the read data, where the read data is the data read from the storage pool based on the second read operation command of the second computing device, and the second read operation command is obtained by the second computing device through preprocessing the first read operation command generated by the host, and the first read operation command is used to read the read data from the storage pool; forwarding the read data to the host.
[0019] In the data access method provided by the embodiments of the present application, by using the first computing device to perform data processing operations on the data read from the storage pool, the speed of performing data processing operations on the data is improved. In this way, on the one hand, the system overhead of the host can be reduced, and on the other hand, the processing performance of the computer system can be improved, and the I / O latency can be reduced.
[0020] Optionally, before receiving the read data, the method may further include: obtaining a first read operation command generated by the host; sending the first read operation command to a second computing device.
[0021] Optionally, when the first computing device receives a plurality of read operation commands including the first read operation command, before sending the first read operation command to the second computing device, the method may further include: sorting the plurality of read operation commands according to a specified policy. Correspondingly, the implementation process of sending the first read operation command to the second computing device may include: during the process of sequentially sending the sorted plurality of read operation commands to the second computing device, sending the first read operation command to the second computing device according to the order of the first read operation command in the sorted plurality of read operation commands.
[0022] Sort the plurality of read operation commands and send the sorted plurality of read operation commands to the second computing device, so that the second computing device can preferentially process read operation commands with higher priorities to improve the user experience.
[0023] Moreover, after forwarding the read data to the host, the method may further include: receiving a first read operation response sent by the second computing device for the first read operation command, the first read operation response being obtained based on the read data; after determining that the data read operation requested by the first read operation command is completed according to the first read operation response, sending the first read operation response to the host.
[0024] In a second aspect, a data access device is provided. The data access device may be deployed in a first computing device. The device includes: a receiving module, configured to receive a second write operation command sent by a second computing device, the second write operation command being obtained after preprocessing a first write operation command generated by the host, and the first write operation command being used to write data to be written into a storage pool; a processing module, configured to perform a data processing operation on the data to be written based on the second write operation command;
[0025] a writing module, configured to write the processed data to be written into the storage pool.
[0026] Optionally, the processing module is specifically configured to: perform one or more of erasure coding, data consistency protection, and encryption on the data to be written based on the second write operation command.
[0027] Optionally, the processed data to be written includes: check data of the data to be written. The writing module is specifically configured to: store the check data in the memory of the first computing device; store the check data from the memory of the first computing device to the storage pool.
[0028] Optionally, the processed data to be written further includes: data to be written, and the apparatus further includes: a storage module, configured to store the data to be written from the host to the memory of the first computing device. Accordingly, the writing module is further specifically configured to: store the data to be written from the memory of the first computing device to the storage pool.
[0029] Optionally, the processed data to be written further includes: data to be written, and the writing module is further specifically configured to: store the data to be written from the host to the storage pool.
[0030] Optionally, the apparatus further includes: an obtaining module, configured to obtain a first write operation command generated by the host; and a sending module, configured to send the first write operation command to a second computing device.
[0031] Optionally, when the first computing device receives a plurality of write operation commands including the first write operation command, the apparatus further includes: a sorting module, configured to sort the plurality of write operation commands according to a specified policy. At this time, the sending module is specifically configured to: send the first write operation command to the second computing device in the order of the first write operation command in the sorted plurality of write operation commands when sequentially sending the sorted plurality of write operation commands to the second computing device.
[0032] Optionally, the first computing device may be electrically connected to the storage pool through a network card. At this time, the sending module is further configured to send a second write operation response to the second computing device, where the second write operation response is used to indicate that the data processing operation has been completed; the receiving module is further configured to receive a third write operation command sent by the second computing device based on the second write operation response, where the third write operation command is used to instruct the network card to read the processed data to be written and write the processed data to be written into the storage pool; the sending module is further configured to forward the third write operation command to the network card.
[0033] Optionally, the receiving module is configured to receive a first write operation response sent by the second computing device for the first write operation command, where the first write operation response is obtained by the second computing device through preprocessing according to a write completion command sent by the storage pool. The sending module is further configured to send the first write operation response to the host after determining that the data writing operation requested by the first write operation command is completed according to the first write operation response.
[0034] Optionally, the receiving module is further configured to receive read data, where the read data is data read from the storage pool based on a second read operation command of the second computing device, and the second read operation command is obtained by the second computing device through preprocessing of a first read operation command generated by the host, and the first read operation command is used to read the read data from the storage pool; the sending module is further configured to forward the read data to the host.
[0035] Optionally, the apparatus further includes: an obtaining module, configured to obtain a first read operation command generated by a host; a sorting module, configured to sort a plurality of read operation commands according to a specified policy when the first computing device receives the plurality of read operation commands including the first read operation command; and a sending module, configured to send the first read operation command to the second computing device in the order of the first read operation command in the sorted plurality of read operation commands during the process of sequentially sending the sorted plurality of read operation commands to the second computing device.
[0036] Optionally, the receiving module is further configured to receive a first read operation response sent by the second computing device for the first read operation command, where the first read operation response is obtained based on the read data; and the sending module is further configured to send the first read operation response to the host after determining that the data reading operation requested by the first read operation command is completed according to the first read operation response.
[0037] In a third aspect, a data access method is provided, which is applied to a second computing device. The second computing device is connected to a first computing device. The method may include: obtaining a first write operation command generated by a host, where the first write operation command is used to write data to be written into a storage pool; preprocessing the first write operation command to obtain a second write operation command, where the second write operation command is used to instruct the first computing device to perform a data processing operation on the data to be written; and sending the second write operation command to the first computing device.
[0038] Optionally, the method further includes: obtaining a first read operation command generated by a host, where the first read operation command is used to read required read data from a storage pool; preprocessing the first read operation command to obtain a second read operation command, where the second read operation command is used to read the read data from the storage pool; and sending the second read operation command to the first computing device.
[0039] In a fourth aspect, a data access apparatus is provided. The data access apparatus may be deployed in a second computing device. The second computing device is connected to a first computing device. The apparatus includes: an obtaining module, configured to obtain a first write operation command generated by a host, where the first write operation command is used to write data to be written into a storage pool; a processing module, configured to preprocess the first write operation command to obtain a second write operation command, where the second write operation command is used to instruct the first computing device to perform a data processing operation on the data to be written; and a sending module, configured to send the second write operation command to the first computing device.
[0040] Optionally, the obtaining module is further configured to obtain a first read operation command generated by the host, where the first read operation command is used to read required read data from the storage pool; the processing module is further configured to preprocess the first read operation command to obtain a second read operation command, where the second read operation command is used to read the read data from the storage pool; and the sending module is further configured to send the second read operation command to the first computing device.
[0041] In a fifth aspect, a first computing device is provided, where the first computing device includes a processing unit, and the first computing device executes the data access method according to the first aspect through the processing unit.
[0042] In a sixth aspect, a first computing device is provided, where the first computing device includes a logic circuit, and the first computing device executes the data access method according to the first aspect through the logic circuit.
[0043] In an implementable manner, the first computing device is a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC).
[0044] In a seventh aspect, a second computing device is provided, where the second computing device includes a processing unit, and the second computing device executes the data access method according to the third aspect through the processing unit.
[0045] In an implementable manner, the second computing device is an advanced reduced instruction set computing machine (ARM).
[0046] In an eighth aspect, a storage offloading system is provided, where the storage offloading system includes: a first computing device and a second computing device, the first computing device is configured to execute the data access method according to the first aspect, and the second computing device is configured to execute the data access method according to the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic structural diagram of an application scenario related to a data access method provided in an embodiment of the present application;
[0048] Figure 2 It is a schematic structural diagram of a computer system provided in an embodiment of the present application;
[0049] Figure 3 It is a schematic structural diagram of another computer system provided in an embodiment of the present application;
[0050] Figure 4 It is a schematic structural diagram of a computer system including a storage offloading system provided in an embodiment of the present application;
[0051] Figure 5 It is a schematic structural diagram of another computer system including a storage offloading system provided in an embodiment of the present application;
[0052] Figure 6 Schematic diagram of another computer system including a storage offloading system provided by an embodiment of the present application;
[0053] Figure 7 Flowchart of a method for a host to write data into a storage pool provided by an embodiment of the present application;
[0054] Figure 8 Schematic diagram of a write operation sub - queue provided by an embodiment of the present application;
[0055] Figure 9 Schematic diagram of reading processed data to be written provided by an embodiment of the present application;
[0056] Figure 10 Another schematic diagram of reading processed data to be written provided by an embodiment of the present application;
[0057] Figure 11 Schematic diagram of a message corresponding to the write operation sub - queue provided by an embodiment of the present application;
[0058] Figure 12 Flowchart of a host reading data from a storage pool provided by an embodiment of the present application;
[0059] Figure 13 Schematic diagram of sending read data provided by an embodiment of the present application;
[0060] Figure 14 Schematic diagram of the structure of a data access device provided by an embodiment of the present application;
[0061] Figure 15 Another schematic diagram of the structure of a data access device provided by an embodiment of the present application;
[0062] Figure 16 Another schematic diagram of the structure of a data access device provided by an embodiment of the present application;
[0063] Figure 17 Schematic diagram of the structure of a first computing device provided by an embodiment of the present application;
[0064] Figure 18 Another schematic diagram of the structure of a first computing device provided by an embodiment of the present application;
[0065] Figure 19 Schematic diagram of the structure of a second computing device provided by an embodiment of the present application. Detailed implementation manners
[0066] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0067] For ease of understanding, the following first explains the terms related to the embodiments of the present application.
[0068] Cloud computing: Cloud computing is a type of distributed computing that refers to a network that uniformly manages and schedules a large number of computing resources and storage resources and provides on-demand services to users. The computing resources and storage resources are both provided by a cluster of computing devices set up in a data center. Moreover, cloud computing can provide users with various types of service models, such as infrastructure as a service (IaaS), platform as a service (PaaS), and software as a service (SaaS).
[0069] Virtualization is a resource management technology that abstracts and transforms various physical resources of a host, such as servers, networks, memory, and storage, etc., to present them, breaking the non-separable barriers between the physical structures of the host, enabling users to apply these resources in a better way than the original configuration. The resources used through virtualization are called virtualized resources, and virtualized resources are not restricted by the existing resource deployment methods, geographical locations, or physical configurations. Generally, virtualized resources include computing resources and storage resources.
[0070] Virtual machine (VM): It refers to a complete computer system with the functions of a complete hardware system simulated through virtualization technology and running in a completely isolated environment. A partial instruction subset of the virtual machine can be processed in the host, and other parts of the instructions can be executed in an emulated manner. Users can purchase cloud services in the form of renting virtual machines.
[0071] The host refers to the computer on which the virtual machine is deployed, or a physical machine.
[0072] Direct Memory Access (DMA): It can also be referred to as direct memory operation or block data transfer mode. It refers to a data interaction mode that directly accesses data from the computer's memory without going through the computer's Central Processing Unit (CPU). When transferring data in DMA mode, the computer's CPU issues instructions to the DMA controller to indicate that the DMA controller controls the data transfer. After the DMA controller completes the data transfer, it feeds back the information of the transfer completion to the CPU. It can be seen that during the process of DMA data transfer, there is no need for the computer's CPU to execute the transfer operation, which can save the operations of the computer's CPU such as fetching instructions, fetching data, and sending data, reducing the resource occupancy rate of the computer's CPU and saving system resources.
[0073] DMA can include Remote Direct Memory Access (RDMA) and Local DMA. RDMA refers to a data transfer mode that directly transfers data from the memory of one computer to another computer through the network without the intervention of the operating systems of both parties. Local DMA refers to a data transfer mode that does not require a network.
[0074] Peripheral Component Interconnect Express (PCIe) bus: A high-speed serial computer expansion bus standard.
[0075] Ultra Path Interconnect (UPI): An expansion bus standard.
[0076] Network card: It can also be referred to as a Network Interface Controller (NIC), network adapter, or LAN receiver. It is a computer hardware designed to allow a host or computing device to communicate on a network.
[0077] Memory: It can also be referred to as internal memory or main memory. Its function is to temporarily store the operation data in the CPU and the data exchanged with external memories such as hard disks.
[0078] Non-Volatile Memory express (NVMe): It is a logical device interface standard, a bus transfer protocol specification based on the device logical interface, and accesses non-volatile memory media attached through the bus.
[0079] Virtual Input / Output (Virtio I / O) Protocol: It can be simply referred to as the Virtio Protocol or Virtio. It refers to a para-virtualized virtual I / O interface framework that can support various types of I / O devices. Compared with full virtualization I / O, the Virtio I / O Protocol has good scalability and compatibility and is widely used in virtualization scenarios, becoming a de facto standard. As the number of single-machine tenants of virtual machines increases and the demand for network performance bandwidth becomes stronger, the host overhead carrying the Virtio I / O Protocol is getting larger and larger. Therefore, the backend load of Virtio I / O can be offloaded to the network card or other hardware to improve the efficiency of the host.
[0080] Erasure Code (EC): It is an encoding fault tolerance technology. Its basic principle is to divide the transmitted data into multiple data blocks and generate check data blocks based on different data blocks, so that there is a connection between multiple data blocks through the check data blocks, enabling the restoration of the failed data blocks through the valid data blocks and check data blocks when some data blocks fail. By performing EC operations on the data, the reliability of the data can be guaranteed.
[0081] Figure 1 It is a schematic structural diagram of the application scenario involved in the data access method provided by the embodiments of the present application. As Figure 1 shown, the application scenario includes a computer system 101, a storage pool 102, and a client 103. The storage pool 102 is used to store the data generated in the application scenario. Among them, the client 103 and the computer system 101 are connected through a network, and the client 103 can access the computer system 101 through the network. The computer system 101 and the storage pool 102 are connected through a network, and the computer system 101 can perform data interaction with the storage pool 102 through the network. In one implementable manner, a network card can be configured in the computer system 101, and the computer system 101 can communicate with the storage pool 102 through the network card. Moreover, the client 103 can send a write data instruction to the computer system 101 through the network, and the computer system 101 can write the data into the storage pool 102 according to the write data instruction. Or, the client 103 can send a read data instruction to the computer system 101 through the network, and the computer system 101 can read the data from the storage pool 102 according to the read data instruction.
[0082] Optionally, Figure 1The computer system 101 therein can be a cluster composed of several hosts and / or computing devices. Virtual machines can run in the computer system 101, and the client 103 can use the virtual machines running in the computer system 101 by accessing the computer system 101. The storage pool 102 can be a cluster of storage devices including several storage devices. The client 103 can be a cluster including several clients.
[0083] It should be noted that Figure 1 The application scenario shown is an example of the application scenario involved in the data access method provided by the embodiments of the present application, and is not used to limit the application scenario involved in the data access method provided by the embodiments of the present application. The application scenario can also have other types of architectures or variations.
[0084] Figure 2 It is a schematic structural diagram of a computer system 200 provided by an embodiment of the present application. The computer system 200 can be applied to Figure 1 the computer system 101 in the application scenario shown. As Figure 2 shown, the computer system 200 includes a host 21 and a network card 22. The host 21 and the network card 22 are connected through a PCIe bus. The network card 22 is connected to the storage pool 102 through a network. Correspondingly, the host 21 is connected to the storage pool 102 through the network card 22, enabling data transmission between the host 21 and the storage pool 102. Optionally, the host 21 can be a processor with an X86 architecture of Intel Corporation.
[0085] As Figure 2 shown, the host 21 includes a virtual machine 211 and a virtual machine monitor 212. The virtual machine 211 and the virtual machine monitor 212 can communicate according to the communication protocol specification. In one implementable manner, an NVMe / Virtio front-end module 211a is set in the virtual machine 211, and the NVMe / Virtio front-end module 211a is used to execute the front-end part of the NVMe protocol and / or the front-end part of the Virtio protocol. An NVMe / Virtio back-end module 212a is set in the virtual machine monitor 212, and the NVMe / Virtio back-end module 212a is used to execute the back-end part of the NVMe protocol and / or the back-end part of the Virtio protocol. Through the cooperation of the NVMe / Virtio front-end module 211a and the NVMe / Virtio back-end module 212a, communication between the virtual machine 211 and the virtual machine monitor 212 can be achieved.
[0086] As Figure 2As shown, the virtual machine monitor 212 further includes a virtual block system process (VBS process) module 212b and an RDMA module 212c. Among them, the virtual block system process module 212b is used to perform block processing on the data managed by the virtual machine monitor 212. The RDMA module 212c is used to execute remote DMA data transmission.
[0087] In the computer system 200, since the host 21 needs to perform traffic management on I / O requests, move data, perform erasure code (EC), data integrity field (DIF), encryption, and decryption on data, etc., the system overhead occupied by the host 21 is relatively large. Therefore, cloud service providers need to purchase more servers to achieve the computing resource capacity required by customers, resulting in higher costs for cloud services.
[0088] To solve the above problems, an advanced reduced instruction set computer machine (ARM) can be added to the computer system. By the ARM executing some data processing operations of the host, the execution function of this part of the data processing operations is unloaded to the ARM, reducing the system overhead of the host and achieving the purpose of cost reduction. Figure 3 It is a schematic structural diagram of another computer system 300 provided by an embodiment of the present application. As Figure 3 shown, the computer system 300 includes a host 31, an ARM 32, and a network card 33. The host 31 and the ARM 32 are connected through a PCIe bus, and the ARM 32 and the network card 33 are connected through a PCIe bus. The network card 33 can be connected to the storage pool 102 through the network. Correspondingly, the ARM 32 can be connected to the storage pool 102 through the network card 33, enabling the ARM 32 and the storage pool 102 to perform data transmission.
[0089] As Figure 3 shown, the host 31 includes a virtual machine 311 and a virtual machine monitor 312. An NVMe / Virtio front-end module 311a is provided in the virtual machine 311. The ARM 32 includes an NVMe / Virtio back-end module 321, a virtual block system process module 322, and an RDMA module 323. For the functions of each component in the ARM 32, please refer to the corresponding description in the Figure 2 shown computer system 200, which will not be elaborated here.
[0090] Compared with Figure 2 the computer system 200 shown, Figure 3The computer system 300 shown offloads the execution function of the data processing operations of the host 31 to the ARM 32, that is, in this computer system 300, the data processing operations of the data are executed by the ARM 32, which can reduce the system overhead of the host 31 to a certain extent.
[0091] However, in the computer system 300, the I / O speed of the data is limited by factors such as the main frequency and instruction set of the ARM 32, resulting in the processing performance of this computer system 300 being limited. For example, the computer system 300 requires 16 ARMs to achieve an input / output volume of 1 megabyte per second. In addition, operations such as EC, DIF, encryption, and decryption involved in data processing operations contain a large amount of computing work, and the ARM 32 uses software to implement these computing tasks, resulting in a relatively large I / O delay. For example, the optimal delay can only be about 150 microseconds (μs). Moreover, since the data processing operations are executed by the ARM, in essence, it is still implemented by software, but due to reasons such as thread and scheduling conflicts, the performance of the ARM executing the data processing operations is unstable. Thus, although offloading the execution function of the data processing operations of the host 31 to the ARM 32 can reduce the system overhead of the host 31 to a certain extent, its processing performance is still not ideal. Therefore, there is an urgent need to propose a computer system that can both reduce the system overhead of the host 31 and ensure the processing performance.
[0092] To solve the above problems, as Figure 4 shown, an embodiment of the present application provides a computer system 400 including a storage offloading system 41. This computer system 400 further includes a host 42. This computer system 400 can be applied to Figure 1 the computer system 101 in the application scenario in. The storage offloading system 41 includes a first computing device 411 and a second computing device 412. The first computing device 411 is electrically connected to the host 42, the first computing device 411 is electrically connected to the second computing device 412, and the first computing device 411 is electrically connected to the storage pool 102. The first computing device 411 has hardware functions and can use the hardware functions of the first computing device 411 to perform data processing operations on the data to be written into the storage pool and / or the data read from the storage pool, improving the speed of performing data processing operations on the data. In this way, on the one hand, it can reduce the system overhead of the host 42, and on the other hand, it can improve the processing performance of the computer system 400 and reduce the I / O latency.
[0093] Among them, the host 42 is connected to the first computing device 411 through a bus, which can be a PCIe bus, a UPI bus, or the like. The second computing device 412 is connected to the first computing device 411 through a bus, which can be a PCIe bus or the like. The first computing device 411 is connected to the storage pool 102 through a network. At this time, the first computing device 411 can be configured with the function of a network card. Moreover, the storage pool 102 can be a distributed storage system, and the distributed storage system can include multiple storage servers.
[0094] In one implementation, the host 42 can be a complex instruction set computer (CISC) processor, and the second computing device 412 can be a reduced instruction set compute (RISC) processor. For example, the host 42 can be a processor with an X86 architecture, and the second computing device 412 can be an ARM. The first computing device 411 can include devices such as a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC) that perform data processing operations through hardware.
[0095] Among them, there can be multiple connection methods between the host 42, the first computing device 411, and the second computing device 412. In an achievable connection method, the host 42 is electrically connected to the first computing device 411, the second computing device 412 is electrically connected to the first computing device 411, and the second computing device 412 is connected to the host 42 through the first computing device 411. At this time, communication can be achieved between the host and the second computing device through the first computing device. It can be seen that Figure 4 FIG. is a schematic connection diagram of the second computing device 412 connected to the host 42 through the first computing device 411.
[0096] In another achievable connection method, the host 42 is electrically connected to the first computing device 411, the second computing device 412 is electrically connected to the first computing device 411, and the second computing device 412 is connected to the host 42 (as shown by the dashed line in Figure 5 ). Optionally, when the second computing device 412 is connected to the host 42, the host 42 and the second computing device 412 can also be directly connected through a bus. At this time, the host 42 and the second computing device 412 can communicate directly, or the host 42 and the second computing device 412 can also communicate through the first computing device 411, that is, the information to be transmitted between the host 42 and the second computing device 412 can be forwarded through the first computing device 411.
[0097] Among them, the host 42 can be internally configured with a memory for storing the data cached during the operation of the host 42. Alternatively, as Figure 5 shown, the host 42 can be connected to an external first memory 43, and the first memory 43 is used to store the data cached during the operation of the host 42. At this time, the host 42 and the external first memory 43 can be connected through a double data rate (DDR) bus.
[0098] The first computing device 411 can be internally configured with a memory for storing the data cached during the operation of the first computing device 411. Alternatively, as Figure 5 shown, the first computing device 411 can also be connected to an external second memory 44 for storing the data cached during the operation of the first computing device 411. At this time, the first computing device 411 and the external second memory 44 can be connected through a DDR bus.
[0099] Among them, the memory for storing the data cached during the operation of the host 42 and the memory for storing the data cached during the operation of the first computing device 411 can both be double data rate synchronous dynamic random access memory (DDR SDRAM).
[0100] Optionally, the first computing device 411 may not have the function of a network card. At this time, as Figure 5 shown, the computer system 400 may further include a network card 45, and the first computing device 411 can be electrically connected to the storage pool 102 through the network card 45. Among them, the first computing device 411 and the network card 45 can be connected through a bus such as PCIe.
[0101] Moreover, the second computing device 412 and the network card 45 can also be connected through a bus (as shown by the dotted line in Figure 5 ). When the second computing device 412 and the network card 45 are connected through a bus, the second computing device 412 and the network card 45 can communicate directly, or the second computing device 412 and the network card 45 can communicate through the first computing device 411, that is, the information that needs to be transmitted between the network card 45 and the second computing device 412 can be forwarded through the first computing device 411. When the second computing device 412 and the network card 45 are connected through the first computing device 411, the second computing device 412 and the network card 45 can communicate through the first computing device 411.
[0102] In the storage offloading system 41 provided by the embodiments of the present application, the second computing device 412 is used to preprocess I / O commands such as write operation commands and / or read operation commands generated by the host 42, so as to instruct the first computing device 411 to perform related operations. When the computer system 400 includes a network card 45, the second computing device 412 is further used to instruct the network card 45 to perform related operations according to the preprocessed I / O commands. That is to say, the second computing device 412 is mainly used to control other devices in the computer system according to the preprocessed I / O commands. For example, the second computing device 412 can parse the I / O commands generated by the host 42. Or, the second computing device 412 can perform striping processing according to the I / O commands and control the network card 45 to read data according to the striping result. Or, the second computing device 412 can generate a command instructing the first computing device to perform a data processing operation on the data involved in the I / O command according to the I / O command generated by the host 42. Among them, the data processing operation may include: performing one or more of data processing operations such as EC, DIF, encryption, and decryption on the data.
[0103] Moreover, when the host 42 transmits I / O commands to the second computing device 412 through the first computing device 411, the first computing device 411 can also perform traffic management on the I / O commands to instruct the I / O commands to be processed in order according to the priority order of the I / O commands. Or, the operation of performing traffic management on the I / O commands can also be performed by the second computing device 412, and the embodiments of the present application do not make specific limitations on this.
[0104] As can be seen from the above, the first computing device provided by the embodiments of the present application can perform data processing operations and traffic management operations originally performed by the host 42, and can offload the functions of the host 42 performing data processing operations and traffic management operations to the first computing device, reducing the system overhead of the host. Moreover, the first computing device 411 can implement the data processing function in hardware. Compared with using software to perform data processing operations, it can effectively improve the processing speed and reduce the impact of software implementation on the processing performance of the computer system. Therefore, through the first computing device provided by the embodiments of the present application, the storage offloading system including the first computing device, and the computer system including the storage offloading system, on the one hand, it can reduce the system overhead of the host, and on the other hand, it can improve the processing performance of the computer system and reduce the I / O latency.
[0105] Figure 6 It is a schematic structural diagram of another computer system 400 including the storage offloading system 41 provided by the embodiments of the present application. As Figure 6As shown, the host 42 includes a virtual machine 421. The virtual machine 421 includes an NVMe / Virtio front-end module 421a. The first computing device 411 includes: an NVMe / Virtio back-end module 411a, an end point (EP) module 411b, and a data processing module 411c. Among them, the NVMe / Virtio back-end module 411a is used to dock with the NVMe / Virtio front-end module 421a to implement communication between the host 42 and the first computing device 411. The EP module 411b is used to process the interface specification under the PCIe standard to implement communication between the second computing device 412 and the first computing device 411. The data processing module 411c is used to perform data processing operations on the data to be written into the storage pool. For example, the data processing module 411c is used to perform one or more of the data processing operations such as EC, DIF, encryption, and decryption on the data.
[0106] Optionally, the first computing device 411 may further include one or more of the following modules: a virtual machine I / O processing module ( Figure 6 not shown in the figure), a quality of service (QoS) module 411d, and a DMA module 411e. Among them, the virtual machine I / O processing module is used to analyze the I / O commands received from the host 42. The QoS module 411d is used to implement traffic management for the I / O commands. The DMA module 411e is used to implement data transfer between the first computing device 411 and the host 42 and between the first computing device 411 and the storage pool 102 through the DMA method.
[0107] For the functions of other structures in the computer system 400, please refer to the functions in the foregoing description accordingly, and details are not described herein again.
[0108] An embodiment of the present application further provides a data access method, which can be applied to the computer system 400 provided in the embodiment of the present application. The data access method involves two aspects: writing data from the host to the storage pool and reading data from the storage pool by the host. The following will separately describe these two aspects. When describing these two aspects, it is described by taking the host and the second computing device being connected through the first computing device as an example.
[0109] Figure 7 is a flowchart of a method for a host to write data to a storage pool provided in an embodiment of the present application. The data access method can be applied to Figure 4 、 Figure 5 or Figure 6 the computer system 400 shown. As Figure 7 shown, the method may include the following steps:
[0110] Step 501, the first computing device obtains a first write operation command generated by the host.
[0111] Among them, the first write operation command is used to write the data to be written into the storage pool. After the host generates the first write operation command, the first computing device can obtain the first write operation command. For example, when the host and the second computing device are connected through the first computing device, after the host generates the first write operation command, it can send the first write operation command to the first computing device, so as to send the first write operation command to the second computing device through the first computing device. Among them, after the host generates the first write operation command, the data to be written can be temporarily stored in the memory of the host. It should be noted that the memory of the host can refer to the memory configured inside the host 42, or the first memory connected to the host 42. The embodiments of the present application do not make specific distinctions on this. As an example, step 501 can be executed by the NVMe / Virtio backend module.
[0112] Optionally, during the transmission of the first write operation command, the first write operation command itself can be transmitted, or the first write operation command can be transmitted in an identification manner. When the first write operation command is transmitted in an identification manner, after the first computing device obtains the first write operation command, it can allocate an I / O command identifier for the first write operation command, and transmit the I / O command identifier during the subsequent transmission of the first write operation command.
[0113] Correspondingly, the first computing device can also generate a control information block for recording the content of the first write operation command according to the first write operation command, so that the receiving end (such as the second computing device) that receives the I / O command identifier of the first write operation command can obtain the content of the first write operation command by reading the control information block of the first write operation command. Among them, the description information of the first write operation command can be stored in the control information block, and the description information is used to indicate the content of the first write operation command. The content of the first write operation command can include information such as the storage address and data length of the data to be written involved in the first write operation command. And, the control information block can be stored in the memory of the first computing device. The memory of the first computing device here can refer to the memory configured inside the first computing device, or the second memory connected to the first computing device. The embodiments of the present application do not make specific distinctions on this.
[0114] By the first computing device allocating an I / O command identifier for the first write operation command and transmitting the I / O command identifier in the computer system, it is possible to reduce the amount of data transmitted without directly transmitting the first write operation command itself, simplify the command transmission process, and ensure the processing performance of the computer system.
[0115] It should be noted that after the first computing device receives the first write operation command, if the first computing device assigns an I / O command identifier to the first write operation command, the I / O command identifier of the first write operation command is used for transmission during the subsequent transmission process of the first write operation command. If the first computing device does not assign an I / O command identifier to the first write operation command, the first write operation command is used for transmission during the subsequent transmission process of the first write operation command. In the following description, these two transmission methods are not distinguished.
[0116] Step 502: The first computing device performs traffic management on the first write operation command.
[0117] When the first computing device obtains the first write operation command generated by the host, if the first computing device simultaneously obtains multiple write operation commands including the first write operation command, the first computing device can first preprocess the multiple write operation commands and send the preprocessed multiple write operation commands to the second computing device. For example, the first computing device can sort the multiple write operation commands according to a specified policy, so that when sequentially sending the sorted multiple write operation commands to the second computing device, the first write operation command is sent to the second computing device in the order of the first write operation command in the sorted multiple write operation commands. As an example, this step 502 can be executed by the QOS module.
[0118] Among them, the specified policy can be determined according to application requirements. For example, the specified policy can be a service quality management policy. At this time, the first computing device can sort the multiple write operation commands according to the service instruction priorities of the multiple write operation commands, so as to sequentially send the sorted multiple write operation commands to the second computing device in the sorted order, enabling the second computing device to give priority to processing the write operation commands with higher priorities to improve the user experience.
[0119] It should be noted that this step 502 is an optional step. When executing the data access method provided in the embodiments of the present application, it can be determined whether to execute this step 502 according to application requirements. When this step 502 is not executed, after the first computing device receives the first write operation command, it can directly send the first write operation command to the second computing device. Moreover, the operation of performing traffic management on the first write operation command can also be executed by the second computing device. For example, after the second computing device obtains multiple write operation commands including the first write operation command, it can perform traffic management on the multiple write operation commands.
[0120] Step 503: The first computing device sends the first write operation command after traffic management to the second computing device.
[0121] After the first computing device obtains the first write operation command, it can send the first write operation command to the second computing device, so that the second computing device can send a control command to the first computing device according to the first write operation command. For example, the second computing device can send a second write operation command to the first computing device to instruct the first computing device to perform a data processing operation. Moreover, after the first computing device obtains multiple write operation commands including the first write operation command, if the first computing device sorts the multiple write operation commands according to a specified policy, the first computing device can send the first write operation command to the second computing device in the order of the first write operation command in the sorted multiple write operation commands during the process of sequentially sending the sorted multiple write operation commands to the second computing device. As an example, this step 503 can be executed by the QOS module.
[0122] Step 504: The second computing device sends a second write operation command to the first computing device based on the first write operation command.
[0123] After receiving the first write operation command, the second computing device can generate a second write operation command according to the first write operation command and send the second write operation command to the first computing device. The second write operation command is used to instruct the first computing device to perform a data processing operation on the data to be written. At this time, the preprocessing of the first write operation command by the second computing device means generating a second write operation command according to the first write operation command. The data processing operation on the data to be written can include one or more of performing erasure coding, data consistency protection, encryption, and decryption on the data to be written.
[0124] Optionally, the second write operation command may carry the address information of the data to be written in the memory of the host, so as to instruct the first computing device to read the data to be written at the address indicated by the address information and perform a data processing operation on the data to be written. For example, the address information of the data to be written in the memory of the host may include the starting address and the data length of the data to be written in the memory of the host.
[0125] Moreover, the second write operation command may also carry the address information for storing the data to be written after the data processing operation (hereinafter simply referred to as the processed data to be written), so as to instruct the first computing device to store the processed data to be written at the address indicated by the address information after performing the data processing operation on the data to be written. For example, the address information for the processed data to be written may include the starting address and the data length.
[0126] It should be noted that, in the embodiments of the present application, the storage pool may be a distributed storage system, which may include multiple storage servers, and the data to be written can be stored in multiple storage servers respectively. Therefore, before the second computing device generates the second write operation command, the second computing device may further decompose the write operation command into multiple write operation sub-commands, and sequentially write the multiple write operation sub-commands into multiple write operation sub-queues respectively, so as to perform striping processing on the write operation sub-commands in each write operation sub-queue respectively, obtain multiple write operation stripes corresponding to the multiple write operation sub-queues, and generate a second write operation command according to the write operation sub-commands in the multiple write operation stripes. Wherein, each write operation sub-queue corresponds to a write operation destination, and the write operation destination is a storage server for storing the data involved in the write operation sub-command in the write operation sub-queue.
[0127] Wherein, a set of a specified number of write operation sub-commands in the same write operation sub-queue is called a write operation stripe, and the write operation sub-commands within a write operation stripe may come from different write operation commands. Striping refers to aggregating write operation stripes according to write operation sub-commands. Through striping processing, the data involved in a specified number of write operation sub-commands included in a write operation stripe can be written to the same write operation destination through one write command, which can improve the efficiency of writing data.
[0128] For example, assume that the value of the specified number is 32. As Figure 8 shown, each write operation sub-queue corresponds to a write operation destination, and a set of 32 write operation sub-commands in each write operation sub-queue is called a write operation stripe. After every 32 write operation sub-commands are aggregated, one write command can be used to write the data involved in the 32 write operation sub-commands to the same write operation destination.
[0129] Moreover, since the multiple write operation sub-commands are sequentially written into the multiple write operation sub-queues during the striping process, the implementation manner of generating the second write operation command according to the write operation sub-commands in the multiple write operation stripes may include: when the i-th write operation sub-command (i.e., write operation sub-command i) is written to each write operation sub-queue in the multiple write operation sub-queues, a second write operation command is generated according to the i-th write operation sub-command in each write operation sub-queue in the multiple write operation sub-queues. And the information of the check data generated according to the first write operation command can also be stored in the check sub-queue, and the information of the check data is used to indicate the address information of the generated check data, etc. Wherein, i refers to the order of the write operation sub-command in the corresponding write operation sub-queue.
[0130] For example, as Figure 8As shown, when the third rows of the write operation sub-queues N0, N1, and N2 are all written with the i-th write operation sub-command belonging to their own queue, the second write operation command 2 can be generated based on the i-th write operation sub-command of the write operation sub-queue N0, the i-th write operation sub-command of the write operation sub-queue N1, and the i-th write operation sub-command of the write operation sub-queue N2. Correspondingly, when two pieces of check data are generated according to the second write operation command 2, the information of these two pieces of check data can be saved in the check sub-queues M0 and M1. For example, assume that the second write operation command generated by the second computing device is used to instruct the first computing device to perform an EC algorithm on the data to be written involved in the write operation sub-command, and this EC algorithm is used to generate M (e.g., M = 2) check data blocks based on N (e.g., N = 3) data blocks. After executing the second write operation command instruction 2, two check data blocks will be generated, and the information of these two check data blocks can be saved in the check sub-queues M0 and M1 respectively.
[0131] Step 505: The first computing device performs a data processing operation on the data to be written based on the second write operation command, and stores the processed data to be written.
[0132] Among them, the first computing device performs a data processing operation on the data to be written based on the second write operation command, including: the first computing device performs one or more of operations such as erasure code, data consistency protection, encryption, and decryption on the data to be written based on the second write operation command. As an example, this step 505 can be executed by a data processing module.
[0133] When performing an erasure code operation on the data to be written, the processed data to be written may include: the data to be written and the check data of the data to be written. For example, the processed data to be written includes the data blocks of the data to be written and the check data blocks. When performing a data consistency protection operation on the data to be written, the processed data to be written may include: the data to be written and the data consistency protection data (also called check data). For example, when the data consistency protection operation is to perform a hash algorithm on the data, the processed data to be written includes the data blocks of the data to be written and the hash value calculated based on the data to be written. When performing an encryption operation on the data to be written, the processed data to be written may include: the data obtained by encrypting the data to be written.
[0134] Optionally, according to different data storage methods, the implementation methods for the first computing device to perform a data processing operation on the data to be written based on the second write operation command can at least include the following two:
[0135] In the first implementable method of step 505, such as Figure 9As shown by the dashed arrow in the figure, the first computing device may, based on the second write operation command, read the data to be written from the memory of the host, perform a data processing operation on the data to be written read from the memory of the host, and store the data other than the data to be written in the processed data to be written in the memory of the first computing device. Among them, the Figure 9 is a schematic diagram for storing the processed data to be written when the first computing device is connected to the second memory.
[0136] For example, when the processed data to be written includes the data to be written and the check data of the data to be written, the check data may be stored in the memory of the first computing device, and the data to be written remains stored in the memory of the host. Or, when the processed data to be written includes the check data of the data to be written, the check data may be stored in the memory of the first computing device.
[0137] In the second implementable manner of step 505, as Figure 10 shown by the dashed arrow in the figure, the first computing device may, based on the second write operation command, read the data to be written from the memory of the host. The first computing device stores the data to be written read from the memory of the host in the memory of the first computing device, performs a data processing operation on the data to be written stored in the memory of the first computing device to obtain the processed data to be written, and stores the processed data to be written in the memory of the first computing device. Among them, the Figure 10 is another schematic diagram for storing the processed data to be written when the first computing device is connected to the second memory.
[0138] For example, when the processed data to be written includes the data to be written and the check data of the data to be written, after performing the data processing operation, the check data may be stored in the memory of the first computing device. And since the data to be written is pre-stored in the memory of the first computing device, therefore, both the data to be written and the check data are stored in the memory of the first computing device. Or, when the processed data to be written includes the check data of the data to be written, the check data may be stored in the memory of the first computing device.
[0139] Among them, the manner in which the first computing device reads data from the memory of the host may adopt the DMA method. And, in the embodiments of the present application, all data reading methods may be the DMA method, and the subsequent steps related to reading data will not be elaborated further.
[0140] It should be noted that when the first computing device is internally configured with a memory, the first computing device can store the data to be stored in the memory internally configured in the first computing device. When the first computing device is connected to an external second memory, the first computing device can store the data to be stored in the second memory. For ease of description, the memory internally configured in the first computing device and the second memory will not be distinguished hereinafter, and both are referred to as the memory of the first computing device.
[0141] Moreover, after the first computing device completes the data processing operation indicated by the second write operation command, the first computing device can send a second write operation response to the second computing device to inform the second computing device that the first computing device has completed the data processing operation.
[0142] Step 506: The second computing device sends a third write operation command to the network card. The third write operation command is used to instruct the network card to read the processed data to be written and write the processed data to be written into the storage pool.
[0143] After the second computing device determines that the first computing device has completed the data processing operation, it can send an instruction to indicate reading the processed data to be written and writing the processed data to be written into the storage pool. For example, when the first computing device is connected to the storage pool through the network card, the second computing device can send a third write operation command to the network card to instruct the network card to read the processed data to be written and write the processed data to be written into the storage pool.
[0144] Moreover, in step 504, if the second computing device performs striping processing on the write operation sub-command, the execution condition for this step 506 is: after the second computing device accumulates one or more write operation stripes, a third write operation command is generated based on the write operation sub-commands in each write operation stripe to instruct the network card to write the processed data to be written involved in the write operation sub-commands in the write operation stripe to a write operation destination.
[0145] In the third write operation command corresponding to the write operation stripe, a message header and data-related information of the processed data to be written involved in the write operation sub-commands in the write operation stripe can be carried. The message header can include key field segments in the format of a network packet header carrying the processed data to be written. For example, the key field segments can include information such as the entire payload length and the destination address of the network packet. The data-related information can include descriptive information such as the address information of each data block in the processed data to be written to instruct the network card to read the corresponding data under the indication of the data-related information. The storage location can include the starting address and data length of the data block storage location.
[0146] It should be noted that when the second computing device is connected to the network card via a bus, the second computing device can directly send a third write operation command to the network card via the bus. When the second computing device is connected to the network card via the first computing device, the second computing device can first send the first write instruction to the first computing device, and then the first computing device sends the first write instruction to the network card.
[0147] Step 507: The network card reads the processed data to be written based on the third write operation command.
[0148] After performing different data processing operations on the data to be written, the generated processed data to be written includes different data types. For example, the processed data to be written can include: check data. At this time, the network card can, according to the indication of the third write operation command, read the processed data to be written (also known as check data at this time) in the memory used to store the processed data to be written.
[0149] Or, the processed data to be written can include: data to be written and check data. At this time, it is necessary to read the data to be written and the check data separately. Corresponding to the two realizable ways in step 505, the realizable ways of separately reading the data to be written and the check data can also be the following two:
[0150] Corresponding to the first realizable way in step 505, when the processed data to be written includes: data to be written and check data, since the data to be written is stored in the memory of the host, and the check data is stored in the memory of the first computing device. At this time, as Figure 9 shown, the network card can, according to the indication of the third write operation command, read the data to be written from the memory of the host, read the check data from the memory of the first computing device, or, when the processed data to be written includes the check data of the data to be written, read the check data from the memory of the first computing device.
[0151] It can be seen from this that by storing the data to be written in the memory of the host and storing the check data in the memory of the first computing device, it is possible to avoid storing duplicate data in the computer system and effectively utilize the memory space of the computer system.
[0152] Corresponding to the second realizable way in step 505, when the processed data to be written includes: data to be written and check data, since both the data to be written and the check data are stored in the memory of the first computing device. At this time, as Figure 10 shown, the network card can, according to the indication of the third write operation command, read the data to be written and the check data in the memory of the first computing device. Or, when the processed data to be written includes the check data of the data to be written, read the check data from the memory of the first computing device.
[0153] It can be seen that by storing both the data to be written and the check data in the memory of the first computing device, the network card can read the data to be written and the check data from the same memory, without having to read data from the memory of the first computing device and the memory of the host separately, which can reduce the time consumed for reading data and reduce the write latency.
[0154] Step 508, the network card writes the processed data to be written into the storage pool.
[0155] After reading the processed data to be written, the network card can, according to the message header and data-related information of the processed data to be written carried in the third write operation command, form a message based on the processed data to be written and send the message to the storage pool. By way of example, the network card can construct the message header of the message according to the message header of the processed data to be written carried in the third write operation command, and according to the data-related information of the processed data to be written carried in the third write operation command, use the data blocks indicated by the data-related information to fill the message payload to obtain the message.
[0156] For example, in Figure 11 , Figure 8 the messages corresponding to the respective write operation sub-queues are message MSG 0, message MSG1, message MSG 2, message MSG 3, and message MSG 4. Their corresponding relationships are as follows:
[0157] The data block in message MSG 0 is the data block involved in the write operation sub-command in write operation sub-queue N0, and message header 0 is the message header constructed for the message according to the message header carried in the third write operation command corresponding to write operation sub-queue N0.
[0158] The data block in message MSG 1 is the data block involved in the write operation sub-command in write operation sub-queue N1, and message header 0 is the message header constructed for the message according to the message header carried in the third write operation command corresponding to write operation sub-queue N1.
[0159] The data block in message MSG 2 is the data block involved in the write operation sub-command in write operation sub-queue N2, and message header 2 is the message header constructed for the message according to the message header carried in the third write operation command corresponding to write operation sub-queue N2.
[0160] The data block in message MSG 3 is the check data block indicated by the information of the check data in check sub-queue M0, and message header 3 is the message header constructed for the message according to the message header carried in the third write operation command corresponding to check sub-queue M0.
[0161] The data block in message MSG 4 is the check data block indicated by the information of the check data in the checksum subqueue M1, and message header 0 is the message header for constructing the message according to the message header carried in the third write operation command corresponding to the checksum subqueue M1.
[0162] Step 509: The network card receives the write completion command sent by the storage pool.
[0163] Step 510: The network card sends the write completion command to the second computing device.
[0164] After receiving the write completion command sent by the storage pool, the network card can send the write completion command to the second computing device to indicate that the write operation requested by the first write operation command has been completed. Moreover, since the network card usually sends the processed data to be written in multiple data packets to the storage pool, at this time, the storage pool can send a write completion command to the network card for each received data packet. Correspondingly, the network card can send the write completion command to the second computing device for each received write completion command.
[0165] Moreover, the third write operation command sent by the second computing device to the network card can carry the position indicating the storage write completion command. After receiving the write completion command, the network card can store the write completion command in this position so that the second computing device can read the write completion command from this position.
[0166] It should be noted that when the second computing device is connected to the network card through a bus, the network card can directly send the write completion command to the second computing device through the bus. When the second computing device is connected to the network card through the first computing device, the network card can send the write completion command to the first computing device, and then the first computing device sends the write completion command to the second computing device.
[0167] It should also be noted that the above steps 506 to 510 take the example that the first computing device does not have the function of the network card to illustrate the process that the second computing device sends an instruction to the network card to indicate reading the processed data to be written, the network card reads the processed data to be written according to the read data instruction and writes it into the storage pool, and the network card receives the write completion command sent by the storage pool and sends the write completion command to the second computing device. When the first computing device is configured with the function of the network card, the implementation process of this process is: the second computing device sends an instruction to the first computing device to indicate reading the processed data to be written, the first computing device reads the processed data to be written according to the read data instruction and writes it into the storage pool, and the first computing device receives the write completion command sent by the storage pool and sends the write completion command to the second computing device.
[0168] Step 511. After determining, according to the write completion command, that the data write operation requested by the write operation command has been completed, the second computing device sends a first write operation response to the first computing device.
[0169] After receiving the write completion command sent by the network card, the second computing device parses the write completion command to determine the content of the write completion command. After determining that the write completion command is used to indicate that the data write operation requested by the first write operation command has been completed, the second computing device sends the first write operation response to the first computing device.
[0170] Moreover, if the network card sends each received write completion command to the second computing device, the second computing device can determine whether the data write operation requested by the first write operation command has been completed according to the total number of received write completion commands, and determine that the data write operation requested by the first write operation command has been completed when the total number of received write completion commands is equal to the total number of expected received write completion commands. Wherein, the data volume carried in the data packet can be preset. During the process of writing data, the second computing device can determine the total number of expected received write completion commands according to the data volume carried in each data packet and the size of the data to be written.
[0171] Step 512. After determining, according to the first write operation response, that the data write operation requested by the write operation command has been completed, the first computing device sends a first write operation response to the host.
[0172] After receiving the first write operation response sent by the second computing device, the first computing device parses the first write operation response to determine the content of the first write operation response. After determining that the first write operation response is used to indicate that the data write operation requested by the first write operation command has been completed, the first computing device sends the first write operation response to the host. As an example, step 512 can be executed by the NVMe / Virtio backend module.
[0173] In an implementable manner, the above steps 501 to 512 can be implemented through a queue. The implementation process of implementing the above steps 501 to 512 through a queue is described below.
[0174] After the host generates the first write operation command, the host can fill the first write operation command into the write operation command queue in the NVMe format.
[0175] In the above step 501, the first computing device can obtain the first write operation command from the write operation command queue.
[0176] Moreover, after obtaining the first write operation command from the write operation command queue, the first computing device can generate a control information block according to the information of the first write operation command and allocate an I / O command identifier to the first write operation command.
[0177] In the above step 502, when the first computing device obtains a plurality of write operation commands including the first write operation command, the first computing device may first write the plurality of write operation commands into a logical volume queue, and then sequentially read the plurality of write operation commands from the logical volume queue according to a specified policy for traffic management.
[0178] Among them, multiple virtual machines are running in the host, and the multiple virtual machines correspond to multiple logical volume queues. Each logical volume queue is used to store write operation commands generated by the corresponding virtual machine. The write operation commands generated by different virtual machines may carry the identifier of the logical volume queue corresponding to them. When the first computing device receives a write operation command, it may write the write operation command into the corresponding logical volume queue according to the identifier of the logical volume queue carried by the write operation command.
[0179] In the above step 503, the first computing device may sequentially write the plurality of write operation commands into a specified number of sub-queues according to the order of reading the plurality of write operation commands from the logical volume queue.
[0180] Among them, since each write operation command usually consists of multiple data packets, the implementation process of the first computing device reading the write operation command may be: reading the data packets, parsing the read data packets, and reconstructing the write operation command according to the parsed content. And, since the first computing device needs to send the write operation command after traffic management to the second computing device, and there may be multiple processors configured in the second computing device, and each processor is used to perform preprocessing according to the write operation commands in a sub-queue, therefore, the process of the first computing device writing the read plurality of write operation commands into the sub-queues in order may include: the first computing device sequentially writes the read plurality of write operation commands into the plurality of sub-queues corresponding to the plurality of processors.
[0181] In the above step 504, the second computing device may read the write operation command from the sub-queue, generate a second write operation command according to the write operation command, and then write the generated second write operation command into the second write operation command queue.
[0182] And, if the second computing device needs to perform striping processing on the write operation sub-commands, the second computing device may also decompose the write operation commands read from each sub-queue respectively, then perform striping processing according to the decomposed write operation sub-commands, and then generate a second write operation command according to the striping result.
[0183] In the above step 505, after the first computing device reads the second write operation command from the second write operation command queue, it can perform data processing operations on the data to be written based on the second write operation command, obtain the processed data to be written and store it.
[0184] Moreover, after the first computing device completes the second write operation command, the second write operation response can be written into the first write operation response queue for the second computing device to read the second write operation response from the first write operation response queue, so that the second computing device determines that the first computing device has completed the data processing operation according to the second write operation response.
[0185] In step 506 above, the second computing device can write the third write operation command into the third write operation command queue, so that the network card obtains the third write operation command from the third write operation command queue.
[0186] In step 507 above, after the network card obtains the third write operation command from the third write operation command queue, it can read the processed data to be written according to the third write operation command.
[0187] In step 510 above, the network card can write the write completion command into the write completion command queue to send the first write operation response to the second computing device.
[0188] In step 511 above, after the second computing device obtains the write completion command from the write completion command queue, it can determine whether the data write operation requested by the first write operation command is completed according to the write completion command, and after determining that the data write operation requested by the first write operation command is completed, generate the first write operation response and write the first write operation response into the first write operation response queue.
[0189] In step 512 above, after the first computing device obtains the first write operation response from the first write operation response queue, it can determine whether the data write operation requested by the first write operation command is completed according to the first write operation response, and after determining that the data write operation requested by the first write operation command is completed, write the first write operation response into the write operation completion queue for the host to read the first write operation response from the write operation completion queue.
[0190] It should be noted that when implementing the above steps through queues, the receiver (i.e., the party that reads commands or responses from the queue in the above steps) can work in the polling mode or the interrupt mode. The polling mode means that the receiver actively polls whether there are commands or responses to be read in the queue, and when there are commands or responses to be read, reads the commands or responses to be read from the queue. The interrupt mode means that when the sender (i.e., the party that writes commands or responses into the queue in the above steps) writes a command or response into the queue, it sends an interrupt signal to the receiver. After the receiver receives the interrupt signal, it polls whether there are commands or responses to be read in the queue, and when there are commands or responses to be read, reads the commands or responses to be read from the queue.
[0191] In the data access method provided by the embodiments of the present application, by using a first computing device to perform data processing operations on the data to be written into the storage pool, the speed of performing data processing operations on the data is improved. In this way, on the one hand, the system overhead of the host can be reduced, and on the other hand, the processing performance of the computer system can be improved, and the I / O latency can be reduced.
[0192] Figure 12 FIG. 4 is a flowchart of a data access method provided by an embodiment of the present application. The data access method relates to the process of the host reading data from the storage pool. The data access method can be applied to Figure 4 、 Figure 5 or Figure 6 the computer system 400 shown in FIG. 5. As shown in Figure 12 FIG. 6, the method may include the following steps:
[0193] Step 601, the first computing device obtains a first read operation command generated by the host.
[0194] Wherein, the first read operation command is used to read data from the storage pool. For the implementation process of step 601, please refer to the implementation process of step 501 accordingly. As an example, step 501 may be executed by the NVMe / Virtio backend module.
[0195] Step 602, the first computing device performs traffic management on the first read operation command.
[0196] For the implementation process of step 602, please refer to the implementation process of step 502 accordingly. For example, the first computing device may sort multiple read operation commands according to a specified policy. This step 602 may be executed by the QOS module.
[0197] It should be noted that this step 602 is an optional step. When executing the data access method provided by the embodiments of the present application, it can be determined whether to execute this step 602 according to application requirements. When this step 602 is not executed, after receiving the first read operation command, the first computing device may directly send the first read operation command to the second computing device. And the operation of performing traffic management on the first read operation command may also be executed by the second computing device. For example, after the second computing device obtains multiple read operation commands including the first read operation command, it may perform traffic management on the multiple read operation commands.
[0198] Step 603, the first computing device sends the first read operation command after traffic management to the second computing device.
[0199] For the implementation process of step 603, please refer to the implementation process of step 503 accordingly. Moreover, if the first computing device sorts multiple read operation commands according to a specified policy, the implementation process of this step 603 includes: when the first computing device sequentially sends the sorted multiple read operation commands to the second computing device, it sends the first read operation command to the second computing device according to the order of the first read operation command in the sorted multiple read operation commands. As an example, this step 603 can be executed by the QOS module.
[0200] Step 604: The second computing device sends a second read operation command to the network card based on the first read operation command. The second read operation command is used to instruct the network card to read data from the storage pool.
[0201] After the second computing device receives the first read operation command, it can send an instruction to indicate reading the requested data from the storage pool. For example, when the first computing device is connected to the storage pool through the network card, the second computing device can send a second read operation command to the network card to instruct the network card to read the requested data from the storage pool. Among them, the second read operation command carries an identifier of the requested data to be read, and this identifier is used to indicate the data to be read. Moreover, the second read operation command can carry address information for storing the read data, so that the network card can store the read data at the address indicated by this address information.
[0202] In addition, the second computing device can also decompose the second read operation command into multiple read operation sub-commands and write these multiple read operation sub-commands into multiple read operation sub-queues respectively, so as to perform striping processing on the read operation sub-commands in each read operation sub-queue respectively. Correspondingly, the execution condition of this step 604 is: after the second computing device accumulates one or more read operation stripes, it generates a second read operation command based on the read operation sub-commands in each read operation stripe to instruct the network card to read data from the storage pool according to the read operation sub-commands in the read operation stripe. Each read operation stripe corresponds to a read operation destination, and the storage server for the read operation sub-commands to read data can all be called the read operation destination of the read operation sub-commands. For the implementation process of performing striping processing on the read operation sub-commands, please refer to the implementation process of performing striping processing on the write operation sub-commands accordingly.
[0203] It should be noted that when the second computing device is connected to the network card through a bus, the second computing device can directly send the second read operation command to the network card through the bus. When the second computing device is connected to the network card through the first computing device, the second computing device can send the second read operation command to the first computing device, and then the first computing device sends the second read operation command to the network card.
[0204] Step 605: The network card sends the second read operation command to the storage pool.
[0205] After receiving the second read operation command, the network card can send the second read operation command to the storage pool to request reading the read data requested by the second read operation command from the storage pool.
[0206] Step 606: The storage pool sends the read data requested by the second read operation command to the network card according to the second read operation command.
[0207] After receiving the second read operation command, the storage pool can read the read data from the storage location storing the read data according to the identifier of the read data carried in the second read operation command, and send the read data to the network card.
[0208] Step 607: The network card sends the read data to the first computing device to write the read data into the host through the first computing device.
[0209] After receiving the read data, the network card can send the read data to the first computing device and instruct the first computing device to send the read data to the host.
[0210] Step 608: When determining that the read data needs to be sent to the host, the first computing device sends the read data to the host.
[0211] For example, as Figure 13 shown by the dashed arrow in the figure, after receiving the read data sent by the storage pool, the network card can send the read data to the first computing device. When the first computing device determines that the read data needs to be sent to the host, the first computing device forwards the read data to the host. From the process of the read data, it can be seen that in the process of the read data, the read data realizes data passthrough in the first computing device. As an example, Step 608 can be executed by the NVMe / Virtio backend module.
[0212] It should be noted that in the process of reading data according to the read operation instruction, if data processing operations need to be performed on the read data, the first computing device can also perform corresponding data processing operations on the read data. For example, if the read data sent by the storage pool is encrypted read data, after receiving the encrypted read data, the first computing device can also decrypt the encrypted read data and send the decrypted data to the host. In this way, the data processing operations on the read data can also be offloaded to the first computing device, further reducing the system overhead of the host.
[0213] Step 609: The network card sends a first read operation response to the second computing device.
[0214] After receiving the read data sent by the storage pool, the network card can send a first read operation response to the second computing device to notify the second computing device that the read data has been obtained.
[0215] Moreover, the second read operation command sent by the second computing device to the network card can carry an indication of the position for storing the first read operation response. After the network card receives the first read operation response, it can store the first read operation response at this position, so that the second computing device can read the first read operation response from this position.
[0216] Meanwhile, since the storage pool usually sends the read data in multiple data packets to the network card, at this time, the network card can send a read operation sub-response to the second computing device for each received data packet.
[0217] It should be noted that when the second computing device is connected to the network card through a bus, the network card can directly send the first read operation response to the second computing device through the bus. When the second computing device is connected to the network card through the first computing device, the network card can send the first read operation response to the first computing device, and then the first computing device sends the first read operation response to the second computing device.
[0218] It should also be noted that the above steps 604 to 606 are described by taking the first computing device not having the function of the network card as an example for the process that the second computing device sends a second read operation command to the network card, and the network card reads data from the storage pool according to the second read operation command. When the first computing device is configured with the function of the network card, the implementation process of this process is: the second computing device sends a second read operation command to the first computing device, and the first computing device reads data from the storage pool according to the second read operation command.
[0219] Step 610: After determining that the data read operation requested by the first read operation command is completed according to the first read operation response, the second computing device sends the first read operation response to the first computing device.
[0220] For the implementation process of this step 610, please refer to the implementation process of step 511 accordingly.
[0221] Step 611: After determining that the data read operation requested by the first read operation command is completed according to the first read operation response, the first computing device sends the first read operation response to the host.
[0222] After receiving the first read operation response sent by the second computing device, the first computing device parses the first read operation response to determine the content of the first read operation response, and after determining that the first read operation response is used to indicate that the data reading operation requested by the first read operation command is completed, sends the first read operation response to the host. As an example, step 611 can be executed by the NVMe / Virtio backend module.
[0223] It should be noted that the above steps 601 to 611 can also be implemented in a queue manner. The implementation process can refer to the implementation process of the above steps 501 to 512 implemented through a queue.
[0224] In the data access method provided in the embodiments of the present application, by using the first computing device to perform data processing operations on the data read from the storage pool, the speed of performing data processing operations on the data is increased. In this way, on the one hand, the system overhead of the host can be reduced, and on the other hand, the processing performance of the computer system can be improved, and the I / O latency can be reduced.
[0225] Embodiments of the present application provide a data access device, as Figure 14 shown, the device 700 may include:
[0226] A receiving module 701, configured to receive a second write operation command sent by a second computing device, where the second write operation command is obtained after preprocessing a first write operation command generated by the second computing device for the host, and the first write operation command is used to write data to be written into the storage pool.
[0227] A processing module 702, configured to perform data processing operations on the data to be written based on the second write operation command.
[0228] A writing module 703, configured to write the processed data to be written into the storage pool.
[0229] Optionally, the processing module 702 is specifically configured to: perform one or more of erasure coding, data consistency protection, and encryption on the data to be written based on the second write operation command.
[0230] Optionally, the processed data to be written includes: check data of the data to be written. The writing module 703 is specifically configured to: store the check data in the memory of the first computing device, and store the check data from the memory of the first computing device to the storage pool.
[0231] Optionally, the processed data to be written further includes: the data to be written. At this time, as Figure 15 shown, the device 700 further includes: a storage module 704, configured to store the data to be written from the host to the memory of the first computing device.
[0232] Correspondingly, the writing module 703 is further specifically configured to store the data to be written from the memory of the first computing device into the storage pool.
[0233] Optionally, the processed data to be written further includes the data to be written. At this time, the writing module 703 is further specifically configured to store the data to be written from the host into the storage pool.
[0234] Optionally, as Figure 15 shown, the apparatus 700 further includes:
[0235] An obtaining module 705, configured to obtain a first write operation command generated by the host.
[0236] A sending module 706, configured to send the first write operation command to the second computing device.
[0237] Optionally, when the first computing device receives multiple write operation commands including the first write operation command, as Figure 15 shown, the apparatus 700 further includes: a sorting module 707, configured to sort the multiple write operation commands according to a specified policy.
[0238] At this time, the sending module 706 is specifically configured to: in the process of sequentially sending the sorted multiple write operation commands to the second computing device, send the first write operation command to the second computing device according to the order of the first write operation command in the sorted multiple write operation commands.
[0239] Optionally, the first computing device may be electrically connected to the storage pool through a network card. At this time, the sending module 706 is further configured to send a second write operation response to the second computing device, and the second write operation response is used to indicate that the data processing operation has been completed.
[0240] A receiving module 701, configured to receive a third write operation command sent by the second computing device based on the second write operation response, where the third write operation command is used to instruct the network card to read the processed data to be written and write the processed data to be written into the storage pool. The sending module is further configured to forward the third write operation command to the network card.
[0241] Optionally, the receiving module 701 is further configured to receive a first write operation response sent by the second computing device for the first write operation command, and the first write operation response is obtained by the second computing device through preprocessing according to a write completion command sent by the storage pool.
[0242] The sending module 706 is further configured to send a first write operation response to the host after determining that the data writing operation requested by the first write operation command is completed according to the first write operation response.
[0243] In the data access device provided in the embodiment of the present application, the processing module is used to perform data processing operations on the data to be written into the storage pool, so as to improve the speed of performing data processing operations on the data. In this way, on the one hand, the system overhead of the host can be reduced, and on the other hand, the processing performance of the computer system can be improved, and the I / O latency can be reduced.
[0244] Optionally, the receiving module 701 is further configured to receive the read data, where the read data is the data read from the storage pool based on the second read operation command of the second computing device, and the second read operation command is obtained after preprocessing the first read operation command generated by the second computing device for the host, and the first read operation command is used to read the read data from the storage pool.
[0245] The sending module 706 is further configured to forward the read data to the host.
[0246] Optionally, the obtaining module 705 is further configured to obtain the first read operation command generated by the host.
[0247] The sorting module 707 is further configured to sort a plurality of read operation commands including the first read operation command according to a specified policy when the first computing device receives the plurality of read operation commands.
[0248] The sending module 706 is further configured to send the first read operation command to the second computing device in the order of the first read operation command in the sorted plurality of read operation commands when sequentially sending the sorted plurality of read operation commands to the second computing device.
[0249] Optionally, the receiving module 701 is further configured to receive the first read operation response sent by the second computing device for the first read operation command, and the first read operation response is obtained based on the read data.
[0250] The sending module 706 is further configured to send the first read operation response to the host after determining that the data reading operation requested by the first read operation command is completed according to the first read operation response.
[0251] In the data access device provided in the embodiment of the present application, the processing module is used to perform data processing operations on the data read from the storage pool, so as to improve the speed of performing data processing operations on the data. In this way, on the one hand, the system overhead of the host can be reduced, and on the other hand, the processing performance of the computer system can be improved, and the I / O latency can be reduced.
[0252] An embodiment of the present application provides a data access device, which can be deployed in a second computing device, and the second computing device is connected to a first computing device. As Figure 16 shown, the device 800 may include:
[0253] An acquisition module 801, configured to acquire a first write operation command generated by a host, where the first write operation command is used to write data to be written into a storage pool.
[0254] A processing module 802, configured to preprocess the first write operation command to obtain a second write operation command, where the second write operation command is used to instruct a first computing device to perform a data processing operation on the data to be written.
[0255] A sending module 803, configured to send the second write operation command to the first computing device.
[0256] Optionally, the acquisition module 801 is further configured to acquire a first read operation command generated by a host, where the first read operation command is used to read required read data from a storage pool.
[0257] The processing module 802 is further configured to preprocess the first read operation command to obtain a second read operation command, where the second read operation command is used to read the read data from the storage pool.
[0258] The sending module 803 is further configured to send the second read operation command to the first computing device.
[0259] An embodiment of the present application provides a first computing device. As Figure 17 shown, the first computing device may include a processing unit 901, a communication interface 902, and a bus 903. The first computing device executes the data access method provided by the embodiment of the present application through the processing unit 901.
[0260] In the first computing device, the number of processing units 901 may be one or more, Figure 17 only one processing unit 901 is schematically shown. Optionally, the processing unit 901 may be a CPU. If the first computing device has multiple processing units 901, the types of the multiple processing units 901 may be different or the same. Optionally, the multiple processors of the first computing device may also be integrated into a multi-core processor.
[0261] The communication interface 902 may be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, or other devices with network access functions. The communication interface 902 is used for the first computing device to perform data communication with other nodes or terminal devices.
[0262] Optionally, the first computing device may further include: a memory ( Figure 17(not shown in the figure). The memory can store data and the like required to implement the data access method provided in this application. The memory can be used as the second memory in the foregoing method embodiments. The memory can be any one or any combination of the following storage media: non-volatile memory (such as read-only memory (ROM), solid state disk (SSD), hard disk drive (HDD), optical disc, etc.), volatile memory.
[0263] Embodiments of this application also provide another first computing device. As Figure 18 shown, the first computing device can include a logic circuit 1001, a communication interface 1002, and a bus 1003. The first computing device executes the data access method provided in the embodiments of this application through the logic circuit 1001.
[0264] In one implementable manner, the logic circuit 1001 can be an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), an application-specific integrated circuit, or any combination thereof. This application does not make specific limitations.
[0265] In the first computing device, the number of logic circuits 1001 can be one or more, Figure 18 only one logic circuit 1001 is schematically shown. Optionally, the logic circuit 1001 can be a CPU. If the first computing device has multiple logic circuits 1001, the types of the multiple logic circuits 1001 can be different or the same. Optionally, the multiple processors of the first computing device can also be integrated into a multi-core processor.
[0266] The communication interface 1002 can be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, or other devices with network access functions. The communication interface 1002 is used for the first computing device to communicate with other nodes or terminal devices.
[0267] Optionally, the first computing device can further include: a memory ( Figure 18(not shown in the figure). The memory can store data required to implement the data access method provided in this application, etc. The memory can be used as the second memory in the foregoing method embodiments. The memory can be any one or any combination of the following storage media: non-volatile memory (such as read-only memory, solid-state drive, hard disk, optical disc, etc.), volatile memory.
[0268] An embodiment of this application provides a second computing device. As Figure 19 shown, the second computing device may include a processing unit 1101, a communication interface 1102, and a bus 1103. The second computing device executes the data access method provided in the embodiments of this application through the processing unit 1101.
[0269] In the second computing device, the number of processing units 1101 can be one or more, Figure 19 only one processing unit 1101 is schematically shown. Optionally, the processing unit 1101 can be a CPU. If the second computing device has multiple processing units 1101, the types of the multiple processing units 1101 can be different or the same. Optionally, the multiple processors of the second computing device can also be integrated into a multi-core processor. In one implementable manner, the processing unit 1101 can be an ARM.
[0270] The communication interface 1102 can be any one or any combination of the following devices: network interfaces (such as Ethernet interfaces), wireless network cards, and other devices with network access functions. The communication interface 1102 is used for the second computing device to communicate with other nodes or terminal devices.
[0271] Optionally, the second computing device may further include: a memory ( Figure 19 (not shown in the figure). The memory can store data required to implement the data access method provided in this application, etc. The memory can be any one or any combination of the following storage media: non-volatile memory (such as read-only memory, solid-state drive, hard disk, optical disc, etc.), volatile memory.
[0272] An embodiment of this application also provides a first storage medium, which is a non-volatile computer-readable storage medium. When the instructions in the first storage medium are executed by a processor, the functions implemented by the first computing device in the data access method in the embodiments of this application are realized.
[0273] An embodiment of this application also provides a second storage medium, which is a non-volatile computer-readable storage medium. When the instructions in the second storage medium are executed by a processor, the functions implemented by the second computing device in the data access method in the embodiments of this application are realized.
[0274] The embodiments of the present application also provide a first computer program product containing instructions. When the first computer program product runs on a computer, it causes the computer to execute the functions implemented by the first computing device in the data access method of the embodiments of the present application.
[0275] The embodiments of the present application also provide a second computer program product containing instructions. When the second computer program product runs on a computer, it causes the computer to execute the functions implemented by the second computing device in the data access method of the embodiments of the present application.
[0276] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, etc.
[0277] In the embodiments of the present application, the terms "first", "second", and "third" are only used for descriptive purposes and should not be construed as indicating or implying relative importance.
[0278] The term "and / or" in the present application is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0279] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concept and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data access method, characterized in that, The method is applied to a network card, and the method includes: The network card obtains a first write operation command from a host, where the first write operation command is used to write data to be written into a storage pool; wherein, the network card communicates with the host, a second computing device, and the storage pool respectively; The network card sends the first write operation command to the second computing device; The network card receives a second write operation command sent by the second computing device, where the second write operation command is used to instruct the network card to perform a data processing operation on the data to be written; The network card reads the data to be written from the memory of the host according to the second write operation command, processes the data to be written to obtain processed data, and sends a second write operation response to the second computing device to indicate that the data processing operation has been completed; The network card receives a third write operation command sent by the second computing device, where the third write operation command is used to instruct the network card to write the processed data to be written into the storage pool; Based on the third write operation command, the network card reads the processed data to be written and writes the processed data into the storage pool.
2. The method according to claim 1, wherein The processing of the data to be written includes: Performing one or more of erasure code protection, data consistency protection, encryption, or decryption on the data to be written.
3. The method according to claim 1 or 2, characterized in that, The processed data includes check data of the data to be written, and the network card writing the processed data into the storage pool includes: The network card stores the check data into the storage pool.
4. The method according to claim 3, wherein The method further includes: The network card stores the check data into the memory of the network card.
5. The method according to claim 3, characterized in that, The processed data further includes: the data to be written. Before processing the data to be written according to the write operation command, the method further includes: storing the data to be written into the memory of the network card.
6. The method according to claim 5, wherein The network card writing the processed data into the storage pool includes: The network card stores the data to be written from the memory of the network card into the storage pool.
7. The method according to claim 1 or 2, characterized in that, The processed data includes the data to be written and data consistency protection data, or the processed data includes the data obtained by encrypting the data to be written.
8. A data access method, characterized in that, The method is applied to a network card, and the method includes: The network card obtains a first read operation command from a host, where the first read operation command is used to read data from a storage pool; wherein, the network card communicates with the host, a second computing device, and the storage pool respectively; The network card sends the first read operation command to the second computing device; The network card receives a second read operation command sent by the second computing device, where the second read operation command is used to instruct the network card to read the read data requested by the first read operation command from the storage pool and perform a data processing operation on the read data; Under the instruction of the second read operation command, the network card sends the second read operation command to the storage pool and receives the read data requested by the second read operation command sent by the storage pool; Under the instruction of the second read operation command, the network card processes the read data to obtain processed data; The network card sends the processed data to the host.
9. The method according to claim 8, wherein The processing the read data to obtain processed data includes: The network card decrypts the read data.
10. A data access device, characterized in that, The device communicates with the host, the second computing device, and the storage pool respectively. The device includes: An acquisition module, configured to acquire a first write operation command from the host, where the first write operation command is used to write data to be written into the storage pool; A sending module, configured to send the first write operation command to the second computing device; A receiving module, configured to receive a second write operation command sent by the second computing device, where the second write operation command is used to instruct the device to perform a data processing operation on the data to be written; A processing module, configured to read the data to be written from the memory of the host according to the second write operation command, and process the data to be written to obtain processed data; The sending module is further configured to send a second write operation response to the second computing device to indicate that the data processing operation has been completed; The receiving module is further configured to receive a third write operation command sent by the second computing device, where the third write operation command is used to instruct the device to write the processed data to be written into the storage pool; A writing module, configured to read the processed data to be written based on the third write operation command, and write the processed data into the storage pool.
11. The device according to claim 10, wherein The processing module is configured to: Perform one or more of erasure code protection, data consistency protection, encryption, or decryption on the data to be written.
12. The device according to claim 10 or 11, characterized in that, The processed data includes check data of the data to be written, and the sending module is further configured to: Store the check data in the storage pool.
13. The device according to claim 12, characterized in that, The sending module is further configured to: Store the check data in the memory of the network card.
14. The device according to claim 12, wherein The processed data further includes: the data to be written. Before processing the data to be written according to the write operation command, the sending module is further configured to: Store the data to be written in the memory of the network card.
15. The device according to claim 14, characterized in that, The sending module is further configured to: Store the data to be written from the memory of the network card to the storage pool.
16. The device according to claim 10 or 11, characterized in that, The processed data includes the data to be written and data consistency protection data, or the processed data includes the data to be written after encryption.
17. A data access device, characterized in that, The device is respectively connected to the host, the second computing device, and the storage pool. The device includes: An acquisition module, configured to acquire a first read operation command from the host, where the first read operation command is used to read data from the storage pool; A sending module, configured to send the first read operation command to the second computing device; A receiving module, configured to receive a second read operation command sent by the second computing device, where the second read operation command is used to instruct the device to read the read data requested by the first read operation command from the storage pool, and perform a data processing operation on the read data; A processing module, configured to, under the indication of the second read operation command, send the second read operation command to a storage pool, receive the read data requested by the second read operation command sent by the storage pool, and process the read data under the indication of the second read operation command to obtain processed data; The sending module is further configured to send the processed data to the host.
18. The device according to claim 17, characterized in that, The processing module is configured to: Perform decryption processing on the read data.
19. A network card, characterized in that, The network card includes an interface and a processor. The interface communicates with the processor, and the processor is configured to execute the method according to any one of claims 1-7 or 8-9.
Citation Information
Patent Citations
Network card and data sending / receiving method and device
CN110177083A
Method and apparatus for multiple-protocol access to object-based storage
US20100094847A1