Access method, device and computer equipment for queue pair information of transceiving queue pair

By splitting queue access requests into sub-access requests and allocating access locks, the atomicity and cache consistency issues of queue access under high concurrency in RDMA networks are resolved, achieving ordered and consistent access operations.

CN119621276BActive Publication Date: 2026-02-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411723236.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2026-02-27
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In RDMA networks, under high-concurrency access scenarios, it is difficult to guarantee the atomicity of information in the queue and the consistency of the cache.

Method used

The queue is split into multiple sub-access requests, each corresponding to a target information table. An access lock is assigned to each sub-access request. By managing the scheduling queue and access locks, the orderliness and consistency of access operations are ensured.

Benefits of technology

By allocating an access lock to each sub-access request, the orderliness of information access by the queue and the consistency of the cache are guaranteed, thus solving the atomicity problem of information access by the queue under high concurrency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621276B_ABST
    Figure CN119621276B_ABST
Patent Text Reader

Abstract

The application relates to a method and device for accessing queue pair information of a queue pair, computer equipment, a computer readable storage medium and a computer program product, and relates to the technical field of communication. The method comprises the following steps: receiving a queue pair information access request for a queue pair; determining a plurality of target queue pair information to which the queue pair information access request is directed; based on the plurality of target queue pair information, splitting the queue pair information access request into at least one sub-access request; writing each sub-access request into a corresponding scheduling queue; based on scheduling of a plurality of scheduling queues, assigning each sub-access request a corresponding access lock; based on the access lock of each sub-access request, sending each sub-access request to a corresponding target information table to access the target queue pair information in the target information table corresponding to each sub-access request. The method can guarantee the atomicity and cache consistency of the queue pair information.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, in particular to a method and device for accessing queue pair information of a queue pair, a computer device, a computer readable storage medium and a computer program product. BACKGROUND

[0002] In a RDMA (Remote Direct Memory Access) network, communication between two transceiving parties is implemented through a queue pair (QP). In the process of QP transceiving packets, access to queue pair information (QPC) is usually involved, such as read or write operations.

[0003] Currently, the scale of QP in the RDMA network can reach tens of thousands or even millions, so access to QPC is usually high-concurrency access. In a high-concurrency access scenario, it is a great challenge to guarantee the atomicity and cache consistency of QPC. SUMMARY

[0004] Therefore, it is necessary to provide a method and device for accessing queue pair information of a queue pair, a computer device, a computer readable storage medium and a computer program product, which can guarantee the atomicity and cache consistency of queue pair information.

[0005] In a first aspect, the present application provides a method for accessing queue pair information of a queue pair, comprising:

[0006] receiving a queue pair information access request for a queue pair;

[0007] determining a plurality of target queue pair information to which the queue pair information access request is directed, and splitting the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information; each sub-access request corresponds to a target information table, and each target information table stores at least one target queue pair information;

[0008] writing each sub-access request to a corresponding dispatch queue;

[0009] allocating a corresponding access lock for each sub-access request based on dispatching a plurality of dispatch queues, and sending each sub-access request to a corresponding target information table based on the access lock of each sub-access request, to access the target queue pair information in the target information table corresponding to each sub-access request, and to generate access response information of each sub-access request;

[0010] return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request; the comprehensive access response information comprises access response information of each sub access request.

[0011] In one of the embodiments, each target information table corresponds to multiple dispatch queues, and each sub access request is written into a dispatch queue, and a target dispatch queue of the sub access request in the multiple dispatch queues of the corresponding target information table is determined;

[0012] The method further comprises:

[0013] Concurrent queue dispatch processing is performed on each target information table, and for each target information table, a to-be-dispatched queue is determined in the multiple dispatch queues of the target information table, and a target sub access request in the to-be-dispatched queue is assigned a corresponding access lock; the target sub access request is a sub access request located at the head of the to-be-dispatched queue;

[0014] In a case where the target sub access request is successfully assigned a corresponding access lock, the target sub access request is sent to the corresponding target information table;

[0015] In a case where the target sub access request fails to be assigned a corresponding access lock, the target sub access request is written into the to-be-dispatched queue again.

[0016] In one of the embodiments, the method further comprises:

[0017] Based on a request type of the queue pair information access request, a target lock type corresponding to the target sub access request is determined;

[0018] A number of already-assigned locks of the transceiving queue under the target lock type is determined;

[0019] In a case where the number of already-assigned locks is less than a corresponding number threshold, an access lock of the target lock type is assigned to the target sub access request, the number of already-assigned locks is increased, and it is determined that the target sub access request is successfully assigned a corresponding access lock;

[0020] In a case where the number of already-assigned locks is equal to the corresponding number threshold, it is determined that the target sub access request fails to be assigned a corresponding access lock;

[0021] The method further comprises:

[0022] After generating the access response information of the target sub-access request, the number of allocated access locks of the transceiving queue pair in a lock type of the target sub-access request is reduced.

[0023] In one of the embodiments, each information table corresponds to a plurality of scheduling queues.

[0024] The writing of each sub-access request into a corresponding scheduling queue comprises:

[0025] For each sub-access request, according to a hash value of the queue pair identification of the transceiving queue pair, a target scheduling queue of the sub-access request is determined from a plurality of scheduling queues of a target information table corresponding to the sub-access request.

[0026] The sub-access request is written into the target scheduling queue.

[0027] In one of the embodiments, the determining of a plurality of target queue pair information to which the queue pair information access request is directed comprises:

[0028] The request type of the queue pair information access request and the interface identification of the interface sending the queue pair information access request are taken as the request information of the queue pair information access request.

[0029] Based on the request information, a mapping relationship between the request information and the queue pair information is queried, and a plurality of target queue pair information to which the queue pair information access request is directed is determined.

[0030] Based on the plurality of target queue pair information, a mapping relationship between the queue pair information and the information table is queried, and at least one target information table for storing each target queue pair information is determined from a plurality of pre-constructed information tables; the plurality of pre-constructed information tables are used for storing the queue pair information of each transceiving queue pair.

[0031] The queue pair information access request is split into sub-access requests for each target information table.

[0032] In one of the embodiments, the queue pair information access request is a plurality, and each queue pair information access request corresponds to a transceiving queue pair.

[0033] The method further comprises:

[0034] For each queue pair information access request, the number of sub-access requests of the queue pair information access request is determined.

[0035] In a case where the information quantity of each access response information corresponding to the information access request of the queue pair reaches the request quantity, the access response information corresponding to the information access request of the queue pair is combined to obtain comprehensive access response information of the information access request of the queue pair.

[0036] In a second aspect, the present application further provides a device for accessing queue pair information of a queue pair, comprising:

[0037] a request receiving module configured to receive a queue pair information access request for a queue pair;

[0038] a request splitting module configured to determine a plurality of target queue pair information to which the queue pair information access request is directed, split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, and make each sub-access request correspond to one target information table, and store at least one target queue pair information in each target information table;

[0039] a request writing module configured to write each sub-access request into a corresponding dispatch queue;

[0040] an information access module configured to assign a corresponding access lock to each sub-access request based on dispatching of a plurality of dispatch queues, send the each sub-access request to a corresponding target information table based on the access lock of the each sub-access request, access the target queue pair information in the target information table corresponding to the each sub-access request, and generate access response information of the each sub-access request;

[0041] an information returning module configured to return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request, wherein the comprehensive access response information comprises access response information of each sub-access request.

[0042] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0043] receiving a queue pair information access request for a queue pair;

[0044] determining a plurality of target queue pair information to which the queue pair information access request is directed, splitting the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, and making each sub-access request correspond to one target information table, and storing at least one target queue pair information in each target information table;

[0045] writing each sub-access request into a corresponding dispatch queue;

[0046] allocate a corresponding access lock for each sub-access request based on the scheduling of the plurality of scheduling queues, send the each sub-access request to a corresponding target information table based on the access lock of the each sub-access request, access target queue pair information in the target information table corresponding to the each sub-access request, and generate access response information of the each sub-access request;

[0047] return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request; the comprehensive access response information includes access response information of each sub-access request.

[0048] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0049] receive a queue pair information access request for a transceiving queue pair;

[0050] determine a plurality of target queue pair information to which the queue pair information access request is directed, split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, each sub-access request corresponds to a target information table, and each target information table stores at least one target queue pair information;

[0051] write each sub-access request into a corresponding scheduling queue;

[0052] allocate a corresponding access lock for each sub-access request based on the scheduling of the plurality of scheduling queues, send the each sub-access request to a corresponding target information table based on the access lock of the each sub-access request, access target queue pair information in the target information table corresponding to the each sub-access request, and generate access response information of the each sub-access request;

[0053] return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request; the comprehensive access response information includes access response information of each sub-access request.

[0054] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the following steps:

[0055] receive a queue pair information access request for a transceiving queue pair;

[0056] determine a plurality of target queue pair information to which the queue pair information access request is directed, split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, each sub-access request corresponding to a target information table, and each target information table storing at least one target queue pair information;

[0057] write each sub-access request into a corresponding dispatch queue;

[0058] assign a corresponding access lock to each sub-access request based on dispatching of the plurality of dispatch queues, send each sub-access request to a corresponding target information table based on the access lock of each sub-access request, access target queue pair information in the target information table corresponding to each sub-access request, and generate access response information of each sub-access request;

[0059] return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request, and the comprehensive access response information includes access response information of each sub-access request.

[0060] The above method, device, computer device, computer readable storage medium, and computer program product for accessing queue pair information of a transceiving queue pair first receive a queue pair information access request for a transceiving queue pair, then determine a plurality of target queue pair information to which the queue pair information access request is directed, split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, each sub-access request corresponding to a target information table, and each target information table storing at least one target queue pair information, then write each sub-access request into a corresponding dispatch queue, then assign a corresponding access lock to each sub-access request based on dispatching of the plurality of dispatch queues, send each sub-access request to a corresponding target information table based on the access lock of each sub-access request, access target queue pair information in the target information table corresponding to each sub-access request, and generate access response information of each sub-access request, and finally return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request, and the comprehensive access response information includes access response information of each sub-access request. In this way, by assigning a corresponding access lock to each sub-access request of a queue pair information access request, and sending each sub-access request to a corresponding target information table based on the access lock of each sub-access request to access target queue pair information corresponding to each sub-access request, the order of access operations on queue pair information can be guaranteed based on the access lock, and the atomicity and cache consistency of queue pair information are further guaranteed. BRIEF DESCRIPTION OF DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the related art. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0062] Figure 1 A schematic diagram of a queue pair information management system in an embodiment;

[0063] Figure 2 A flowchart of a method for accessing queue pair information of a queue pair in an embodiment;

[0064] Figure 3 A flowchart of a step of assigning a corresponding access lock to each sub-access request based on scheduling of a plurality of scheduling queues, and sending each sub-access request to a corresponding target information table based on the access lock of each sub-access request in an embodiment;

[0065] Figure 4 A flowchart of a step of assigning a corresponding access lock to a target sub-access request in a to-be-scheduled queue in an embodiment;

[0066] Figure 5 A flowchart of a step of determining a plurality of target queue pair information to which a queue pair information access request is directed, and splitting the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information in an embodiment;

[0067] Figure 6 A flowchart of a method for accessing queue pair information of a queue pair in another embodiment;

[0068] Figure 7 A structural block diagram of an access device for queue pair information of a queue pair in an embodiment;

[0069] Figure 8 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0070] In order to make the purposes, technical solutions and advantages of the present application clearer, the following will further describe the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0071] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0072] The access method of the queue pair information of the queue pair provided in the embodiments of the present application can be applied to the queue pair information management system as shown in Figure 1 The queue pair information management system is mounted on a server. It can be understood that it can also be mounted on a terminal, and can also be mounted on a system including a server and a terminal, and is realized through the interaction of the server and the terminal. The server can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; the terminal can be but is not limited to various personal computers, notebook computers, smart phones, tablet computers, etc.

[0073] Referring to Figure 1 , the queue pair information management system includes a request analysis module, an information table management module, an information table module, and a response generation module.

[0074] It should be noted that the sending end and the receiving end in the RDMA network realize communication through the queue pair QP, and in the communication process, the sending end and the receiving end need to obtain the corresponding queue pair information QPC from the queue pair information management system.

[0075] Referring to Figure 1 , the sending end sends a queue pair information access request for accessing the queue pair information QPC to the queue pair information management system through a sending interface, and receives the response information returned by the queue pair information management system through the sending interface; the receiving end sends a queue pair information access request for accessing the queue pair information QPC to the queue pair information management system through a receiving interface, and receives the response information returned by the queue pair information management system through the receiving interface. The sending interface and the receiving interface are communication interfaces of the sending end and the receiving end.

[0076] Specifically, the request analysis module is configured to analyze the received queue pair information access request, determine a plurality of target queue pair information to which the queue pair information access request is directed, split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, and send each sub-access request to the information table management module.

[0077] an information table management module, configured to write each sub-access request into a corresponding dispatch queue, assign a corresponding access lock to each sub-access request based on dispatching of the multiple dispatch queues, and send each sub-access request to a corresponding target information table based on the access lock of each sub-access request to access target queue pair information in the target information table corresponding to each sub-access request.

[0078] an information table module, comprising a plurality of pre-constructed information tables configured to store queue pair information of each queue pair, and configured to generate access response information of each sub-access request after access of each sub-access request is completed and send the access response information of each sub-access request to a response generation module.

[0079] a response generation module, configured to generate comprehensive access response information of the queue pair information access request based on access response information of each sub-access request, and return the comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request.

[0080] In an exemplary embodiment, as shown in Figure 2 , there is provided a method for accessing queue pair information of a queue pair, which is applied to a queue pair information management system as shown in Figure 1 , and comprises the following steps:

[0081] Step S202, receiving a queue pair information access request for a queue pair.

[0082] The queue pair refers to a QP (Queue Pair), and in an RDMA network, communication between two transceiving parties is implemented through the queue pair QP.

[0083] The queue pair information access request is configured to request access to queue pair information, and the queue pair information refers to a QPC (Queue Pair Context). In the process of QP transceiving packets, access to the queue pair information QPC is usually involved, such as read operation or write operation on the queue pair information QPC.

[0084] Referring to Figure 1 , the sending interface and the receiving interface are communication interfaces of the sending end and the receiving end, and the queue pair information management system receives the queue pair information access request based on the sending interface and the receiving interface.

[0085] In specific applications, multiple queue pair information access requests can exist in the queue pair information management system at the same time to improve the access efficiency of the queue pair information. The multiple queue pair information access requests can be for different queue pairs or for the same queue pair.

[0086] Step S204: Determine the multiple target queue pairs for which the queue pair information access request is directed, and based on the multiple target queue pairs, split the queue pair information access request into at least one sub-access request.

[0087] The queue pair information management system contains multiple pre-built information tables, which store the queue pair information (QPC) for each send / receive queue pair (QP); see [link / reference] Figure 1 The queue-based information management system stores multiple pre-built information tables in the information table module.

[0088] Each sub-access request corresponds to a target information table, and each target information table stores at least one target queue pair information.

[0089] Specifically, see Figure 1 The request parsing module of the queue pair information management system first parses the queue pair information access request to determine the multiple target queue pair information that the request needs to access. Then, based on the multiple target queue pair information, the request parsing module determines at least one information table that the queue pair information access request needs to access from multiple pre-built information tables, which serves as the target information table for the queue pair information access request. Next, based on the target information table, the request parsing module splits the queue pair information access request into at least one sub-access request, with each sub-access request corresponding to a target information table, used to request access to the target queue pair information in the corresponding target information table.

[0090] For example, suppose the request parsing module parses the queue pair information QPCs that queue pair information access request 1 needs to access as QPC1, QPC2, and QPC3. Then, the target queue pair information for queue pair information access request 1 is QPC1, QPC2, and QPC3. Among them, QPC1 and QPC2 are stored in information table 1, and QPC3 is stored in information table 2. Therefore, the target information tables for queue pair information access request 1 are information table 1 and information table 2. Thus, the request parsing module splits queue pair information access request 1 into sub-access request 1-1 for information table 1 and sub-access request 1-2 for information table 2, in order to request access to QPC1 and QPC2 in information table 1, and in order to request access to QPC3 in information table 2.

[0091] Step S206: Write each sub-access request into the corresponding scheduling queue.

[0092] Among them, see Figure 1 The information management system has multiple scheduling queues in the information table management module. Furthermore, each target information table corresponds to multiple scheduling queues.

[0093] Each sub-access request corresponds to a scheduling queue, which is one of the multiple scheduling queues of the target information table corresponding to the sub-access request.

[0094] Specifically, referring to Figure 1 , the request parsing module sends the multiple sub-access requests to the information table management module of the queue pair information management system after splitting the queue pair information access request into the multiple sub-access requests; the information table management module writes each sub-access request into a corresponding scheduling queue, and each sub-access request waits for scheduling in the scheduling queue.

[0095] Step S208, based on the scheduling of the multiple scheduling queues, an access lock corresponding to each sub-access request is allocated, and each sub-access request is sent to the corresponding target information table based on the access lock of each sub-access request to access the target queue pair information in the target information table corresponding to each sub-access request and generate access response information of each sub-access request.

[0096] The information table management module is equipped with a scheduling algorithm for scheduling the multiple scheduling queues, and the scheduling algorithm includes but is not limited to a RR (Round-Robin) polling scheduling algorithm, a WRR (Weighted Round Robin) weighted polling scheduling algorithm, etc.

[0097] Specifically, referring to Figure 1 , the information table management module schedules the multiple scheduling queues, takes out one sub-access request from the scheduling queue each time, and allocates an access lock corresponding to the sub-access request; in the case that the sub-access request is allocated with the corresponding access lock, the sub-access request is sent to the corresponding target information table stored in the information table module of the queue pair information management system to access the target queue pair information in the target information table.

[0098] The information table module generates access response information of the sub-access request after the access of the sub-access request is completed, and sends the access response information to the response generation module of the queue pair information management system.

[0099] Step S210, the comprehensive access response information of the queue pair information access request is returned to the sender of the queue pair information access request.

[0100] The comprehensive access response information includes the access response information of each sub-access request.

[0101] Specifically, referring to Figure 1 , the sending interface and the receiving interface are communication interfaces of the sending end and the receiving end, and the queue pair information management system returns the queue pair information access request based on the sending interface and the receiving interface.

[0102] Specifically, referring to Figure 3The response generation module combines the access response information of each sub access request to obtain comprehensive access response information of the queue pair information access request corresponding to each sub access request, and returns the comprehensive access response information to the sender of the queue pair information access request through the interface of the queue pair information access request.

[0103] In the above method for accessing queue pair information of a transceiving queue pair, first, the queue pair information management system receives a queue pair information access request for the transceiving queue pair; then, the queue pair information management system determines a plurality of target queue pair information to which the queue pair information access request is directed, splits the queue pair information access request into at least one sub access request based on the plurality of target queue pair information, each sub access request corresponding to a target information table, and each target information table storing at least one target queue pair information; next, the queue pair information management system writes each sub access request into a corresponding dispatch queue; then, the queue pair information management system assigns a corresponding access lock to each sub access request based on dispatching of the plurality of dispatch queues, sends each sub access request to a corresponding target information table based on the access lock of each sub access request, accesses the target queue pair information in the target information table corresponding to each sub access request, and generates access response information of each sub access request; finally, the queue pair information management system returns comprehensive access response information of the queue pair information access request to the sender of the queue pair information access request; the comprehensive access response information includes the access response information of each sub access request. In this way, by assigning a corresponding access lock to each sub access request of the queue pair information access request and sending each sub access request to a corresponding target information table based on the access lock of each sub access request to access the target queue pair information corresponding to each sub access request, the queue pair information management system can ensure the order of the access operation of the queue pair information based on the access lock, thereby ensuring the atomicity and cache consistency of the queue pair information.

[0104] In an exemplary embodiment, each target information table corresponds to a plurality of dispatch queues, and the dispatch queue to which each sub access request is written is a target dispatch queue of the sub access request in the plurality of dispatch queues of the corresponding target information table.

[0105] For example, assume that the queue pair information access request 1 is split into a sub-access request 1-1 for information table 1 and a sub-access request 1-2 for information table 2, the queue pair information access request 2 is split into a sub-access request 2-1 for information table 1 and a sub-access request 2-2 for information table 2, the queue pair information access request 3 is split into a sub-access request 3-1 for information table 1 and a sub-access request 3-2 for information table 2, and assume that information table 1 corresponds to dispatch queue 1-1 and dispatch queue 1-2; if the target dispatch queue of the sub-access request 1-1 and the sub-access request 3-1 in the multiple dispatch queues of information table 1 is dispatch queue 1-1, and the target dispatch queue of the sub-access request 2-1 in the multiple dispatch queues of information table 1 is dispatch queue 1-2, the information table management module writes the sub-access request 1-1 and the sub-access request 3-1 to the dispatch queue 1-1, and writes the sub-access request 2-1 to the dispatch queue 1-2.

[0106] As shown in Figure 1 , the step S208 includes the following steps:

[0107] In step S302, the queue dispatch processing is performed on each target information table concurrently, for each target information table, a to-be-dispatched queue is determined in the multiple dispatch queues of the target information table, and a corresponding access lock is allocated to a target sub-access request in the to-be-dispatched queue.

[0108] In step S304, the target sub-access request is sent to the corresponding target information table when the allocation of the access lock corresponding to the target sub-access request is successful.

[0109] In step S306, the target sub-access request is written to the to-be-dispatched queue again when the allocation of the access lock corresponding to the target sub-access request fails.

[0110] The target sub-access request is a sub-access request located at the head of the to-be-dispatched queue.

[0111] Specifically, referring to Figure 1 , the information table management module can perform the queue dispatch processing on each target information table concurrently, i.e., simultaneously on multiple target information tables.

[0112] The queue dispatch processing of each target information table is as follows:

[0113] Referring to Figure 4The information table management module further comprises a scheduler, and the scheduler is loaded with a scheduling algorithm. The scheduler first determines a to-be-scheduled queue in the plurality of scheduling queues of the target information table based on the loaded scheduling algorithm, determines a target sub-access request in the to-be-scheduled queue as a sub-access request at the head of the to-be-scheduled queue, and takes out the target sub-access request. Then, the scheduler allocates a corresponding access lock to the target sub-access request in the to-be-scheduled queue, and in the case of successful allocation of the corresponding access lock to the target sub-access request, sends the target sub-access request to the corresponding target information table for access to information by the target queue, or in the case of failure of allocation of the access lock to the target sub-access request, writes the target sub-access request into the to-be-scheduled queue again, and waits for the next scheduling.

[0114] For example, it is assumed that, for the information table 1, the corresponding scheduling queue 1-1 and the scheduling queue 1-2, and the sub-access request 1-1 and the sub-access request 3-1 in the scheduling queue 1-1 in turn, and the sub-access request 1-2 in the scheduling queue 1-2.

[0115] If the to-be-scheduled queue is determined as the scheduling queue 1-1 in the first scheduling, the information table management module takes out the sub-access request 1-1 currently at the head of the scheduling queue 1-1, and allocates a corresponding access lock thereto. It is assumed that the allocation fails, and then the scheduler writes the sub-access request 1-1 into the scheduling queue 1-1 again.

[0116] If the to-be-scheduled queue is determined as the scheduling queue 1-2 in the second scheduling, the scheduler takes out the sub-access request 2-1 currently at the head of the scheduling queue 1-2, and allocates a corresponding access lock thereto. It is assumed that the allocation succeeds, and then the scheduler sends the sub-access request 2-1 to the information table 1.

[0117] If the to-be-scheduled queue is determined as the scheduling queue 1-1 in the third scheduling, the scheduler takes out the sub-access request 3-1 currently at the head of the scheduling queue 1-1, and allocates a corresponding access lock thereto. It is assumed that the allocation succeeds, and then the scheduler sends the sub-access request 3-1 to the information table 1.

[0118] If the to-be-scheduled queue is determined as the scheduling queue 1-1 in the fourth scheduling, the scheduler takes out the sub-access request 1-1 currently at the head of the scheduling queue 1-1, and allocates a corresponding access lock thereto. It is assumed that the allocation succeeds, and then the scheduler sends the sub-access request 1-1 to the information table 1.

[0119] In the embodiment, firstly, the concurrent queue scheduling of each target information table is processed by the scheduler, concurrent access to different target information tables can be realized, and thus the access efficiency is improved; secondly, the access lock of the target sub access request is allocated by the scheduler, and different processing is performed under the conditions of successful allocation and failed allocation, it is ensured that each sub access request accesses the queue pair information in turn under the condition of possessing the access lock, and thus the order of the access operation to the queue pair information is ensured, that is, the atomicity and cache consistency of the queue pair information are ensured.

[0120] In an exemplary embodiment, as shown in Figure 1 The step S302 of allocating the access lock corresponding to the target sub access request in the to-be-scheduled queue includes the following steps.

[0121] The step S402 of determining the target lock type corresponding to the target sub access request based on the request type of the queue pair information access request.

[0122] The step S404 of determining the allocated number of the transceiving queue pair under the target lock type.

[0123] The step S406 of allocating the access lock of the target lock type as the target lock type for the target sub access request in the case where the allocated number is less than the corresponding number threshold, and increasing the allocated number, and determining that the allocation of the access lock corresponding to the target sub access request is successful.

[0124] The step S408 of determining that the allocation of the access lock corresponding to the target sub access request fails in the case where the allocated number is equal to the corresponding number threshold.

[0125] The method for accessing the queue pair information of the transceiving queue pair provided in the application further includes the following steps.

[0126] The step S410 of reducing the allocated number of the transceiving queue pair under the lock type of the access lock of the target sub access request after generating the access response information of the target sub access request.

[0127] The request type of the queue pair information access request is used to represent the type of the access operation of the queue pair information access request, the access operation includes but is not limited to the read operation and the write operation, and the request type includes but is not limited to the read request corresponding to the read operation and the write request corresponding to the write operation; in a specific application, the queue pair information access request carries the corresponding request type, and the sub access request also carries the request type carried by the queue pair information access request in the splitting process of the queue pair information access request.

[0128] The access lock of different lock types needs to be allocated for the queue pair information access request of different request types, and the lock type includes but is not limited to the read lock corresponding to the read request and the write lock corresponding to the write request.

[0129] wherein, the target lock type is the lock type of the access lock to be allocated to the target sub-access request.

[0130] wherein, in the embodiment, the queue pair information management system configures a number threshold for each transceiver queue pair under different lock types, for constraining the number of locks that the transceiver queue pair can allocate under different lock types.

[0131] Further, in specific applications, the queue pair information management system records the allocated number of each transceiver queue pair under different lock types.

[0132] Specifically, the specific process of allocating the corresponding access lock for each target sub-access request is as follows:

[0133] Firstly, the scheduler determines the request type of the queue pair information access request to which the target sub-access request belongs, and determines the lock type of the access lock to be allocated to the target sub-access request based on the request type, to obtain the target lock type corresponding to the target sub-access request.

[0134] Referring to Figure 5 , the request scheduling queue further includes a lock allocation controller, and the number threshold and the allocated number of each transceiver queue pair under different lock types are recorded in the lock allocation controller.

[0135] After determining the target lock type of the target sub-access request, the lock allocation controller first determines the allocated number of the transceiver queue pair corresponding to the target sub-access request under the target lock type; if the allocated number is less than the number threshold of the transceiver queue pair corresponding to the target sub-access request under the target lock type, the target sub-access request is allocated an access lock with the target lock type, and the allocated number is increased, to determine that the allocation of the access lock corresponding to the target sub-access request is successful; if the allocated number is equal to the number threshold of the transceiver queue pair corresponding to the target sub-access request under the target lock type, it is determined that the allocation of the access lock corresponding to the target sub-access request fails.

[0136] For example, assuming that the queue pair information access request corresponding to the target sub-access request is a write request, the scheduler determines that a write lock needs to be allocated to the target sub-access request, and thus determines that the target lock type corresponding to the target sub-access request is a write lock; further assuming that the number threshold of the transceiver queue pair corresponding to the target sub-access request under the write lock is 99.

[0137] If the number of allocated write locks of the corresponding transceiving queue pair under the write lock is 80, which is less than the number threshold 99, the lock allocation controller allocates a write lock for the target sub-access request, and increases the number of allocated write locks by 1. After the target sub-access request successfully accesses the corresponding target information table, the write lock allocated for the target sub-access request is released, and the number of allocated write locks is decreased by 1.

[0138] If the number of allocated write locks of the corresponding transceiving queue pair under the write lock is 99, which is equal to the number threshold 99, the lock allocation controller determines that the allocation of the access lock corresponding to the target sub-access request fails, and informs the scheduler of the allocation failure. The scheduler rewrites the target sub-access request into the scheduling queue to which the target sub-access request originally belongs.

[0139] In the embodiment, by configuring the number threshold of each transceiving queue pair under different lock types by the lock allocation controller, and recording the number of allocated write locks of each transceiving queue pair under different lock types, it can be determined whether the corresponding access lock can be allocated for the target sub-access request. Based on the access lock, the order of the access operation on the queue pair information can be ensured, and the atomicity and cache consistency of the queue pair information are ensured.

[0140] In an exemplary embodiment, each information table corresponds to a plurality of scheduling queues.

[0141] The step S206 of writing each sub-access request into the corresponding scheduling queue specifically includes the following contents: for each sub-access request, determining the target scheduling queue of the sub-access request in the plurality of scheduling queues of the target information table corresponding to the sub-access request according to the hash value of the queue pair identifier of the transceiving queue pair; and writing the sub-access request into the target scheduling queue.

[0142] The queue pair identifier is information capable of uniquely identifying the transceiving queue pair. In specific applications, the queue pair information access request carries the queue pair identifier of the transceiving queue pair to which it is directed. In the splitting process of the queue pair information access request, the sub-access request also carries the request type carried by the queue pair information access request to which it belongs.

[0143] Specifically, the information table management module calculates the hash value of the queue pair identifier of the transceiving queue pair corresponding to each sub-access request according to the queue pair identifier and a hash function, and determines the target scheduling queue of the sub-access request in the plurality of scheduling queues of the target information table corresponding to the sub-access request according to the hash value, and then writes the sub-access request into the target scheduling queue.

[0144] In the embodiment, the information table management module can determine a target dispatch queue from a plurality of dispatch queues of a target information table corresponding to the sub access request according to a hash value of a queue pair identifier of a transceiving queue pair corresponding to the sub access request, so as to realize the writing of the sub access request.

[0145] In one exemplary embodiment, as shown in Figure 6 The step S204 of determining a plurality of target queue pair information to which the queue pair information access request is directed, and splitting the queue pair information access request into at least one sub access request based on the plurality of target queue pair information, specifically includes the following steps:

[0146] The step S502 of taking a request type of the queue pair information access request and an interface identifier of an interface sending the queue pair information access request as request information of the queue pair information access request.

[0147] The step S504 of determining a plurality of target queue pair information to which the queue pair information access request is directed based on the request information.

[0148] The step S506 of determining at least one target information table for storing each target queue pair information from a plurality of information tables pre-constructed based on the plurality of target queue pair information by querying a mapping relationship between the queue pair information and the information table pre-constructed.

[0149] The step S508 of splitting the queue pair information access request into sub access requests for each target information table.

[0150] The plurality of information tables pre-constructed are used for storing the queue pair information of each transceiving queue pair.

[0151] The interface identifier is information capable of uniquely identifying the interface.

[0152] The mapping relationship between the request information and the queue pair information is used for representing a mapping relationship between the request information of each queue pair information access request and the queue pair information to which the queue pair information access request is requested to access.

[0153] The mapping relationship between the queue pair information and the information table is used for representing a mapping relationship between each queue pair information and an information table storing the queue pair information.

[0154] Specifically, the request parsing module takes the request type of the queue pair information access request and the interface identifier of the interface sending the queue pair information access request as the request information of the queue pair information access request; then, the request parsing module determines the queue pair information that the queue pair information access request with the request information needs to access among the queue pair information based on the request information according to the mapping relationship between the request information and the queue pair information pre-constructed, and obtains the multiple target queue pair information to which the queue pair information access request is directed; next, the request parsing module determines the information table storing the target queue pair information among the multiple information tables based on the multiple target queue pair information according to the mapping relationship between the queue pair information and the information table pre-constructed, and thus obtains at least one target information table; finally, the request parsing module splits the queue pair information access request into at least one sub-access request based on the at least one target information table, each sub-access request corresponding to one target information table and being used to request to access the target queue pair information in the corresponding target information table.

[0155] In this embodiment, first, the request parsing module can determine which queue pair information the queue pair information access request with which request information needs to obtain according to the mapping relationship between the request information and the queue pair information pre-constructed, and thus obtains the multiple target queue pair information to which the queue pair information access request is directed; second, the request parsing module can determine in which information table each target queue pair information is stored according to the mapping relationship between the queue pair information and the information table pre-constructed, and thus obtains at least one target information table, and further can split the queue pair information access request into at least one sub-access request.

[0156] In one exemplary embodiment, there are multiple queue pair information access requests, each corresponding to one transceiving queue pair.

[0157] The method for accessing the queue pair information of the transceiving queue pair provided in the application further includes the following content: for each queue pair information access request, determining the request quantity of each sub-access request of the queue pair information access request; in the case where the information quantity of each access response information corresponding to the queue pair information access request reaches the request quantity, combining each access response information corresponding to the queue pair information access request to obtain the comprehensive access response information of the queue pair information access request.

[0158] The queue pair information access request carries a corresponding request identifier; the request identifier is information capable of uniquely identifying the queue pair information access request. In the splitting process of the queue pair information access request, the sub-access request also carries the request identifier carried by the queue pair information access request to which the sub-access request belongs.

[0159] The access response information corresponding to each information access request of the queue pair is access response information of each sub-access information of the information access request of the queue pair.

[0160] Specifically, there can be multiple information access requests of the queue pair in the queue pair information management system simultaneously; for each information access request of the queue pair, the request parsing module will determine the number of requests after splitting the information access request of the queue pair into at least one sub-access request, and then send the request identifier of the information access request of the queue pair and the number of requests to the response generation module.

[0161] The information table module sends the access response information to the response generation module after generating the access response information of each sub-access request; wherein the access response information carries the request identifier carried by the corresponding sub-access request.

[0162] Then, for each request identifier (the information access request of the queue pair to which it belongs), the response generation module counts the number of information corresponding to the access response information of the request identifier (the information access request of the queue pair to which it belongs), and in the case that the number of information corresponding to the request identifier (the information access request of the queue pair to which it belongs) reaches the number of requests corresponding to the request identifier (the information access request of the queue pair to which it belongs), it is indicated that each sub-access request of the information access request of the queue pair to which the request identifier belongs has completed the access operation, and therefore the comprehensive access response information of the information access request of the queue pair corresponding to the request identifier is obtained by combining the access response information corresponding to the request identifier (the information access request of the queue pair to which it belongs).

[0163] In this embodiment, the response generation module can determine whether each sub-access request of each information access request of the queue pair has completed the access operation based on the number of requests and the number of information corresponding to each information access request of the queue pair, and generate the comprehensive access response information in the case that each sub-access request has completed the access operation, thereby realizing the access response in the high-concurrency access scenario.

[0164] In an exemplary embodiment, the information table management module is divided into multiple sub-management modules, each sub-management module corresponding to an information table, for scheduling multiple dispatch queues of an information table, and each sub-access request corresponding to an information table is scheduled through the sub-management module corresponding to the information table.

[0165] In an exemplary embodiment, as shown in Figure 1 Another method for accessing the information of the queue pair is provided, which is applied to the queue pair information management system as shown in Figure 1 The method comprises the following steps:

[0166] Step S602, receiving multiple information access requests of the queue pair.

[0167] Step S604, determine the target queue pair information of each queue pair information access request based on the target queue pair information of each queue pair information access request.

[0168] Step S606, write the request type of each queue pair information access request and the interface identification of the interface sending each queue pair information access request as the request information of each queue pair information access request.

[0169] Step S608, based on the request information of each queue pair information access request, query the pre-constructed mapping relationship between the request information and the queue pair information, and determine the target queue pair information of each queue pair information access request.

[0170] Step S610, based on the target queue pair information of each queue pair information access request, query the pre-constructed mapping relationship between the queue pair information and the information table, and determine the target information table corresponding to each queue pair information access request.

[0171] Step S612, based on the target information table corresponding to each queue pair information access request, split each queue pair information access request into multiple sub-access requests.

[0172] Step S614, write each sub-access request into the target dispatch queue in the multiple dispatch queues of the corresponding target information table.

[0173] Step S616, perform queue scheduling processing on multiple target information tables concurrently, for each target information table, determine the to-be-scheduled queue in the multiple dispatch queues of the target information table, and allocate the corresponding access lock for the target sub-access request in the to-be-scheduled queue.

[0174] Step S618, for each target sub-access request, in the case that the target sub-access request corresponds to the access lock allocation success, send the target sub-access request to the corresponding target information table to access the target queue pair information in the target information table, and generate the access response information of the sub-access request.

[0175] Step S620, for each target sub-access request, in the case that the target sub-access request corresponds to the access lock allocation failure, write the target sub-access request into the to-be-scheduled queue again.

[0176] Step S622, for each queue pair information access request, in the case that the information quantity of each access response information corresponding to the queue pair information access request reaches the request quantity of each sub-access request of the queue pair information access request, combine each access response information corresponding to the queue pair information access request to obtain the comprehensive access response information of the queue pair information access request.

[0177] Step S624: Return the comprehensive access response information of each queue to the sender of each queue's information access request.

[0178] In this embodiment, by assigning a corresponding access lock to each sub-access request of the queue access request, and sending each sub-access request to the corresponding target information table based on the access lock of each sub-access request, the target queue accesses the information corresponding to each sub-access request. This ensures the orderliness of the access operation to the queue based on the access lock, thereby ensuring the atomicity of the queue access to the information and the consistency of the cache.

[0179] To more clearly illustrate the method for accessing queue pair information of send / receive queues provided in the embodiments of this application, the following specific embodiment is used to describe the method for accessing queue pair information of send / receive queues. However, it should be understood that the embodiments of this application are not limited thereto. In one exemplary embodiment, this application also provides a high-concurrency access control method for RDMA based on distributed locks, which is applied to... Figure 1 The queue-based information management system shown includes the following:

[0180] The queue information management system mainly consists of four sub-modules, see below. Figure 7 These are the request parsing module, the information table management module, the information table module, and the response generation module.

[0181] The request parsing module is primarily used to receive and parse QPC read / write requests. It handles QPC read / write requests sent from interfaces in both the sending and receiving directions of data packets. These interfaces include, but are not limited to, sending and receiving interfaces. The request parsing module determines the required QPC parameters for each request based on the input interface and request type. It then breaks down a single read / write request into several concurrent sub-requests and sends them to the information table management module, which contains the required QPC parameters, for further processing.

[0182] The Information Table Management Module is primarily responsible for caching, scheduling, and concurrent access control of read and write requests for QPC tables. It consists of a scheduling input queue, a scheduling output queue, a scheduler, and a lock allocation controller for concurrent access control. The lock allocation controller is responsible for allocating and releasing read and write locks for each QP; each QPC table has its own lock allocation controller. For each sub-request, a lock must be acquired before it can be forwarded to the corresponding QPC table for parameter reading and writing, ensuring atomicity and cache consistency. If a sub-request fails to acquire a read and write lock, the scheduler will add the sub-request back to the tail of the corresponding scheduling input queue, waiting for the next scheduling cycle.

[0183] Information table module: mainly used to cache QPC parameters and responsible for the read and write operation of QPC parameters. There are multiple QPC tables in the information table module, and the QPC parameters cached by each QPC table are different.

[0184] Response generation module: mainly responsible for integrating the read and write responses returned by each QPC table to generate a comprehensive response and return it to the sender of the read and write request.

[0185] In this embodiment, the RDMA high-concurrency access control method based on distributed lock includes the following steps:

[0186] Step 1: The request parsing module receives the QPC request and stores it in the request cache queue.

[0187] Step 2: The request parsing module takes out a QPC request from the request cache queue, judges the QPC parameters required for processing the QPC request according to the interface ID (Module ID) of the interface sending the QPC request and the request type (Req type) of the QPC request, decomposes it into QPC sub-requests for several QPC tables, and sends it to the information table management module of the corresponding QPC table.

[0188] Step 3: The request parsing module sends the request information of the currently processed QPC request to the response generation module, and the request information includes but is not limited to Module ID, Req ID (QPC request ID), Req_type, and QPN (ID of the QP corresponding to the QPC request). The response generation module will cache the request information through Req ID, and will record how many read and write responses of the QPC table the currently processed QPC request needs to wait according to Req_type. When the response generation module receives each read and write response of the QPC request, it generates a combined comprehensive response and returns the comprehensive response according to Module ID.

[0189] At the same time as step 3 above, the following steps are also included:

[0190] Step 4: The information table management module obtains the QueueID of the scheduling queue based on the hash function according to the QPN of the QPC request, wherein Queue ID=Hash(QPN), and then writes the QPC request and its request information into the corresponding scheduling queue.

[0191] Step 5: The scheduler of the information table management module reads the head request of the to-be-processed queue according to the scheduling algorithm, sends the request information of the head request to the lock allocation controller to obtain the read and write lock of the QPC sub-request, so as to judge whether the current QPC sub-request can be dispatched. In addition, the scheduling algorithm of the scheduler is configurable, including but not limited to RR round-robin scheduling, WRR weighted round-robin scheduling and other algorithms.

[0192] Step 6: After receiving the request for acquiring the lock, the lock distribution controller checks the corresponding lock table according to the QPN to see if the lock can be distributed to the QPC sub-request. In the lock table, each QPN contains RD_Lock_Num parameter and WR_Lock_Num parameter, which represent the number of read locks and write locks that have been distributed to the QPN respectively, and their initial values are 0. At the same time, the lock table also contains MAX_RD_LOCK parameter and MAX_WR_LOCK parameter, which represent the maximum number of read locks and write locks that can be distributed to the QPN respectively.

[0193] The basic steps of determining whether each QPN can be distributed with a lock are as follows:

[0194] Step 6.1: Determine whether the QPC sub-request is a read request or a write request according to Req_Type. If it is a read request, go to step 6.2; if it is a write request, go to step 6.3.

[0195] Step 6.2: Read the WR_Lock_Num parameter of the QPN according to the QPN. If WR_Lock_Num is less than MAX_WR_LOCK, a write lock can be distributed to the QPN, WR_Lock_Num is incremented by 1, and a lock success response is sent to the scheduler; if WR_Lock_Num is equal to MAX_WR_LOCK, the QPN has reached the maximum number of write locks that can be distributed, and a lock failure response is returned to the scheduler.

[0196] Step 6.3: Read the RD_Lock_Num parameter of the QPN according to the QPN. If RD_Lock_Num is less than MAX_RD_LOCK, a read lock can be distributed to the QPN, RD_Lock_Num is incremented by 1, and a lock success response is sent to the scheduler; if RD_Lock_Num is equal to MAX_RD_LOCK, the QPN has reached the maximum number of read locks that can be distributed, and a lock failure response is returned to the scheduler.

[0197] Step 7: The scheduler receives the lock request response from the lock distribution controller. If the lock is successful, the currently processed QPC sub-request is forwarded to the corresponding QPC table for processing, and goes to step 8; if the lock fails, the QPC sub-request and its request information are re-added to the scheduling queue corresponding to the QPN, and wait for the next scheduling, and go to step 5.

[0198] Step 8: QPC table judges the request type of the QPC sub-request according to the Req type. If it is a write request, the relevant QPC parameters of the corresponding QP are updated according to the QPN; if it is a read request, the relevant QPC parameters of the corresponding QP are read according to the QPN. After the QPC sub-request is processed, the QPC table generates a read-write response and sends it to the response generation module, and goes to step 10; at the same time, the QPC table sends a read-write lock release request of the QPN to the information table management module, and the request carries the QPN and the Req Type, and goes to step 9.

[0199] Step 9: The lock allocation controller receives the read-write lock release request of the QPC table, updates the lock table according to the QPN and the Req type carried by the read-write lock release request, and releases the allocated read-write lock. The basic steps of releasing the read-write lock are as follows:

[0200] Step 9.1: The lock allocation controller reads the lock table according to the QPN, and judges whether the current released lock is a read lock or a write lock according to the Req type.

[0201] Step 9.2: If it is a read lock, the RD_Lock_Num parameter corresponding to the QPN is reduced by 1, and the processing is ended.

[0202] Step 9.3: If it is a write lock, the WR_Lock_Num parameter corresponding to the QPN is reduced by 1, and the processing is ended.

[0203] Step 10: After the response generation module receives the read-write response of the QPC table, it judges whether all the read-write responses of the QPC table have been received through the Req ID. If so, the response generation module generates a combined comprehensive response, returns the comprehensive response according to the Module ID, and then deletes the cached request information of the Req ID. If not, step 10 is repeated to continue waiting for all the read-write responses of the QPC table to be received.

[0204] In this embodiment, first, the QPC parameter is maintained based on the QPC read-write scenario table, the information table management module is designed based on each QPC table, and the read-write lock distribution is maintained for each QPC table. This can not only guarantee the consistency requirement of concurrent reading and writing of different parameters, but also has good scalability. Second, the distribution of read-write locks is maintained based on QPN, which guarantees that the QPC parameters of the transmitted data packets and the received data packets of the same QP are updated in accordance with the global order, thereby guaranteeing the atomicity of reading and writing of the same QPC parameter. In addition, for the same QPN, the number of read-write locks allocated to the same QPN is controlled through the RD_LOCK_NUM parameter and the WR_LOCK_NUM parameter, which can effectively improve the reading and writing concurrency of the same QPN. At the same time, the distribution of read-write locks does not affect each other between different QPNs, which greatly improves the concurrency between different QPNs. Third, the QPC request is decomposed into QPC sub-requests of several QPC tables through the request analysis module, and the read-write response requests of different QPC tables are combined into a comprehensive response through the response generation module, which is returned. This mode can concurrently access different QPC tables for different QPC requests, improve the reading and writing efficiency of QPC, and shorten the processing delay of QPC request.

[0205] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.

[0206] Based on the same inventive concept, the embodiments of the present application also provide a transceiving queue pair queue pair information access device for implementing the transceiving queue pair queue pair information access method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more transceiving queue pair queue pair information access device embodiments provided below can refer to the limitations of the transceiving queue pair queue pair information access method in the above text, which will not be described here.

[0207] In one exemplary embodiment, as Figure 8As shown, an access device of a transceiving queue pair to queue pair information is provided, comprising: a request receiving module 702, a request splitting module 704, a request writing module 706, an information accessing module 708 and an information returning module 710, wherein:

[0208] The request receiving module 702 is configured to receive a queue pair information access request for a transceiving queue pair.

[0209] The request splitting module 704 is configured to determine a plurality of target queue pair information to which the queue pair information access request is directed, split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, and each sub-access request corresponds to a target information table, and each target information table stores at least one target queue pair information.

[0210] The request writing module 706 is configured to write each sub-access request to a corresponding dispatch queue.

[0211] The information accessing module 708 is configured to assign a corresponding access lock for each sub-access request based on the dispatch of the plurality of dispatch queues, send each sub-access request to the corresponding target information table based on the access lock of each sub-access request, access the target queue pair information in the target information table corresponding to each sub-access request, and generate an access response information of each sub-access request.

[0212] The information returning module 710 is configured to return a comprehensive access response information of the queue pair information access request to the sender of the queue pair information access request; the comprehensive access response information comprises the access response information of each sub-access request.

[0213] In an exemplary embodiment, each target information table corresponds to a plurality of dispatch queues, and each dispatch queue to which each sub-access request is written is a target dispatch queue of the sub-access request in the plurality of dispatch queues of the corresponding target information table.

[0214] The information accessing module 708 is further configured to concurrently perform queue dispatch processing on each target information table, determine a to-be-dispatched queue in the plurality of dispatch queues of each target information table, and assign a corresponding access lock for a target sub-access request in the to-be-dispatched queue; the target sub-access request is a sub-access request located at the head of the to-be-dispatched queue; in a case where the assignment of the access lock corresponding to the target sub-access request succeeds, the target sub-access request is sent to the corresponding target information table; in a case where the assignment of the access lock corresponding to the target sub-access request fails, the target sub-access request is written to the to-be-dispatched queue again.

[0215] In an example embodiment, the information access module 708 is further configured to determine, based on the request type of the queue pair information access request, a target lock type corresponding to the target sub-access request; determine, by the transceiving queue pair, an allocated number under the target lock type; in a case where the allocated number is less than a corresponding number threshold, allocate, for the target sub-access request, an access lock of the target lock type, and increase the allocated number, to determine that the target sub-access request succeeds in the allocation of the access lock; and in a case where the allocated number is equal to the corresponding number threshold, determine that the target sub-access request fails in the allocation of the access lock.

[0216] In an example embodiment, the information access module 708 is further configured to, after generating the access response information of the target sub-access request, decrease, by the transceiving queue pair, the allocated number under the lock type of the access lock of the target sub-access request.

[0217] In an example embodiment, each information table corresponds to a plurality of scheduling queues.

[0218] The request writing module 706 is further configured to, for each sub-access request, determine, according to the hash value of the queue pair identifier of the transceiving queue pair, a target scheduling queue of the sub-access request in the plurality of scheduling queues of the target information table corresponding to the sub-access request; and write the sub-access request into the target scheduling queue.

[0219] In an example embodiment, the request splitting module 704 is further configured to take, as the request information of the queue pair information access request, the request type of the queue pair information access request and the interface identifier of the interface of the sending queue pair information access request; based on the request information, query a pre-constructed mapping relationship between the request information and the queue pair information, to determine a plurality of target queue pair information to which the queue pair information access request is directed; based on the plurality of target queue pair information, query a pre-constructed mapping relationship between the queue pair information and the information table, to determine, in a plurality of pre-constructed information tables, at least one target information table for storing each target queue pair information; the plurality of pre-constructed information tables are used to store the queue pair information of each transceiving queue pair; and split the queue pair information access request into sub-access requests directed to each target information table.

[0220] In an example embodiment, there are a plurality of queue pair information access requests, and each queue pair information access request corresponds to one transceiving queue pair.

[0221] The information returning module 710 is further configured to, for each queue pair information access request, determine the request quantity of each sub-access request of the queue pair information access request; and in a case where the information quantity of each access response information corresponding to the queue pair information access request reaches the request quantity, combine each access response information corresponding to the queue pair information access request to obtain comprehensive access response information of the queue pair information access request.

[0222] Each module in the access device of the queue pair information of the above-mentioned transceiving queue pair can be implemented by software, hardware and a combination thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.

[0223] In an exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store the queue pair information of each transceiving queue pair. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with terminals outside through a network connection. The computer program is executed by the processor to implement a method for accessing the queue pair information of a transceiving queue pair.

[0224] Those skilled in the art can understand that ​ The structure shown in the above-mentioned figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0225] In an exemplary embodiment, a computer device is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.

[0226] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned method embodiments.

[0227] In an exemplary embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned method embodiments.

[0228] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0229] The technical features of the above embodiments can be combined in any manner. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0230] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method of accessing queue pair information of a transmit queue pair and a receive queue pair, characterized by, The method comprises: receiving a queue pair information access request for a transceiving queue pair; determining a plurality of target queue pair information to which the queue pair information access request is directed, splitting the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information, each sub-access request corresponding to a target information table, and each target information table storing at least one target queue pair information; writing each sub-access request to a corresponding dispatch queue; allocating a corresponding access lock for each sub-access request based on dispatching of a plurality of dispatch queues, sending the each sub-access request to a corresponding target information table based on the access lock of the each sub-access request, accessing the target queue pair information in the target information table corresponding to the each sub-access request, and generating access response information of the each sub-access request; returning comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request; the comprehensive access response information comprises access response information of each sub-access request.

2. The method of claim 1, wherein, Each target information table corresponds to a plurality of dispatch queues, and a target dispatch queue of the sub-access request in the plurality of dispatch queues of the corresponding target information table is written by each sub-access request; The method further comprises: concurrently performing queue dispatch processing on each target information table, determining a to-be-dispatched queue in the plurality of dispatch queues of each target information table, and allocating a corresponding access lock for a target sub-access request in the to-be-dispatched queue; the target sub-access request is a sub-access request located at the head of the to-be-dispatched queue; in a case where the target sub-access request corresponds to a successfully allocated access lock, sending the target sub-access request to the corresponding target information table; in a case where the target sub-access request corresponds to a failed allocated access lock, re-writing the target sub-access request to the to-be-dispatched queue.

3. The method of claim 2, wherein, The method further comprises: determining a target lock type corresponding to the target sub-access request based on a request type of the queue pair information access request; determining an allocated number of the transceiving queue pair under the target lock type; in a case where the allocated number is less than a corresponding number threshold, allocating an access lock of the target lock type for the target sub-access request, increasing the allocated number, and determining that the target sub-access request corresponds to a successfully allocated access lock; in a case where the allocated number is equal to the corresponding number threshold, determining that the target sub-access request corresponds to a failed allocated access lock; The method further comprises: after generating the access response information of the target sub-access request, reducing the allocated number of the transceiving queue pair under the lock type of the access lock of the target sub-access request.

4. The method of claim 1, wherein, Each information table corresponds to a plurality of dispatch queues. The writing of each sub-access request into a corresponding dispatch queue comprises: For each sub-access request, determining a target dispatch queue of the sub-access request from a plurality of dispatch queues of a target information table corresponding to the sub-access request according to a hash value of a queue pair identification of the transceiving queue pair; Writing the sub-access request into the target dispatch queue.

5. The method according to any one of claims 1 to 4, characterized in that, The splitting of the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information comprises: Taking a request type of the queue pair information access request and an interface identification of an interface sending the queue pair information access request as request information of the queue pair information access request; Determining the plurality of target queue pair information to which the queue pair information access request is directed based on the request information; Based on the plurality of target queue pair information, querying a pre-constructed mapping relationship between queue pair information and information tables, and determining at least one target information table for storing each target queue pair information from a plurality of pre-constructed information tables; the plurality of pre-constructed information tables are used to store queue pair information of each transceiving queue pair; Splitting the queue pair information access request into sub-access requests for each target information table.

6. The method according to any one of claims 1 to 4, characterized in that, The queue pair information access request is a plurality of, each queue pair information access request corresponds to a transceiving queue pair; The method further comprises: For each queue pair information access request, determining the number of requests of each sub-access request of the queue pair information access request; In a case where the number of information of each access response information corresponding to the queue pair information access request reaches the number of requests, combining each access response information corresponding to the queue pair information access request to obtain comprehensive access response information of the queue pair information access request.

7. An access device for receiving and sending queue pair information, characterized in that, The device comprises: A request receiving module configured to receive a queue pair information access request for a transceiving queue pair; A request splitting module configured to determine a plurality of target queue pair information to which the queue pair information access request is directed, and split the queue pair information access request into at least one sub-access request based on the plurality of target queue pair information; each sub-access request corresponds to a target information table, and each target information table stores at least one target queue pair information; A request writing module configured to write each sub-access request into a corresponding dispatch queue; An information accessing module configured to allocate a corresponding access lock for each sub-access request based on dispatching of a plurality of dispatch queues, and send the each sub-access request to a corresponding target information table based on the access lock of the each sub-access request, so as to access target queue pair information in the target information table corresponding to the each sub-access request, and generate access response information of the each sub-access request; An information returning module configured to return comprehensive access response information of the queue pair information access request to a sender of the queue pair information access request; the comprehensive access response information comprises access response information of the each sub-access request.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • High-concurrency request asynchronous processing method, device, computer equipment and storage medium

    CN110532111A

  • Distributed concurrent request processing method and device

    CN118331729A