Data processing method, device, equipment and storage medium
By using multiple central processors and load balancing principles in the data processor to allocate data processing queues, the problem of data processing delay under high concurrent requests is solved, efficient NVMe-oF request processing is achieved, and the overall data processing speed is improved. .
Patent Information
- Application Number
- CN202311755476.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-12-19
AI Technical Summary
When the server connects to multiple clients, the concurrency pressure of NVMe-oF requests causes increased data processing delays and slows down the overall speed. It is difficult for existing technology to effectively handle high concurrent requests.
By using at least two central processors in the data processor, allocate data processing queues based on the load balancing principle, establish an association between the central processors and the queues, use the RDMA queue to process the client's read and write requests, and pass the parsing results through The data processing queue is submitted to the NVMe device.
It improves the parallel processing capability of multiple clients' concurrent NVMe-oF requests, shortens the data processing time, and improves the overall data processing speed.
Smart Images

Figure CN117609142B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, equipment and storage medium. Background Art
[0002] With the development of computer technology, the amount of data that needs to be processed is increasing, and the performance of disk read and write and network bandwidth is also constantly improving. The previous data transmission protocol can no longer meet the current user's demand for data processing performance. NVMe over Fabrics (NVMe-oF) is a newer protocol specification that aims to use NVMe to connect the host to storage through a network structure, support the decomposition of computing and storage in the data center, and solve the performance bottleneck problem of the above protocol.
[0003] The data processor (DPU) is an evolutionary device of the smart network card. The function of receiving NVMe-oF requests and performing corresponding data processing can be offloaded from the server host to the data processor to increase the speed of data processing. However, when the number of clients connected to the server increases and the pressure of concurrent requests increases, the delay of data processing through the data processor will also increase, which will eventually lead to a slower overall data processing speed. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a data processing method, device, equipment and storage medium.
[0005] A first aspect of an embodiment of the present disclosure provides a data processing method, which is applicable to a data processor, wherein the data processor includes at least two central processing units, and the method includes:
[0006] In response to the NVMe device being initialized, obtaining a first number of data processing queues created by the target;
[0007] Based on the load balancing principle, respectively determining a second number of data processing queues associated with the at least two central processors;
[0008] In response to the first number of data processing queues being created, establishing association relationships between the at least two central processors and each data processing queue according to the second number;
[0009] In response to receiving a connection request including a target queue number sent by a target client, controlling a target central processor among the at least two central processors to establish an RDMA queue, wherein an association relationship exists between a target data processing queue corresponding to the target queue number and the target central processor;
[0010] In response to the target central processor obtaining the data read and write request sent by the target client from the RDMA queue, the target central processor is controlled to parse and process the data read and write request, submit the parsing result to the NVMe device through the target data processing queue, receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client.
[0011] A second aspect of an embodiment of the present disclosure provides a data processing device, which is applicable to a data processor, wherein the data processor includes at least two central processing units, and the device includes:
[0012] An acquisition module, configured to acquire a first number of data processing queues created by a target in response to completion of initialization of the NVMe device;
[0013] A load balancing module, configured to respectively determine the second number of data processing queues associated with the at least two central processors based on a load balancing principle;
[0014] an association module, configured to establish an association relationship between the at least two central processors and each data processing queue according to the second number in response to the first number of data processing queues being created;
[0015] A connection establishment module, configured to control a target central processor among the at least two central processors to establish an RDMA queue in response to receiving a connection request including a target queue number sent by a target client, wherein an association relationship exists between a target data processing queue corresponding to the target queue number and the target central processor;
[0016] A data processing module is used to control the target central processor to parse and process the data read and write request in response to the target central processor obtaining the data read and write request sent by the target client from the RDMA queue, submit the parsing result to the NVMe device through the target data processing queue, receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client.
[0017] A third aspect of an embodiment of the present disclosure provides a computer device, including a memory, a processor, and a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the data processing method of the first aspect described above is implemented.
[0018] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the data processing method of the first aspect described above is implemented.
[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0020] In the data processing method, apparatus, device and storage medium provided by the embodiments of the present disclosure, in response to the completion of the initialization of the NVMe device, the first number of data processing queues created by the target is obtained, based on the load balancing principle, the second number of data processing queues associated with at least two central processors is determined respectively, in response to the completion of the creation of the first number of data processing queues, an association relationship between at least two central processors and each data processing queue is established according to the second number, in response to receiving a connection request containing a target queue number sent by a target client, the target central processor among the at least two central processors is controlled to establish an RDMA queue, and there is an association relationship between the target data processing queue corresponding to the target queue number and the target central processor, in response to the target central processor obtaining a data read and write request sent by the target client from the RDMA queue, the target central processor is controlled to parse and process the data read and write request, submit the parsing result to the NVMe device through the target data processing queue, and receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client, which can set a plurality of central processors (Central Processor) The DPU of the processing unit (CPU) processes the NVMe-oF request and allocates each data processing queue to different CPUs based on the load balancing principle, so that each CPU can process concurrent requests at the same time. When the server is connected to multiple clients at the same time, the DPU's ability to process concurrent NVMe-oF requests in parallel is improved, thereby improving the overall speed of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0023] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present disclosure;
[0024] Figure 2 is a flowchart of a method for creating a queue provided by an embodiment of the present disclosure;
[0025] Figure 3 is a flowchart of a method for parsing a request provided by an embodiment of the present disclosure;
[0026] Figure 4 is a flow chart of another data processing method provided by an embodiment of the present disclosure;
[0027] Figure 5 is a structural schematic diagram of a data processing device provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0032] Figure 1 1 is a flow chart of a data processing method provided by an embodiment of the present disclosure. The method can be executed by a data processing device. The device can be set in a data processor. The data processor includes at least two central processing units. Figure 1 As shown, the data processing method provided in this embodiment includes the following steps:
[0033] S101. In response to the completion of the initialization of the NVMe device, the first number of data processing queues created by the target is obtained.
[0034] The NVMe device in the embodiment of the present disclosure can be understood as a solid state drive (SSD) that uses the non-volatile memory host controller interface specification (Non-Volatile Memory express, NVMe) for data storage. There is a communication connection between the DPU and the NVMe SSD device. For example, the DPU and the NVMe SSD device can be directly connected.
[0035] In the disclosed embodiment, the data processing apparatus may wait for the NVMe device to be initialized after the NVMe device is powered on, and obtain the first number of target-created data processing queues that the NVMe device can support.
[0036] In an exemplary implementation of the disclosed embodiment, after the NVMe device is powered on, the data processing device may wait for the RDY bit value in the NVMe device controller status (CSTS) register to become 0. At this time, the data processing device may allocate space from the DPU memory to create an NVMe management queue. Specifically, the management queue may include a management submission queue and a management completion queue, and write its physical address, queue size and other attribute information into the management queue attributes (AQA) register and the management submission queue base address (ASQ) register, set the EN bit of the NVMe CC register to 1, and wait for other configuration preparations to be completed, the RDY bit value of the NVMe CSTS register becomes 1, at which time it can be determined that the NVMe device is initialized. The data processing device can determine the maximum number of data processing queues that the NVMe device can support to create based on the attribute information of the NVMe device, and determine it as the first number, or determine the first number of data processing queues to be created according to information pre-set by the staff.
[0037] S102: Based on a load balancing principle, determine the second number of data processing queues associated with at least two central processing units respectively.
[0038] In the embodiment of the present disclosure, after determining the first number of target created data processing queues, the data processing device may determine the second number of data processing queues allocated to each of at least two CPUs on the DPU based on the load balancing principle.
[0039] In an exemplary implementation of the disclosed embodiment, after determining the first number of data processing queues to be created, the data processing device may determine the second number of data processing queues associated with each CPU based on the load balancing principle according to the number of CPUs set on the DPU and the processing performance of each CPU, wherein the sum of the second numbers corresponding to each CPU may be equal to the first number.
[0040] S103: In response to the first number of data processing queues being created, establishing association relationships between at least two central processors and each data processing queue according to the second number.
[0041] In an embodiment of the present disclosure, the data processing device can determine the second number of data processing queues associated with at least two central processors respectively, and after the first number of data processing queues are created, establish an association relationship between the at least two central processors and their corresponding second number of data processing queues.
[0042] In an exemplary implementation of the disclosed embodiment, the data processing device may create a first number of data processing queues in the shared memory of the DPU after determining the first number of data processing queues to be created, and establish an association relationship between each CPU and the second number of data processing queues based on the second number of data processing queues associated with each CPU.
[0043] S104, in response to receiving a connection request including a target queue number sent by a target client, controlling a target central processor among at least two central processors to establish an RDMA queue, and an association relationship exists between a target data processing queue corresponding to the target queue number and the target central processor.
[0044] The queue number in the embodiment of the present disclosure can be understood as the identification information of the data processing queue, the target queue number is the queue number of the target data processing queue in each data processing queue, and the target central processor can be understood as the central processor associated with the target data processing queue corresponding to the target queue number.
[0045] The RDMA (Remote Direct Memory Access) in the disclosed embodiment is a data transmission protocol created to address the fact that the TCP protocol consumes a lot of CPU and has low transmission efficiency. Based on the RDMA protocol, the network card can directly transfer the data in the memory (RAM) to the other end of the network without the need for CPU transmission. RDMA communication is based on the following three queues: Send Queue (SQ), Receive Queue (RQ) and Completion Queue (CQ). Among them, the Send Queue (SQ) and Receive Queue (RQ) are responsible for scheduling work and are always created in pairs, called Queue Pairs QP (Queue Pair), and the Completion Queue (CQ) is used to send notifications.
[0046] In the disclosed embodiment, after receiving a connection request sent by a target client, the data processing device can extract the target queue number from the connection request, determine that the target client needs to use the target data processing queue corresponding to the target queue number to perform data reading and writing operations, and determine the target CPU associated with the target data processing queue based on the pre-established association relationship between the data processing queue and the CPU, and then control the target CPU to establish an RDMA queue corresponding to the target data processing queue.
[0047] In an exemplary implementation of the embodiment of the present disclosure, the data processing device may control the target CPU to establish an RDMA queue in the shared memory of the DPU when controlling the target CPU to establish an RDMA queue corresponding to the target data processing queue.
[0048] In an exemplary implementation of the disclosed embodiment, after the data processing queue and the association relationship between each CPU are established, the data processing device sends the queue number of the available data processing queue to the client, so that the client negotiates with the DPU based on the queue number of the available data processing queue and finally determines the data processing queue to be used.
[0049] S105, in response to the target central processor obtaining the data read and write request sent by the target client from the RDMA queue, the target central processor is controlled to parse and process the data read and write request, submit the parsing result to the NVMe device through the target data processing queue, and receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client. At this point, the processing flow of the data read and write request sent by the target client is completed.
[0050] In the disclosed embodiment, the data processing device can control each CPU to monitor the RDMA queue that it is responsible for processing. After the target CPU monitors the data read and write request sent by the target client from the RDMA queue, the target CPU is controlled to parse and process the data read and write request to obtain a parsing result that complies with the NVMe protocol, and submit the parsing result to the NVMe device through the target data processing queue. The NVMe device performs corresponding data read and write processing according to the parsing result, and then sends the processing completion information through the target data processing queue. After the target CPU monitors the processing completion information sent by the target data processing queue from the target data processing queue, it returns the processing result to the target client.
[0051] In response to the completion of the initialization of the NVMe device, the embodiment of the present disclosure obtains the first number of data processing queues created by the target, determines the second number of data processing queues associated with at least two central processors based on the load balancing principle, and establishes an association relationship between at least two central processors and each data processing queue according to the second number in response to the completion of the creation of the first number of data processing queues. In response to receiving a connection request containing a target queue number sent by a target client, the target central processor among the at least two central processors is controlled to establish an RDMA queue, and there is an association relationship between the target data processing queue corresponding to the target queue number and the target central processor. In response to the target central processor obtaining a data read and write request sent by the target client from the RDMA queue, the target central processor is controlled to parse and process the data read and write request, submit the parsing result to the NVMe device through the target data processing queue, and receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client. It is possible to set a central processor (Central Processing The DPU of the server (CPU) processes the NVMe-oF request and allocates each data processing queue to different CPUs based on the load balancing principle, so that each CPU can process concurrent requests at the same time. When the server is connected to multiple clients at the same time, the DPU's ability to process concurrent NVMe-oF requests in parallel is improved, thereby improving the overall speed of data processing.
[0052] Figure 2 is a flowchart of a method for creating a queue provided by an embodiment of the present disclosure, such as Figure 2 As shown, based on the above embodiment, a queue can be created by the following method.
[0053] S201. Create a second number of data processing queues in local memories of at least two central processing units respectively.
[0054] In the embodiment of the present disclosure, when creating the data processing queues, the data processing device may respectively create a second number of data processing queues associated with the CPU in the local memories of at least two CPUs on the DPU.
[0055] In an exemplary implementation of the embodiments of the present disclosure, the data processing device can determine the second number of data processing queues associated with at least two central processing units based on the load balancing principle, and at the same time, create the corresponding second number of data processing queues in the local memories of at least two central processing units respectively. Specifically, the data processing device can select a CPU with the smallest load from each CPU according to the load conditions of each CPU, determine that the next data processing queue will be allocated to the CPU with the smallest load, and thus create a data processing queue in the local memory of the CPU with the smallest load, and so on, until the number of data processing queues created in the local memory of each CPU as a whole is equal to the first number. At this time, the second number of data processing queues associated with each CPU can be determined according to the number of data processing queues created in the local memory of each CPU.
[0056] In another exemplary implementation of the disclosed embodiment, the data processing device may, based on the load balancing principle, predetermine the second number of data processing queues associated with at least two central processing units, and then create a corresponding second number of data processing queues in the local memory of each CPU.
[0057] S202: Establish an association relationship between at least two central processing units and a second number of data processing queues created in their respective local memories.
[0058] In the embodiment of the present disclosure, the data processing device may establish an association relationship between at least two CPUs and a second number of data processing queues in their respective local memories after the data processing queues are created.
[0059] In an exemplary implementation of the disclosed embodiment, the data processing device may establish an association relationship between the data processing queue and the CPU corresponding to the local memory where the data processing queue is located after each data processing queue is created, or may establish an association relationship between each CPU and a second number of data processing queues after a first number of data processing queues are all created, wherein the creation of the association relationship may specifically include recording the mapping relationship between the data processing queue and the CPU.
[0060] S203: Control the target central processor to establish an RDMA queue in the local memory, where the RDMA queue corresponds to the target data processing queue.
[0061] In the disclosed embodiment, the data processing device may control the target CPU to establish an RDMA queue in its corresponding local memory when receiving a connection request sent by the target client and needing to establish an RDMA queue corresponding to the target data queue.
[0062] The disclosed embodiment establishes an association relationship between at least two central processors and the second number of data processing queues created in their respective local memories by respectively creating a second number of data processing queues in the local memories of at least two central processors, and / or: controls the target central processor to establish an RDMA queue in the local memory, the RDMA queue corresponds to the target data processing queue, and can establish a queue in the local memory of the central processor responsible for processing the queue when establishing the data processing queue and the RDMA queue, thereby shortening the time required for the central processor to read or write elements from the queue, thereby further improving the overall speed of data processing.
[0063] Figure 3 is a flowchart of a method for parsing a request provided by an embodiment of the present disclosure, such as Figure 3 As shown, based on the above embodiment, the request can be parsed by the following method.
[0064] S301, controlling the target central processor to parse the request type and data storage address of the data read / write request.
[0065] The request types in the embodiments of the present disclosure may include read requests and write requests. A read request is a request to read data from an NVMe device, and the data storage address included in the read request can be understood as the storage address of the data read from the NVMe device by the target in the NVMe device. A write request is a request to write data to the NVMe device, and the data storage address included in the write request can be understood as the storage address of the data written to the NVMe device by the target in the client.
[0066] In the embodiment of the present disclosure, the data processing device can parse the request type of the data read and write request and the data storage address contained in the data read and write request when controlling the target central processor to parse the data read and write request. Specifically, the parsing can be performed according to pre-set request type parameters and the position of the data storage address in the data read and write request, or by other methods, which are not limited here.
[0067] S302: If the request type is a write request, first target data is obtained from the target client based on the data storage address, and the first target data is written into the shared memory of the data processor.
[0068] In an embodiment of the present disclosure, the data processing device can, after determining that the request type of the data read and write request is a write request, access the location of the data storage address in the target client, obtain the first target data to be written to the NVMe device, and write the first target data into the shared memory of the data processor.
[0069] S303: If the request type is a read request, determine a data cache area in the shared memory.
[0070] In an embodiment of the present disclosure, the data processing device can divide a data cache area from the shared memory after determining that the request type of the data read and write request is a write request. Specifically, a data cache area can be divided into a double-rate synchronous dynamic random access memory in the shared memory, so that the NVMe device can temporarily store the read data in the data cache area.
[0071] The disclosed embodiment controls the target central processor to parse the request type and data storage address of the data read and write request. If the request type is a write request, the first target data is obtained from the target client based on the data storage address, and the first target data is written into the shared memory of the data processor. If the request type is a read request, the data cache area is determined in the shared memory to facilitate subsequent NVMe devices to perform data read and write processing.
[0072] Figure 4 FIG. 1 is a flow chart of another data processing method provided by an embodiment of the present disclosure. Figure 4 As shown, based on the above embodiment, data processing can be performed by the following method, wherein the target data processing queue includes a target submission queue and a target completion queue.
[0073] S401: Write the parsing result into the target submission queue, and update the identification information stored in the doorbell register in the target submission queue.
[0074] In the disclosed embodiment, the data processing queue may specifically include a submission queue (SQ) and a completion queue (CQ). The CPU submits data processing related information through the SQ, and the NVMe device sends processing completion information through the CQ. The target submission queue can be understood as the submission queue in the target data processing queue, and the target completion queue can be understood as the completion queue in the target data processing queue.
[0075] In the disclosed embodiment, after controlling the target CPU to parse the data read and write request, the data processing device can further control the target CPU to write the parsing result into the target submission queue, and update the identification information stored in the doorbell register in the target submission queue, so that the NVMe device can obtain the parsing result written by the target CPU from the target submission queue after monitoring the update of the identification information in the doorbell register, and perform corresponding data processing based on the parsing result.
[0076] S402. Receive the processed information written by the NVMe device from the target completion queue.
[0077] In the disclosed embodiment, the data processing device can control the target CPU to monitor the target completion queue, and receive the processed information written by the NVMe device.
[0078] The disclosed embodiment writes the parsing result into the target submission queue, updates the identification information stored in the doorbell register in the target submission queue, receives the processed information written by the NVMe device from the target completion queue, and can interact with the NVMe device through the submission queue and the completion queue to realize data reading and writing.
[0079] In some embodiments of the present disclosure, S401 includes: if the request type is a write request, writing the first target data at the first address in the shared memory to the target submission queue, so that the NVMe device obtains and stores the first target data based on the first address, and writes the processed information to the target completion queue.
[0080] Specifically, if the request type is a write request, the data processing device can control the target CPU to write the first address of the first target data in the shared memory into the target submission queue. When the NVMe device reads information from the target submission queue, it can obtain and store the first target data from the shared memory of the DPU based on the first address, and write the processed information into the target completion queue after storage. After receiving the processed information, the target CPU can return the processing result of data writing completion to the target client. Specifically, the target CPU can write the processing result into the RDMA queue.
[0081] Optionally, if the request type is a write request, the data processing device can control the target CPU to construct a data write request that complies with the NVMe protocol based on the first address of the first target data in the shared memory, and write the data write request into the target submission queue, so that the NVMe device obtains the first address from the data write request, obtains and stores the first target data based on the first address, and then writes the processed information into the target completion queue.
[0082] In other embodiments of the present disclosure, S401 includes: if the request type is a read request, the second address of the data cache area and the data storage address are written into the target submission queue, so that the NVMe device obtains the second target data based on the data storage address, writes the second target data into the data cache area based on the second address, and writes the processed information into the target completion queue.
[0083] Specifically, if the request type is a read request, the data processing device can control the target CPU to write the second address of the divided data cache area and the data storage address of the data read by the client target in the NVMe device into the target submission queue. When the NVMe device reads information from the target submission queue, it can locate and obtain the second target data stored at the address based on the data storage address, and write the obtained second target data into the data cache area in the DPU based on the second address. After writing is completed, the processed information is written into the target completion queue. After receiving the processed information, the target CPU can read the second target data written by the NVMe device from the data cache area, and return the second target data and the processing result of the data reading completion to the target client. Specifically, the target CPU can write the second target data and the processing result into the RDMA queue.
[0084] Optionally, if the request type is a read request, the data processing device can control the target CPU to construct a data read request that complies with the NVMe protocol based on the second address and the data storage address, and write the data read request into the target submission queue, so that the NVMe device obtains the second address and the data storage address from the data read request, obtains the second target data based on the data storage address, writes the second target data into the data cache area based on the second address, and then writes the processed information into the target completion queue.
[0085] In some other embodiments of the present disclosure, the data processor and the NVMe device are connected via a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIe).
[0086] Specifically, a PCIe slot may be provided on the DPU, and the NVMe device is plugged into the DPU through the slot, thereby performing data exchange based on PCIe, further improving the overall speed of data processing.
[0087] Figure 5 1 is a schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure. The data processing device is applicable to a data processor, and the data processor includes at least two central processing units. Figure 5As shown, the data processing device 500 includes: an acquisition module 510, a load balancing module 520, an association module 530, a connection establishment module 540, and a data processing module 550, wherein the acquisition module 510 is used to obtain the first number of data processing queues created by the target in response to the completion of the initialization of the NVMe device; the load balancing module 520 is used to determine the second number of data processing queues associated with the at least two central processors based on the load balancing principle; the association module 530 is used to establish the association relationship between the at least two central processors and each data processing queue according to the second number in response to the completion of the creation of the first number of data processing queues; the connection establishment module 540 is used to respond to the reception of In response to a connection request containing a target queue number sent to a target client, a target central processor among the at least two central processors is controlled to establish an RDMA queue, and there is an association relationship between the target data processing queue corresponding to the target queue number and the target central processor; a data processing module 550 is used to respond to the target central processor obtaining a data read and write request sent by the target client from the RDMA queue, then control the target central processor to parse and process the data read and write request, submit the parsing result to the NVMe device through the target data processing queue, receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client.
[0088] Optionally, the data processing device 500 also includes: a queue creation module, used to create a second number of data processing queues in the local memories of the at least two central processors respectively; the association module 530, specifically used to establish an association relationship between the at least two central processors and the second number of data processing queues created in their respective local memories; the data processing module 550, specifically used to control the target central processor to establish an RDMA queue in the local memory, and the RDMA queue corresponds to the target data processing queue.
[0089] Optionally, the data processing module 550 includes: a parsing unit, used to control the target central processor to parse the request type and data storage address of the data read and write request; a first processing unit, used to obtain first target data from the target client based on the data storage address if the request type is a write request, and write the first target data into the shared memory of the data processor; and a second processing unit, used to determine the data cache area in the shared memory if the request type is a read request.
[0090] Optionally, the data processing module 550 includes: a writing unit, used to write the parsing results into the target submission queue and update the identification information stored in the doorbell register in the target submission queue; and a receiving unit, used to receive the processed information written by the NVMe device from the target completion queue.
[0091] Optionally, the write unit is specifically used to write the first address of the first target data in the shared memory to the target submission queue if the request type is a write request, so that the NVMe device obtains and stores the first target data based on the first address, and writes the processed information into the target completion queue.
[0092] Optionally, the write unit is specifically used to write the second address of the data cache area and the data storage address into the target submission queue if the request type is a read request, so that the NVMe device obtains the second target data based on the data storage address, writes the second target data into the data cache area based on the second address, and writes the processed information into the target completion queue.
[0093] Optionally, the data processor and the NVMe device are connected via a high-speed serial computer expansion bus.
[0094] The data processing device provided in this embodiment can execute the method described in any of the above embodiments. Its execution method and beneficial effects are similar and will not be described in detail here.
[0095] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.
[0096] like Figure 6 As shown, the computer device may include a processor 610 and a memory 620 storing computer program instructions.
[0097] Specifically, the processor 610 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0098] The memory 620 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 620 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 620 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 620 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 620 is a non-volatile solid-state memory. In a particular embodiment, the memory 620 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0099] The processor 610 reads and executes the computer program instructions stored in the memory 620 to perform the steps of the data processing method provided in the embodiment of the present disclosure.
[0100] In one example, the computer device may further include a transceiver 630 and a bus 640. Figure 6 As shown, the processor 610, the memory 620 and the transceiver 630 are connected via a bus 640 and communicate with each other.
[0101] The bus 640 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 640 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0102] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the data processing method provided by the embodiments of the present disclosure.
[0103] The above-mentioned storage medium may, for example, include a memory 620 of computer program instructions, and the above-mentioned instructions may be executed by a processor 610 of a data processing device to complete the data processing method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc. The above-mentioned computer program may be written in any combination of one or more programming languages to perform the program code for the operation of the embodiment of the present disclosure, and the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code may be executed entirely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device, partially on a remote computing device, or entirely on a remote computing device or server.
[0104] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0105] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized in that: The method is applicable to a data processor, wherein the data processor includes at least two central processing units, and the method includes: In response to the NVMe device being initialized, obtaining a first number of data processing queues created by the target, where the first number is a maximum number of data processing queues supported by the NVMe device to be created; Based on the load balancing principle, respectively determining a second number of data processing queues associated with the at least two central processors; In response to the first number of data processing queues being created, establishing association relationships between the at least two central processors and each data processing queue according to the second number; In response to receiving a connection request including a target queue number sent by a target client, controlling a target central processor among the at least two central processors to establish an RDMA queue, wherein an association relationship exists between a target data processing queue corresponding to the target queue number and the target central processor; In response to the target central processor obtaining the data read and write request sent by the target client from the RDMA queue, the target central processor is controlled to parse and process the data read and write request, submit the parsing result to the NVMe device through the target data processing queue, receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client.
2. The method according to claim 1, characterized in that: The method further comprises: Creating a second number of data processing queues in local memories of the at least two central processing units respectively; The establishing, according to the second number, an association relationship between the at least two central processors and each data processing queue comprises: Establishing an association relationship between the at least two central processors and a second number of data processing queues created in their respective local memories; and / or: The controlling a target central processor among the at least two central processors to establish an RDMA queue comprises: The target central processor is controlled to establish an RDMA queue in a local memory, wherein the RDMA queue corresponds to the target data processing queue.
3. The method according to claim 1, characterized in that The controlling the target central processor to parse and process the data read and write request includes: Controlling the target central processor to parse the request type and data storage address of the data read and write request; If the request type is a write request, obtaining first target data from the target client based on the data storage address, and writing the first target data into the shared memory of the data processor; If the request type is a read request, a data cache area is determined in the shared memory.
4. The method according to claim 3, characterized in that The target data processing queue includes a target submission queue and a target completion queue, and submitting the parsing result to the NVMe device through the target data processing queue includes: Writing the parsing result into the target submission queue, and updating the identification information stored in the doorbell register in the target submission queue; The receiving the processed information sent by the NVMe device through the target data processing queue includes: Receive the processed information written by the NVMe device from the target completion queue.
5. The method according to claim 4, characterized in that The step of writing the parsing result into the target submission queue comprises: If the request type is a write request, the first address of the first target data in the shared memory is written to the target submission queue, so that the NVMe device obtains and stores the first target data based on the first address, and writes the processed information into the target completion queue.
6. The method according to claim 4, characterized in that The step of writing the parsing result into the target submission queue comprises: If the request type is a read request, the second address of the data cache area and the data storage address are written into the target submission queue, so that the NVMe device obtains the second target data based on the data storage address, writes the second target data into the data cache area based on the second address, and writes the processed information into the target completion queue.
7. The method according to any one of claims 1 to 6, characterized in that The data processor and the NVMe device are connected via a high-speed serial computer expansion bus.
8. A data processing device, characterized in that: The device is applicable to a data processor, the data processor includes at least two central processing units, and the device includes: An acquisition module, configured to acquire a first number of data processing queues created by a target in response to completion of initialization of the NVMe device, wherein the first number is a maximum number of data processing queues supported by the NVMe device; A load balancing module, configured to determine, based on a load balancing principle, second numbers of data processing queues associated with the at least two central processors; an association module, configured to establish an association relationship between the at least two central processors and each data processing queue according to the second number in response to the first number of data processing queues being created; A connection establishment module, configured to control a target central processor among the at least two central processors to establish an RDMA queue in response to receiving a connection request including a target queue number sent by a target client, wherein an association relationship exists between a target data processing queue corresponding to the target queue number and the target central processor; A data processing module is used to control the target central processor to parse and process the data read and write request in response to the target central processor obtaining the data read and write request sent by the target client from the RDMA queue, submit the parsing result to the NVMe device through the target data processing queue, receive the processing completion information sent by the NVMe device through the target data processing queue, and return the processing result to the target client.
9. A computer device, characterized in that: include: Memory; processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the data processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Storage transactions with predictable latency
CN115210693A
Request processing method and apparatus, and device and medium
WO2023201987A1
