IO access method and apparatus based on block storage, and electronic device and medium

By establishing an association between the front-end and back-end drivers on the block storage server and using the IO memory management unit to map the buffer address, the problem of low storage resource access efficiency under the hyper-converged architecture is solved, and high-performance data transmission and Resource saving, suitable for multiple block storage protocols.

WO2024217333A1PCT designated stage expired Publication Date: 2024-10-24ALIBABA CLOUD COMPUTING CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/087301
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-19
Filing Date
2024-04-11
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Under the hyper-converged architecture, the traditional storage resource access method has the problems of low data transmission efficiency and waste of computing resources. Especially when the storage resources and computing resources are located on the same physical server, the access efficiency based on TCP protocol is low, and the RDMA solution It relies on specific hardware bandwidth and cannot be applied on a large scale.

Method used

By running the block storage transfer protocol on the block storage server, an association is established between the front-end driver and the back-end driver, and the IO memory management unit is used to map the buffer address to a DMA address to realize data transfer between the front-end and the back-end. Transmission avoids data copying, reduces resource consumption, and does not rely on specific hardware or hardware bandwidth.

Benefits of technology

It achieves high-performance data transmission, reduces resource consumption, is suitable for various block storage transmission protocols, has universality, improves storage access efficiency, and reduces the waste of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087301_24102024_PF_FP_ABST
    Figure CN2024087301_24102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present description is an IO access method based on block storage. The method comprises: receiving an IO request which is issued by a user program using block storage and is in respect of a target logical block device mounted on a front-end driving program, and parsing the IO request to acquire an address of a buffer area; on the basis of a maintained association relationship between a logical block device mounted on the front-end driving program and a physical block device mounted on a back-end driving program, determining a target physical block device corresponding to the target logical block device, and by means of an IO memory management unit corresponding to the target physical block device, mapping the address of the buffer area to a DMA address; and transmitting the DMA address to the back-end driving program, so that the back-end driving program performs DMA access for the buffer area on the basis of the DMA address, so as to execute an IO processing operation corresponding to the IO request. By means of an address mapping mechanism, there is no need to perform data copying between front and back ends, thereby realizing high-performance transmission and reducing resource consumption; and the method is realized by means of software, and is not limited to hardware. Moreover, the method also has universality.
Need to check novelty before this filing date? Find Prior Art

Description

Block storage-based IO access method, device, electronic device, and medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 19, 2023, with application number 202310431766.4 and application name “A block storage-based IO access method, device, electronic device and medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] This specification relates to the field of storage technology, and in particular to an IO access method, device, electronic device, and medium based on block storage. Background Art

[0003] With the rapid development of the internet in recent years, the amount of data on the internet has shown an exponential growth trend. This places high demands on storage systems, requiring them to not only store massive amounts of data but also maintain high read and write speeds, throughput, and reliability. Currently, traditional storage devices are struggling to meet these demands, and their management is becoming increasingly complex, resulting in significant operational and maintenance costs.

[0004] The emergence of software-defined storage (SDS) technology addresses these needs. SDS separates storage hardware and software, decoupling storage software originally embedded in proprietary hardware and running it on standardized hardware (such as x86 servers). It also integrates resources through virtualization technology, reorganizing physical hardware into a unified logical resource pool, thereby building storage products and services through software.

[0005] There are two typical SDS architectures. One is the separation architecture, in which computing and storage resources reside on different servers or clusters. All computing access to storage resources is performed across the network. This architecture offers the advantage of physically independent computing and storage resources, making capacity expansion easy. This architecture is exemplified by the public cloud storage offered by major cloud computing companies. The other is the hyper-convergence architecture, in which computing and storage resources reside on the same physical server or cluster. Software manages these resources separately, enabling storage pooling and sharing. This architecture offers the advantages of lower costs and superior performance compared to the separation architecture. This architecture is exemplified by hyper-convergence products for private and hybrid clouds.

[0006] In a hyper-converged architecture, when the computing side accesses storage resources, there may be two situations: one is that the storage resources to be accessed are located on other servers, that is, cross-network access, and the other is that the storage resources to be accessed are located on the local server. Optimizing the latter can greatly improve storage performance and is a key focus.

[0007] Summary of the Invention

[0008] In view of this, one or more embodiments of this specification provide a block storage-based IO access method, device, electronic device, and medium to solve the problems existing in the related art.

[0009] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0010] According to a first aspect of an embodiment of this specification, a block storage-based IO access method is provided, which is applied to a block storage service client; wherein a block storage transmission protocol runs on the block storage service client; the block storage transmission protocol includes a front-end driver and a back-end driver; the method includes:

[0011] The front-end driver receives an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parses the IO request to obtain an address of a buffer; wherein the IO request includes the address of the buffer allocated to the user program;

[0012] The front-end driver determines a target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and maps the address of the buffer zone to a DMA address corresponding to the buffer zone through an IO memory management unit corresponding to the target physical block device;

[0013] The front-end driver transmits the DMA address to the back-end driver, and the back-end driver performs DMA access on the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0014] According to a second aspect of an embodiment of this specification, a block storage-based IO access system is provided, which is applied to a block storage service client; wherein a block storage transmission protocol runs on the block storage service client; the block storage transmission protocol includes a front-end driver and a back-end driver; the system includes:

[0015] A user program is used to issue an IO request to a target logical block device mounted by the front-end driver;

[0016] The front-end driver is configured to receive an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage; and parse the IO request to obtain an address of a buffer; wherein the IO request includes the address of the buffer allocated to the user program;

[0017] The front-end driver includes:

[0018] The address mapping submodule of the front-end driver is used to determine the target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and map the address of the buffer zone to the DMA address corresponding to the buffer zone through the IO memory management unit corresponding to the target physical block device;

[0019] The command transmission submodule of the front-end driver transmits the DMA address to the back-end driver;

[0020] The backend driver is configured to perform DMA access on the buffer based on the DMA address to execute an IO processing operation corresponding to the IO request.

[0021] According to a second aspect of an embodiment of this specification, a block storage-based IO access device is provided, which is applied to a block storage service client; wherein a block storage transmission protocol runs on the block storage service client; the block storage transmission protocol includes a front-end driver and a back-end driver; the device includes:

[0022] A front-end driver module receives an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parses the IO request to obtain an address of a buffer; wherein the IO request includes the address of the buffer allocated to the user program;

[0023] The address mapping submodule of the front-end driver determines a target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and maps the address of the buffer zone to a DMA address corresponding to the buffer zone through an IO memory management unit corresponding to the target physical block device;

[0024] The command transmission submodule of the front-end driver transmits the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0025] According to a fourth aspect of the embodiments of this specification, there is provided an electronic device, comprising a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus;

[0026] The memory stores machine-readable instructions, and the processor executes the above method by calling the machine-readable instructions.

[0027] According to a fifth aspect of the embodiments of this specification, a machine-readable storage medium is provided, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the above method is implemented.

[0028] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0029] Through the above technical solution, the front-end driver determines the target physical block device corresponding to the target logical block device targeted by the IO request by maintaining the association relationship between the logical block device and the physical block device, and maps the address of the buffer to the DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device, so that the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request. In the above process, on the one hand, the address of the buffer is mapped to the DMA address through the address mapping mechanism, so that the data transmission path between the front-end and the back-end does not need to copy data, achieving high-performance data transmission and reducing resource consumption; on the other hand, since this solution is implemented in software, it does not rely on specific hardware and is not limited by hardware bandwidth limitations. At the same time, this solution is also applicable to various block storage transmission protocols and is universal. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a hyper-converged architecture provided by an exemplary embodiment of this specification;

[0031] FIG2 is a schematic diagram of data transmission based on NVME over TCP technology provided by an exemplary embodiment of this specification;

[0032] FIG3 is a schematic diagram of data transmission based on NVME over RDMA technology provided by an exemplary embodiment of this specification;

[0033] FIG4 is a schematic diagram of an IO access method based on block storage provided by an exemplary embodiment of this specification;

[0034] FIG5 is a flowchart of an IO access method based on block storage provided by an exemplary embodiment of this specification;

[0035] FIG6 is a schematic diagram of an initialization process of an IO access system based on block storage provided by an exemplary embodiment of this specification;

[0036] FIG7 is a schematic diagram of an IO access system based on block storage provided by an exemplary embodiment of this specification;

[0037] FIG8 is a schematic structural diagram of an electronic device in which a block storage-based IO access device is located, provided by an exemplary embodiment of this specification;

[0038] FIG9 is a block diagram of an IO access device based on block storage provided by an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0039] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.

[0040] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0041] Hyper-Converged Infrastructure (HCI), also known as hyper-converged infrastructure, refers to the integration of computing, networking, storage, server virtualization and other resources and technologies in the same set of x86 unit devices, as well as cache acceleration, storage tiering, data deduplication, online data compression, snapshot technology and other elements. In addition, multiple nodes can be aggregated through the network to achieve modular seamless horizontal expansion and form a unified resource pool.

[0042] Hyperconverged architecture integrates the computing resource layer, storage network layer, and storage resource layer into a single layer at the hardware level, enhancing the flexibility and reducing the complexity of data center infrastructure. At the software level, it also utilizes software-defined technologies such as virtualization and distributed storage to achieve distributed resource scheduling.

[0043] The essence of hyperconverged infrastructure is to include computing and storage resources at the hardware layer and implement resource pooling through software-defined methods at the software layer, providing decentralized and elastic infrastructure support for upper-layer applications.

[0044] Taking Figure 1 as an example, Figure 1 shows a hyper-converged architecture provided by an exemplary embodiment of this specification. As shown in Figure 1, for computing resources (such as processors and memory) and storage resources (such as mechanical hard drives and solid-state drives) in x86 servers, in order to achieve cluster management and distributed access, storage resources can be pooled and distributedly managed using software-defined storage technology.

[0045] In related technologies, access to storage resources in a hyper-converged architecture is usually performed through a unified network protocol. Even if the storage resources and computing resources are on the same physical server, access to the storage resources still needs to be performed through the network protocol.

[0046] The following takes the Non-Volatile Memory Express (NVME) protocol as an example, and describes the block storage access solution under the hyper-converged architecture in the related art in combination with Figures 2 and 3.

[0047] Please refer to Figure 2, which is a schematic diagram of data transmission based on NVME over TCP technology provided by an exemplary embodiment of this specification. TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. NVME over TCP is a TCP-based NVME remote access protocol defined by the NVME Standardization Organization. It can enable the Non-Volatile Memory Express over Fabrics (NVME-oF) protocol to be deployed and used in a TCP network environment, thereby enabling NVME-oF to be used in ordinary network environments, expanding the application scope of NVME-oF.

[0048] As shown in Figure 2, in the Linux system, the TCP protocol is implemented in the Linux kernel state. When the user program needs to transmit data, it can first copy the user-state data to the kernel-state TCP socket buffer, and then copy the data in the TCP socket buffer to the buffer corresponding to the back-end driver. The data is then transferred to the storage device through Direct Memory Access (DMA).

[0049] However, due to the inherent complexity of the TCP protocol, data transmission requires switching between user and kernel contexts, resulting in significant latency in the transmission of storage commands. Furthermore, as shown in Figure 2, data is copied twice during TCP transmission, and data copying consumes computing resources. Therefore, large amounts of data are significantly depleted in computing resources.

[0050] It can be seen that when storage resources and computing resources are located on the same physical server, the above-mentioned NVME over TCP solution still needs to be accessed through the TCP protocol, resulting in low access efficiency, large performance loss and waste of computing resources.

[0051] Please refer to Figure 3, which is a schematic diagram of data transmission based on NVME over RDMA technology, provided by an exemplary embodiment of this specification. RDMA (Remote Direct Memory Access) is a high-performance data transmission method that relies on network card hardware. NVME over RDMA is an RDMA-based NVME remote access protocol defined by the NVME Standardization Organization. This allows the aforementioned NVME-oF to achieve extremely low transmission latency and extremely high performance in an RDMA-supported network environment, bringing the performance of NVME over RDMA close to that of local NVME.

[0052] As shown in Figure 3, the RDMA transmission protocol requires special hardware support, such as an RDMA network card. Through the PCIe (Peripheral Component Interconnect Express) interface of the RDMA network card, memory can be directly read and written. User-state data is copied to the RDMA network card through RDMA reads, and then copied to the buffer corresponding to the backend driver through RDMA writes. The data is then transferred to the storage device through Direct Memory Access (DMA).

[0053] Although RDMA can avoid the kernel-mode and user-mode data copying required by TCP, hardware limitations prevent the widespread use of RDMA network cards. Furthermore, RDMA transmission consumes hardware bandwidth resources, and its bandwidth limit cannot exceed the hardware's bandwidth limit.

[0054] It can be seen that when storage resources and computing resources are located on the same physical server, the above-mentioned NVME over RDMA solution consumes hardware bandwidth resources, which will affect normal network transmission and easily reach the hardware transmission bottleneck.

[0055] In view of this, this specification provides a technical solution applicable to a block storage transfer protocol, which maps the address of a buffer zone to a DMA address through an IO memory management unit to achieve storage access under a hyper-converged architecture.

[0056] During implementation, the method can be applied to a block storage service client, on which a block storage transmission protocol is running. The block storage transmission protocol includes a front-end driver and a back-end driver.

[0057] For example, Figure 4 is a schematic diagram of a block storage-based IO access method provided by an exemplary embodiment of this specification. As shown in Figure 4, the block storage transmission protocol running on the server defines a front-end driver and a back-end driver. The front-end driver and the back-end driver interact to implement data transmission in a hyper-converged architecture.

[0058] The front-end driver can receive an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parse the IO request to obtain an address of a buffer; wherein the IO request includes the address of the buffer allocated to the user program;

[0059] For example, in Figure 4, a user program using block storage can issue an IO request to a target logical block device mounted by the front-end driver. Furthermore, the front-end driver, in response to the received IO request, can parse the IO request and obtain the address of the buffer allocated for the user program, which is included in the IO request.

[0060] The front-end driver can determine the target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and map the address of the buffer zone to the DMA address corresponding to the buffer zone through the IO memory management unit corresponding to the target physical block device.

[0061] For example, in Figure 4, the front-end driver can maintain an association between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver. The front-end driver can use this association to determine the target physical block device corresponding to the target logical block device. Furthermore, the front-end driver can use the IO memory management unit corresponding to the target physical block device to map the buffer address to the DMA address corresponding to the buffer.

[0062] The front-end driver may transmit the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0063] For example, in Figure 4, the front-end driver can transmit the DMA address to the back-end driver. Further, the back-end driver can perform DMA access to the buffer based on the DMA address to perform the IO processing operation corresponding to the IO request.

[0064] Through the above technical solution, the front-end driver determines the target physical block device corresponding to the target logical block device targeted by the IO request by maintaining the association relationship between the logical block device and the physical block device, and maps the address of the buffer to the DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device, so that the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0065] As shown in FIG4 , compared with the solution in FIG2 , this solution does not require multiple copies of user state and kernel state, nor does it require TCP-based access. Compared with the solution in FIG3 , this solution does not rely on specific hardware and is not limited by hardware bandwidth.

[0066] Therefore, in the above process, on the one hand, the address mapping mechanism maps the buffer address to the DMA address, eliminating the need for data copying in the data transmission path between the front-end and back-end, achieving high-performance data transmission and reducing resource consumption. On the other hand, because this solution is implemented in software, it does not rely on specific hardware and is not limited by hardware bandwidth. At the same time, this solution is also applicable to various block storage transmission protocols and has universality.

[0067] The block storage-based IO access method of this specification is described in detail below with reference to the accompanying drawings.

[0068] Please refer to Figure 5, which is a flowchart of a block storage-based IO access method provided in an exemplary embodiment of this specification. The method is applied to a block storage service client; wherein the block storage service client runs a block storage transport protocol; the block storage transport protocol includes a front-end driver and a back-end driver. As shown in Figure 5, the method includes the following execution steps:

[0069] Step 501: The front-end driver receives an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parses the IO request to obtain an address of a buffer; wherein the IO request includes the address of the buffer allocated for the user program;

[0070] Step 502: The front-end driver determines a target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and maps the address of the buffer to a DMA address corresponding to the buffer through an IO memory management unit corresponding to the target physical block device.

[0071] In step 503 , the front-end driver transmits the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0072] The block storage service is a block device provided by the block storage service client. It can include logical block devices based on distributed architecture storage and physical block devices based on local hard disks of physical machines. The physical block devices can be mechanical hard disks or solid-state drives. The block storage service client can be one or more servers, or a cluster of multiple servers. This application does not limit this.

[0073] For example, the block storage service client can be a cloud server, which presents a cloud disk for users by mounting a logical block device on the front-end driver, while the data is stored on the local solid-state drive device corresponding to the cloud disk, that is, the physical block device mounted on the back-end driver.

[0074] When performing IO access to the above-mentioned block storage, it is necessary to access it based on a block storage transmission protocol. For example, the block storage transmission protocol can be the Non-Volatile Memory Express over Fabrics (NVME-oF) protocol, or it can be a protocol based on the Internet Small Computer System Interface (iSCSI), or it can be other industry-standard block storage remote transmission protocols, which are not limited in this application.

[0075] The block storage transfer protocol can define the interactive commands, steps, and message formats during transmission. The main components involved include at least a front-end driver and a back-end driver. For ease of explanation, the front-end driver can be referred to as the front-end, and the back-end driver can be referred to as the back-end. These details will not be repeated in the following text.

[0076] In one embodiment shown, the block storage service server is a block storage service server that adopts a hyper-converged architecture.

[0077] For example, the block storage service client may be a block storage service client that adopts a hyper-converged architecture, in which computing resources and storage resources are located on the same physical server or the same cluster, and computing resources and storage resources are managed separately through software to achieve storage pooling and sharing.

[0078] In one embodiment shown, a control information interaction path between the front-end driver and the back-end driver may be created based on a preset transmission mode in response to an initialization instruction;

[0079] The back-end driver creates a logical object corresponding to the physical block device;

[0080] The front-end driver obtains the device information of the logical object of the back-end driver through the control information interaction path, and mounts the logical block device corresponding to the logical object based on the device information; and creates and maintains an association between the logical block device and the physical block device of the back-end driver; wherein the device information includes at least the correspondence between the logical object and the physical block device, and the PCIe ID of the physical block device.

[0081] The above transmission method can be through establishing a Socket connection, through a pipeline, or through a shared memory. Those skilled in the art can choose according to their needs, and this application does not limit this.

[0082] Taking Socket connection as an example, the back-end driver can create a Socket socket, and the front-end driver can connect to the created Socket socket, thereby establishing a Socket connection and building a slow path interaction between the front-end and back-end, that is, the control path interaction, which mainly undertakes the interaction of control information.

[0083] It is worth noting that the slow path mentioned above refers to an execution path with low frequency that does not affect normal read and write IO performance. Through this slow path, the initialization interaction process and the exchange of control information are realized without affecting the subsequent normal IO read and write speed.

[0084] Please refer to Figure 6, which is a schematic diagram of the initialization process of a block storage-based IO access system provided in an exemplary embodiment of this specification. As shown in Figure 6, the storage transmission protocol can define a control module and a command transmission module, including a front-end control submodule 602 and a front-end command transmission submodule 603 in a front-end driver 601, and a back-end control submodule 605 and a back-end command transmission submodule 606 in a back-end driver 604. A back-end device simulation submodule 607 in the back-end driver can also be defined. The initialization process includes the following steps:

[0085] S601, the backend control submodule 605 creates a Socket 608 in response to an initialization instruction.

[0086] For example, the backend driver 604 can be loaded in response to the initialization instruction, initialize the transmission protocol of the present invention, create a socket 608 based on the backend control submodule 605, and monitor the port corresponding to the socket 608 to receive control information from the frontend driver.

[0087] S602, the front-end control submodule 602 connects to the Socket 608 and creates a control information interaction path.

[0088] For example, the front-end driver 601 can be loaded in response to the initialization instruction, initialize the transmission protocol of the present invention, connect to the port corresponding to the above-mentioned Socket socket 608 based on the front-end control sub-module 602, establish a Socket connection with the back-end driver 604, create a control information interaction path, and write control information to the Socket socket 608 through the path.

[0089] The control information may include but is not limited to interactive commands such as obtaining device information or protocol version information.

[0090] S603, the backend device simulation submodule 607 creates a logical object.

[0091] For example, in response to the above initialization instruction, the backend device simulation submodule 607 can simulate the physical block device mounted on the backend, create a logical object, and establish a binding relationship between the logical object and its corresponding physical block device on the backend.

[0092] It should be noted that this logical object corresponds to the logical block device that the front-end driver 601 needs to mount. In the related art, although the front-end can mount the logical block device corresponding to the physical block device of the back-end, the front-end does not maintain the device information of the physical block device, and therefore does not maintain the association between the logical block device and the physical block device. In the present application, the back-end device simulation submodule 607 can provide the front-end with complete information about the logical block device and device information about the physical block device associated with the logical block device.

[0093] S604, the front-end control submodule 602 obtains device information through the Socket connection.

[0094] For example, the front-end control sub-module 602 can obtain the association between the logical object maintained by the back-end device simulation sub-module 607 and its corresponding physical block device by writing an interactive command for obtaining device information into the Socket socket 608, thereby obtaining the device information of the physical block device corresponding to the logical object, such as PCIe ID, register space information, memory mapping information and number of queues.

[0095] The device information may include at least the correspondence between the logical object and the physical block device, and the PCIe ID of the physical block device. Furthermore, the device information may include a PCIe bus description (PCIe BUS), a device description mounted on the PCIe bus (PCIe Device), and a device description within the device mounted on the PCIe bus (PCIe Function).

[0096] S605 , the front-end control submodule 602 mounts the logical block device corresponding to the logical object based on the above device information.

[0097] For example, the front-end control submodule 602 may complete the mounting of the logical block device corresponding to the logical object in a one-to-one manner according to the acquired device information of the logical object.

[0098] S606: The front-end control submodule 602 creates and maintains an association relationship between the logical block device and the physical block device of the back-end driver.

[0099] For example, the front-end control submodule 602 may create and maintain an association relationship between the logical block device and the physical block device according to the acquired correspondence relationship between the logical object and the physical block device.

[0100] In one embodiment shown, the front-end driver may create a shared memory, establish a mapping between the back-end driver and the shared memory, and create a queue transmission channel in the shared memory.

[0101] Continuing with FIG6 as an example, the above initialization process further includes the following steps:

[0102] S607 , the front-end command transmission submodule 603 creates a shared memory 609 and establishes a mapping between the back-end driver 604 and the shared memory 609 .

[0103] For example, the front-end command transmission submodule 603 can open up and create a shared memory 609, and inform the back-end driver 604 through the above-mentioned Socket connection, thereby establishing a mapping between the back-end driver 604 and the shared memory 609, so that the front-end and the back-end can share the same shared memory 609 to transmit subsequent commands in the shared memory 609.

[0104] S608 , the front-end command transmission submodule 603 creates a queue transmission channel in the shared memory 609 .

[0105] For example, the front-end command transmission submodule 603 may create a command transmission queue on the shared memory 609 according to queue attribute requirements, such as the starting address of the queue and the length of the queue.

[0106] Through the above steps, the initialization interaction between the front-end driver and the back-end driver can be completed. Since block storage generates read and write commands during IO access, the read and write commands contain the address, offset, size information, etc. of the read and write data, as well as the memory address information of the user program receiving or sending data. Generally, read and write commands are only a few dozen bytes. These commands need to be transmitted from the front end to the back end, but under the traditional TCP protocol, these commands need to be encapsulated into TCP packets and sent to the back end. In this application, the transmission of read and write commands is achieved through shared memory, without the need for complex protocol encapsulation and command copying, and without the need to switch between kernel mode and user mode, which improves command transmission efficiency and reduces latency.

[0107] After the above initialization steps are completed, the IO access process will be described next.

[0108] In this embodiment, the front-end driver can receive an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parse the IO request to obtain the address of the buffer; wherein the IO request includes the address of the buffer allocated to the user program.

[0109] The above-mentioned user program refers to the user program that uses block storage. It generally runs in the user state of the system and issues read and write IO access requests through standard system calls. When issuing IO requests, it will request the allocation of a buffer address for reading and writing data on the back-end physical block device.

[0110] For example, a user program using block storage can issue an IO request for the target logical block device mounted by the front-end driver. After receiving the IO request, the front-end driver can parse the IO request and obtain the address of the buffer allocated for the user program included in the IO request.

[0111] Please refer to Figure 7, which is a schematic diagram of an IO access system based on block storage provided in an exemplary embodiment of this specification. As shown in Figure 7, the system includes a user program 701, a front-end driver 702, a back-end driver 703, a physical block device 704, an IO memory management unit 705, and shared memory 706. In Figure 7, the IO access process includes the following steps:

[0112] S701 , the user program 701 issues an IO request for the target logical block device mounted by the front-end driver 702 .

[0113] S702, the front-end driver 702 parses the received IO request and obtains the address of the buffer.

[0114] The IO request may include the size of the buffer, the address of the offset buffer, and the logical block device object that the user needs to access.

[0115] In this embodiment, the front-end driver can determine the target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and map the address of the buffer to the DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device.

[0116] Continuing with FIG. 7 as an example, the block storage transmission protocol in this application may define a front-end address mapping submodule 707 and a front-end command transmission submodule 708 in the front-end driver 702, and a back-end command transmission submodule 709 in the back-end driver 703. For a description of how the front-end command transmission submodule 708 and the back-end command transmission submodule 709 establish shared memory 706, please refer to the relevant description in FIG. 6 above, and will not be repeated here.

[0117] S703, the front-end address mapping submodule 707 determines a target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver.

[0118] For example, the front-end address mapping submodule 707 can query the target physical block device corresponding to the target logical block device targeted by the IO request based on the association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver created and maintained during the initialization process.

[0119] In one embodiment shown, it is possible to determine whether the target physical block device corresponding to the target logical block device is a local physical block device of the block storage service client; if so, the address of the buffer is mapped to the DMA address corresponding to the buffer by the IO memory management unit corresponding to the target physical block device.

[0120] For example, the front-end address mapping submodule 707 can determine whether the target physical block device corresponding to the target logical block device is a physical block device local to the block storage service client; if so, it means that the storage resource to be accessed is stored on the local server. As can be seen from the description of Figures 2 and 3 above, in the traditional way, when storage resources and computing resources are on the same physical server, access to storage resources still needs to be accessed through the network protocol. However, in this application, there is no need for cross-network access. By continuing to execute subsequent steps, the DMA address corresponding to the buffer zone is determined, and the DMA address is sent to the back-end driver, so that the data transmission path between the front-end and the back-end does not require data copying, thereby achieving high-performance data transmission.

[0121] S704 , the front-end address mapping submodule 707 maps the address of the buffer zone to a DMA address corresponding to the buffer zone through the IO memory management unit 705 corresponding to the target physical block device.

[0122] The I / O Memory Management Unit (IOMMU) is used to control DMA access of IO devices to the physical memory area of ​​the machine while ensuring security.

[0123] In one embodiment shown, step S704 may include the following process:

[0124] Parsing the address of the buffer to determine the physical address corresponding to the address of the buffer;

[0125] Determining a memory management page table corresponding to the target physical block device by an IO memory management unit corresponding to the target physical block device;

[0126] The mapping interface of the IO memory management unit is called, the physical address corresponding to the buffer is registered in the memory management page table, and a mapping relationship between the physical address corresponding to the buffer and the DMA address is established, and the address of the buffer is mapped to the DMA address corresponding to the buffer.

[0127] For example, the front-end address mapping submodule 707 can parse the address of the buffer in the IO request and convert the virtual address of the buffer into the corresponding physical address; then, based on the target physical block device corresponding to the target logical block device targeted by the IO request, the memory management page table corresponding to the target physical block device can be determined through the IO memory management unit 705 corresponding to the target physical block device; thereafter, the mapping interface of the IO memory management unit can be called to register the physical address corresponding to the buffer in the memory management page table, and map the address of the buffer to the DMA address corresponding to the buffer, which is the address that requires DMA operation.

[0128] The above-mentioned IO memory management unit can realize address translation during DMA reading and writing between external devices and host memory, translate the physical address of the buffer into the DMA address, and can also query the memory management page table according to the DMA address, translate the DMA address into the physical address of the buffer to realize address conversion.

[0129] It should be noted that kernel state and user state are two operating levels of an operating system. When executing in user state, the memory space and objects that a process can access are limited, and the processor it occupies can be preempted. However, when executing in kernel state, it can access all memory spaces and objects, and the occupied processor cannot be preempted. Therefore, the front-end address mapping submodule 707 is deployed in the front-end rather than the back-end, avoiding the problem that user state needs to frequently access kernel state when performing address mapping, which would lead to severe performance degradation.

[0130] In this embodiment, the front-end driver may transmit the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0131] For example, after the front-end address mapping submodule 707 maps the address of the buffer to a DMA address corresponding to the buffer, the front-end command transmission submodule 708 may transmit the DMA address to the back-end driver 703. The back-end driver 703 may then perform DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0132] In one embodiment shown, the front-end driver can generate an IO command corresponding to the IO request, encapsulate the IO command and the DMA address into a first storage command for the target logical block device; and write the first storage command into a command transfer queue created in advance in the shared memory, and update the doorbell register of the command transfer queue.

[0133] S705 , the front-end command transmission submodule 708 generates an IO command corresponding to the IO request, and encapsulates the IO command and the DMA address into a first storage command for the target logical block device.

[0134] For example, the front-end command transmission submodule 708 can generate IO commands corresponding to different storage protocols based on the IO request, according to different storage protocols. For example, the IO command can be a standard NVME command; and the generated IO command and DMA address are encapsulated to obtain the first storage command for the target logical block device corresponding to the IO request.

[0135] S706 , the front-end command transmission submodule 708 writes the first storage command into a command transmission queue pre-created in the shared memory, and updates the doorbell register of the command transmission queue.

[0136] For example, the front-end command transmission sub-module 708 can write the encapsulated first storage command into the command transmission queue in the shared memory created during the initialization phase, transmit it through the queue transmission channel created during initialization, and update the doorbell register of the command transmission queue so that the back-end driver can perceive that there are commands to be processed in the command transmission queue.

[0137] In one embodiment shown, the backend driver parses the first storage command in the command transmission queue in the shared memory in response to the update of the doorbell register, and determines the IO command and the DMA address;

[0138] encapsulating the IO command and the DMA address into a second storage command for the target physical block device according to the target physical block device corresponding to the target logical block device;

[0139] The second storage command is sent to the target physical block device, so that the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address.

[0140] S707, the back-end command transmission submodule 709, in response to the update of the doorbell register, parses the first storage command in the command transmission queue in the shared memory, determines the IO command and the DMA address; and, based on the target physical block device corresponding to the target logical block device, encapsulates the IO command and the DMA address into a second storage command for the target physical block device.

[0141] For example, the backend command transmission submodule 709 can, in response to detecting an update to the doorbell register, sense a new command issued by the frontend driver, parse the first storage command in the command transmission queue of the shared memory, and determine the IO command and DMA address encapsulated in the first storage command. However, since the first storage command is for the target logical block device, in order for the target physical block device to execute the second storage command, it is necessary to encapsulate the IO command and DMA address into a second storage command for the target physical block device based on the target physical block device corresponding to the target logical block device.

[0142] It is worth noting that, unlike the control submodules that are responsible for establishing the slow path, the above-mentioned command transmission submodules play the role of the fast path. Through the shared memory mechanism, the front-end and back-end do not need to make multiple copies during the interaction process like TCP and other protocol commands. They can directly see the same data through the shared memory, realizing zero copy of read and write IO commands.

[0143] S708, the backend command transmission submodule 709 sends the second storage command to the target physical block device, so that the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address.

[0144] For example, the backend command transmission submodule 709 may send the second storage command to the target physical block device, so that the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address.

[0145] In one embodiment shown, the target physical block device sends a DMA message to the IO memory management unit;

[0146] The IO memory management unit determines whether the DMA address exists in the memory management page table according to the DMA address in the DMA message;

[0147] If so, the physical address corresponding to the buffer is determined according to the memory management page table, and an IO processing operation corresponding to the IO request is performed on the data at the physical address corresponding to the buffer in a DMA manner.

[0148] S709 , the target physical block device may send a DMA message to the IO memory management unit 705 .

[0149] For example, after receiving the NVME command, the target physical hard disk can initiate DMA data movement and send a DMA message to the IO memory management unit.

[0150] S710, the IO memory management unit 705 determines whether the DMA address exists in the memory management page table based on the DMA address in the DMA message; if so, determines the physical address corresponding to the buffer according to the memory management page table, and performs the IO processing operation corresponding to the IO request on the data of the physical address corresponding to the buffer through DMA.

[0151] For example, the DMA message can be received by the IO memory management unit. The IO memory management unit can determine whether the DMA address in the DMA message exists in the memory management page table based on the DMA address. If so, the DMA address is translated into the physical address corresponding to the buffer according to the memory management page table, and the IO processing operation corresponding to the IO request is performed on the data at the physical address corresponding to the buffer via DMA. If not, the DMA message can be discarded based on the interrupt function of the IO memory management unit, and the IO access can be denied.

[0152] S711 , the target physical block device notifies the backend driver 703 that the execution of the second storage command is complete.

[0153] In one embodiment shown, the back-end driver notifies the front-end driver of the completion of the IO request processing through the shared memory in response to the target physical block device completing the IO processing operation.

[0154] S712 , the backend command transmission submodule 709 may notify the frontend command transmission submodule 708 of the completion of the IO request processing via the shared memory 706 in response to the target physical block device completing the IO processing operation.

[0155] Through the above technical solution, the front-end driver determines the target physical block device corresponding to the target logical block device targeted by the IO request by maintaining the association relationship between the logical block device and the physical block device, and maps the address of the buffer to the DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device, so that the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request. In the above process, on the one hand, the address of the buffer is mapped to the DMA address through the address mapping mechanism, so that the data transmission path between the front-end and the back-end does not need to copy data, achieving high-performance data transmission and reducing resource consumption; on the other hand, since this solution is implemented in software, it does not rely on specific hardware and is not limited by hardware bandwidth limitations. At the same time, this solution is also applicable to various block storage transmission protocols and is universal.

[0156] In an exemplary embodiment of this specification, a device capable of implementing the above method is also provided.

[0157] FIG8 is a schematic structural diagram of a device provided by an exemplary embodiment. Referring to FIG8 , at the hardware level, the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810, and may also include other necessary hardware. One or more embodiments of this specification may be implemented based on software, such as the processor 802 reading the corresponding computer program from the non-volatile memory 810 into the memory 808 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices.

[0158] Referring to FIG9 , in one software implementation, a block storage-based IO access device 900 is provided, which is applied to a block storage service client. A block storage transport protocol runs on the block storage service client. The block storage transport protocol includes a front-end driver and a back-end driver. As shown in FIG9 , the device 900 includes:

[0159] The front-end driver module 901 receives an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parses the IO request to obtain an address of a buffer; wherein the IO request includes the address of the buffer allocated for the user program;

[0160] The address mapping submodule 902 of the front-end driver determines a target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and maps the address of the buffer to a DMA address corresponding to the buffer through an IO memory management unit corresponding to the target physical block device;

[0161] The command transmission submodule 903 of the front-end driver transmits the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

[0162] Optionally, the apparatus 900 further includes:

[0163] A determination module 904 (not shown) determines whether the target physical block device corresponding to the target logical block device is a local physical block device of the block storage service client; if so, maps the address of the buffer to a DMA address corresponding to the buffer through an IO memory management unit corresponding to the target physical block device.

[0164] Optionally, the apparatus 900 further includes:

[0165] Initialization module 905 (not shown in the figure), in response to the initialization instruction, creates a control information interaction path between the front-end driver and the back-end driver based on a preset transmission mode;

[0166] The device simulation submodule 906 (not shown in the figure) of the back-end driver, the back-end driver creates a logical object corresponding to the physical block device;

[0167] The control submodule 907 of the back-end driver (not shown in the figure), the front-end driver obtains the device information of the logical object of the back-end driver through the control information interaction path, and mounts the logical block device corresponding to the logical object based on the device information; and creates and maintains the association relationship between the logical block device and the physical block device of the back-end driver; wherein the device information includes at least the correspondence between the logical object and the physical block device, and the PCIe ID of the physical block device.

[0168] Optionally, the apparatus 900 further includes:

[0169] Shared memory module 908 (not shown in the figure), the front-end driver creates a shared memory, establishes a mapping between the back-end driver and the shared memory, and creates a queue transmission channel in the shared memory.

[0170] Optionally, the address mapping submodule 902 further:

[0171] Parsing the address of the buffer to determine the physical address corresponding to the address of the buffer;

[0172] Determining a memory management page table corresponding to the target physical block device by an IO memory management unit corresponding to the target physical block device;

[0173] The mapping interface of the IO memory management unit is called, the physical address corresponding to the buffer is registered in the memory management page table, and a mapping relationship between the physical address corresponding to the buffer and the DMA address is established, and the address of the buffer is mapped to the DMA address corresponding to the buffer.

[0174] Optionally, the command transmission submodule 903 further:

[0175] The front-end driver generates an IO command corresponding to the IO request, and encapsulates the IO command and the DMA address into a first storage command for the target logical block device;

[0176] The first storage command is written into a command transmission queue created in advance in the shared memory, and a doorbell register of the command transmission queue is updated.

[0177] Optionally, the backend driver performs DMA access on the buffer based on the DMA address to perform an IO processing operation corresponding to the IO request, including:

[0178] The backend driver parses the first storage command in the command transmission queue in the shared memory in response to the update of the doorbell register, and determines the IO command and the DMA address;

[0179] encapsulating the IO command and the DMA address into a second storage command for the target physical block device according to the target physical block device corresponding to the target logical block device;

[0180] The second storage command is sent to the target physical block device, so that the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address.

[0181] Optionally, the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address, including:

[0182] The target physical block device sends a DMA message to the IO memory management unit;

[0183] The IO memory management unit determines whether the DMA address exists in the memory management page table according to the DMA address in the DMA message;

[0184] If so, the physical address corresponding to the buffer is determined according to the memory management page table, and an IO processing operation corresponding to the IO request is performed on the data at the physical address corresponding to the buffer in a DMA manner.

[0185] Optionally, the apparatus 900 further includes:

[0186] Notification module 909 (not shown in the figure), in response to the target physical block device completing the IO processing operation, the backend driver notifies the front-end driver through the shared memory that the IO request processing is completed.

[0187] Optionally, the block storage service server is a block storage service server that adopts a hyper-converged architecture.

[0188] The implementation process of the functions and effects of each module in the above-mentioned device 900 is specifically detailed in the implementation process of the corresponding steps in the above-mentioned block storage-based IO access method. For relevant matters, please refer to the partial description of the method implementation method, which will not be repeated here.

[0189] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Those of ordinary skill in the art can understand and implement the present invention without inventive effort.

[0190] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0191] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0192] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0193] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0194] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0195] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0196] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0197] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0198] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."

[0199] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.

Claims

1. A block storage-based IO access method, applied to a block storage service client; wherein: The block storage service client runs a block storage transmission protocol; The block storage transmission protocol includes a front-end driver and a back-end driver; the method includes: The front-end driver receives an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parses the IO request to obtain an address of a buffer; wherein the IO request includes the address of a buffer allocated to the user program; The front-end driver determines the target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and maps the address of the buffer to the DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device; The front-end driver transmits the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute an IO processing operation corresponding to the IO request.

2. The method according to claim 1, before mapping the address of the buffer to the DMA address corresponding to the buffer, the method further comprises: Determine whether the target physical block device corresponding to the target logical block device is a local physical block device of the block storage service client; If yes, the address of the buffer is mapped to a DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device.

3. The method according to claim 1, further comprising: In response to the initialization instruction, based on a preset transmission mode, a control information interaction path between the front-end driver and the back-end driver is created; The back-end driver creates a logical object corresponding to the physical block device; The front-end driver obtains the device information of the logical object of the back-end driver through the control information interaction path, and mounts the logical block device corresponding to the logical object based on the device information; and creates and maintains the association relationship between the logical block device and the physical block device of the back-end driver; wherein the device information includes at least the correspondence between the logical object and the physical block device, and the PCIeID of the physical block device.

4. The method according to claim 3, further comprising: The front-end driver creates a shared memory, establishes a mapping between the back-end driver and the shared memory, and creates a queue transmission channel in the shared memory.

5. The method according to claim 1, mapping the address of the buffer to a DMA address corresponding to the buffer through an IO memory management unit corresponding to the target physical block device, comprises: Parsing the address of the buffer to determine the physical address corresponding to the address of the buffer; Determining a memory management page table corresponding to the target physical block device through an IO memory management unit corresponding to the target physical block device; Call the mapping interface of the IO memory management unit, and map the corresponding buffer to the memory management page table. The physical address is registered, and a mapping relationship between the physical address corresponding to the buffer and the DMA address is established, and the address of the buffer is mapped to the DMA address corresponding to the buffer.

6. The method according to claim 5, wherein the front-end driver transmits the DMA address to the back-end driver, comprising: The front-end driver generates an IO command corresponding to the IO request, and encapsulates the IO command and the DMA address into a first storage command for the target logical block device; The first storage command is written into a command transmission queue created in advance in the shared memory, and a doorbell register of the command transmission queue is updated.

7. The method according to claim 6, wherein the backend driver performs DMA access to the buffer based on the DMA address to perform an IO processing operation corresponding to the IO request, comprising: The backend driver parses the first storage command in the command transmission queue in the shared memory in response to the update of the doorbell register, and determines the IO command and the DMA address; According to a target physical block device corresponding to the target logical block device, encapsulating the IO command and the DMA address into a second storage command for the target physical block device; The second storage command is sent to the target physical block device, so that the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address.

8. The method according to claim 7, wherein the target physical block device performs an IO processing operation corresponding to the IO request on the data in the buffer according to the DMA address, comprising: The target physical block device sends a DMA message to the IO memory management unit; The IO memory management unit determines whether the DMA address exists in the memory management page table according to the DMA address in the DMA message; If it exists, the physical address corresponding to the buffer is determined according to the memory management page table, and the IO processing operation corresponding to the IO request is performed on the data of the physical address corresponding to the buffer in a DMA manner.

9. The method according to claim 8, further comprising: In response to the target physical block device completing the IO processing operation, the back-end driver notifies the front-end driver through the shared memory that the IO request processing is completed.

10. The method according to claim 1, wherein the block storage service client is a block storage service client using a hyper-converged architecture.

11. A block storage-based IO access system, applied to a block storage service client; wherein: The block storage service client runs a block storage transmission protocol; the block storage transmission protocol includes a front-end driver and a back-end driver; the system includes: A user program, used for issuing an IO request for a target logical block device mounted by the front-end driver; The front-end driver is used to receive an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage; and parse the IO request to obtain an address of a buffer; wherein the IO request includes the address of a buffer allocated to the user program; Wherein, the front-end driver includes: The address mapping submodule of the front-end driver is used to determine the target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and map the address of the buffer to the DMA address corresponding to the buffer through the IO memory management unit corresponding to the target physical block device; The command transmission submodule of the front-end driver transmits the DMA address to the back-end driver; The backend driver is used to perform DMA access to the buffer based on the DMA address to execute an IO processing operation corresponding to the IO request.

12. A block storage-based IO access device, applied to a block storage service client; wherein: The block storage service client runs a block storage transmission protocol; The block storage transmission protocol includes a front-end driver and a back-end driver; the device includes: A front-end driver module receives an IO request for a target logical block device mounted by the front-end driver, issued by a user program using block storage, and parses the IO request to obtain an address of a buffer; wherein the IO request includes the address of a buffer allocated to the user program; The address mapping submodule of the front-end driver determines a target physical block device corresponding to the target logical block device based on the maintained association relationship between the logical block device mounted by the front-end driver and the physical block device mounted by the back-end driver, and maps the address of the buffer to a DMA address corresponding to the buffer through an IO memory management unit corresponding to the target physical block device; The command transmission submodule of the front-end driver transmits the DMA address to the back-end driver, and the back-end driver performs DMA access to the buffer based on the DMA address to execute the IO processing operation corresponding to the IO request.

13. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 10 by running the executable instructions.

14. A machine-readable storage medium having machine-readable instructions stored thereon, which implement the steps of the method according to any one of claims 1 to 10 when executed by a processor.

Citation Information

Patent Citations

  • Provision of multi-protocol storage device by means of system abstraction layer

    CN110275757A

  • Method and system for facilitating fast crash recovery in storage device

    CN113722131A

  • Method, device and system for processing object storage access

    CN114327302A

  • IO access method and device based on block storage, electronic equipment and medium

    CN116489177A

  • Workload based device access

    US20200097183A1