A prp linked list processing method, system, device and medium

CN117743207BActive Publication Date: 2026-09-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311622955.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2026-09-22
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提出了一种PRP链表处理方法、系统、设备及介质,针对当前PRP链表处理模块存在的性能不足问题,根据不同模式的处理时间进行流水拆分,同时将重排序方法与流水设计相结合,提高并行程度,简化了硬件实现,具有较强的工程价值和实用价值

Benefits of technology

[0046]本发明提出了一种PRP链表处理方法、系统、设备及介质,方法包括:获取PRP链表任务,将PRP链表任务存到预缓冲区中,作为待处理数据;检测若干预设通道是否空闲,对检测到的空闲通道进行轮询仲裁,将待处理数据分配到仲裁到的对应通道中,并将仲裁结果写入起始缓存中;判断待处理数据的工作模式,根据工作模式选择执行待处理数据的流程,将执行结果写入对应的工作缓存中,将所有工作缓存中的数据个数写入结束缓存中;根据起始缓存和结束缓存中的数据对应的顺序输出工作缓存中的执行结果。本发明通过将PRP链表正常处理和异常处理、重试处理的细粒度划分,便于进行综合处理。使用流水和重排序相结合的方法,针对PRP链表处理设计出了最优方案,既能保证该处理性能,又能保障输出数据顺序。可以通过控制实例化通道数,在提高性能和减小面积之间灵活取舍,变更通道数带来的工作量很小,具有很强的灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117743207B_ABST
    Figure CN117743207B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing, and proposes a PRP linked list processing method, system, device and medium, the method comprising: storing a task into a pre-buffer as to-be-processed data; distributing the to-be-processed data to a corresponding channel arbitrated, and writing the arbitration result into a start cache; selecting a flow to execute the to-be-processed data according to a working mode, writing the execution result into a corresponding working cache, and writing the number of data in all working caches into an end cache; and outputting the execution result in the working cache according to the corresponding sequence of data in the start cache and the end cache. The present application uses a combination of pipelining and reordering to ensure processing performance and output data sequence. The number of instantiated channels can be controlled to flexibly trade off between performance improvement and area reduction, and the workload brought by changing the number of channels is very small, which has strong flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and more particularly to a PRP linked list processing method, system, device, and medium. Background Technology

[0002] The Non-Volatile Memory Host Controller Interface (NVMe) specification is a communication standard specifically designed for accessing non-volatile memory media attached via the PCIe bus. The NVMe protocol, combined with the PCIe protocol, leverages the parallel capabilities of solid-state drives (SSDs) to improve NAND read and write speeds, enabling faster non-volatile storage.

[0003] The NVMe protocol organizes memory pages into linked lists, accessing each PRP (Physical Region Page) linked list through an entry address. Current PRP memory allocation methods fragment memory into smallest units, then organize these units into a PRP list. Alternatively, there's a method using SGL (Simplified Group Memory) management, which can map to physical spaces of arbitrary size, but this is more complex.

[0004] However, there are performance issues when managing the PRP linked list. A large number of serial processing operations occupy most of the pipeline time, resulting in low performance. If all the data to be processed within a certain period of time is of the same type, then only one processing path can be followed. In reality, only multi-stage pipeline processing is implemented, while other channels are idle and wasted, significantly reducing task processing efficiency. Summary of the Invention

[0005] In view of this, the present invention proposes a PRP linked list processing method, system, device and medium. It addresses the performance deficiencies of current PRP linked list processing modules by performing pipelined decomposition based on the processing time of different modes, and combines reordering methods with pipelined design to improve parallelism and simplify hardware implementation, thus possessing strong engineering and practical value.

[0006] To achieve the above objectives, one aspect of the present invention provides a PRP linked list processing method, specifically including the following steps:

[0007] Retrieve PRP linked list tasks and store them in a pre-buffer as data to be processed.

[0008] The system detects whether several preset channels are idle, polls and arbitrates the detected idle channels, allocates the data to be processed to the corresponding arbitrated channel, and writes the arbitration result into the starting buffer.

[0009] Determine the working mode of the data to be processed, select the process to execute the data to be processed according to the working mode, write the execution result into the corresponding working cache, and write the data count in all working caches into the end cache;

[0010] The execution results in the working cache are output according to the order of the data in the starting cache and the ending cache.

[0011] In some embodiments, the step of obtaining the PRP linked list task and storing the PRP linked list task in a pre-buffer as data to be processed includes:

[0012] Obtain the PRP linked list tasks and parse the storage location of the PRP linked list tasks;

[0013] Retrieve PRP chain list task information from the PRP chain list task queue pointed to by the storage location, and store the PRP chain list task information in the pre-buffer as data to be processed and awaiting call.

[0014] In some embodiments, the steps of determining the working mode of the data to be processed, selecting the process to execute the data to be processed according to the working mode, writing the execution result into the corresponding working cache, and writing the data counts in all working caches into the end cache include:

[0015] Determine the working mode of the data to be processed and group it according to the working mode;

[0016] The process of selecting and executing data to be processed based on grouping;

[0017] The status of the task is periodically checked during the process execution;

[0018] If the task proceeds normally, select "Create Process" to create a process for the data to be processed.

[0019] In response to an exception in task assignment or an exception during task execution, the exception handling procedure is selected to interrupt the task or report the event to the host.

[0020] In response to insufficient index values ​​in the memory index pool or other preset events, a retry process is initiated, and a retry request is reported.

[0021] After the process is completed, the execution result is written to the corresponding working cache;

[0022] Write the total number of data items in the working cache to the ending cache.

[0023] In some embodiments, the step of determining the working mode of the data to be processed includes:

[0024] In response to the working mode of creating an empty linked list, the structure of the PRP linked list is created;

[0025] In response to the working mode of creating a new linked list, memory space is allocated and the PRP linked list is constructed.

[0026] In response to the working mode of creating an extended linked list, the space size of the existing PRP linked list is obtained, and the space size is extended based on the original PRP linked list according to the task requirements.

[0027] In response to the working mode of creating a populated linked list, the index information of an existing PRP linked list is obtained, and invalid index values ​​are replaced with newly created index values ​​without changing the structure of the original PRP linked list.

[0028] In some embodiments, each of a plurality of preset channels is used to process all working modes.

[0029] In some embodiments, the step of outputting the execution results in the working cache according to the order of the data in the start cache and the end cache includes:

[0030] Obtain the input order of the data to be processed in the starting buffer, the number of data in the ending buffer, and reorder them based on these to generate the data output order;

[0031] Select the execution result from the working cache corresponding to the channel based on the data output order;

[0032] If the working buffer corresponding to the channel is empty, determine whether to wait based on the data output order;

[0033] If the result is yes, then wait until it is not empty.

[0034] In some embodiments, the method further includes:

[0035] Simulations were performed based on the working time and number of channels corresponding to different working modes to obtain simulation results;

[0036] Set the number of channels based on the simulation results.

[0037] This invention proposes a PRP linked list processing system, comprising:

[0038] The acquisition unit is configured to acquire PRP linked list tasks and store the PRP linked list tasks in a pre-buffer as data to be processed.

[0039] The channel unit is configured to detect whether several preset channels are idle, poll and arbitrate the detected idle channels, allocate the data to be processed to the corresponding channel that has been arbitrated, and write the arbitration result into the starting buffer.

[0040] The process unit is configured to determine the working mode of the data to be processed, select the process to execute the data to be processed according to the working mode, write the execution result into the corresponding working cache, and write the data count in all working caches into the end cache.

[0041] The output unit is configured to output the execution results in the working cache according to the order of the data in the start cache and end cache.

[0042] This invention proposes a computer device, comprising:

[0043] At least one processor; and a memory storing a computer program executable on the processor, wherein the processor executes the steps of the PRP linked list processing method when executing the program.

[0044] The present invention proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the PRP linked list processing method.

[0045] The present invention has at least the following beneficial technical effects:

[0046] This invention proposes a PRP linked list processing method, system, device, and medium. The method includes: acquiring PRP linked list tasks and storing them in a pre-buffer as data to be processed; detecting whether several preset channels are idle, polling and arbitrating the detected idle channels, allocating the data to be processed to the corresponding arbitrated channel, and writing the arbitration result into a start buffer; determining the working mode of the data to be processed, selecting the process to execute the data according to the working mode, writing the execution result into the corresponding working buffer, and writing the number of data items in all working buffers into an end buffer; and outputting the execution results in the working buffers according to the order of the data in the start and end buffers. This invention facilitates comprehensive processing by finely dividing PRP linked list processing into normal processing, exception processing, and retry processing. It uses a combination of pipelining and reordering to design an optimal solution for PRP linked list processing, ensuring both processing performance and output data order. By controlling the number of instantiated channels, a flexible trade-off can be made between improving performance and reducing area; changing the number of channels involves minimal workload and offers high flexibility. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0048] Figure 1 A flowchart of a PRP linked list processing method provided by the present invention;

[0049] Figure 2 A module diagram of a PRP linked list processing system provided by the present invention;

[0050] Figure 3 Existing techniques for PRP linked list processing methods Figure 1 ;

[0051] Figure 4 Existing techniques for PRP linked list processing methods Figure 2 ;

[0052] Figure 5 Existing techniques for PRP linked list processing methods Figure 3 ;

[0053] Figure 6 Existing techniques for PRP linked list processing methods Figure 4 ;

[0054] Figure 7 An optimized process flow 1 is provided as an embodiment of the PRP linked list processing method of the present invention;

[0055] Figure 8 A flowchart illustrating an embodiment of a PRP linked list processing method provided by the present invention;

[0056] Figure 9 Timing analysis of an embodiment of the PRP linked list processing method provided by the present invention Figure 1 ;

[0057] Figure 10 Timing analysis of an embodiment of the PRP linked list processing method provided by the present invention Figure 2 ;

[0058] Figure 11 This is a channel flowchart of an embodiment of a PRP linked list processing method provided by the present invention;

[0059] Figure 12 A schematic diagram of the structure of an embodiment of the computer device provided by the present invention;

[0060] Figure 13 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0062] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.

[0063] This invention proposes a method for processing PRP linked lists; please refer to [link to relevant documentation]. Figure 1 ,include,

[0064] S1: Obtain the PRP linked list tasks and store them in the pre-buffer as data to be processed;

[0065] S2: Detect whether several preset channels are idle, poll and arbitrate the detected idle channels, allocate the data to be processed to the corresponding arbitrated channel, and write the arbitration result into the starting buffer;

[0066] S3: Determine the working mode of the data to be processed, select the process to execute the data to be processed according to the working mode, write the execution result into the corresponding working cache, and write the data count in all working caches into the end cache;

[0067] S4: Output the execution results in the working cache according to the order of the data in the start cache and end cache.

[0068] This invention provides a fine-grained division of PRP linked list processing into normal processing, abnormal processing, and retry processing, which facilitates comprehensive processing.

[0069] By combining pipelining and reordering, an optimal solution was designed for PRP linked list processing, which can guarantee both processing performance and the order of output data.

[0070] The final solution has identical multi-channel configurations. By controlling the number of instantiated channels, a flexible trade-off can be made between improving performance (increasing the number of channels) and reducing area (reducing the number of channels). Changing the number of channels involves very little work, and multiple simulations and trials can be conducted to achieve optimal PPA.

[0071] Assume the latency of each stage of single task execution is as follows:

[0072] prefech, i.e., the task decoding unit in the existing public method: latencyprefetch = T1;

[0073] Arbitrator, polling arbitration unit: latencyarbitor = T2 (time consumption is minimal and negligible);

[0074] checker, necessary task judgment and check: latencychecker = T3;

[0075] executor, the process of creating the PRP linked list for task execution: latencyexecutor = T4;

[0076] MUX, perform reordering: latencyMUX = T5 (time consumption is minimal and can be ignored);

[0077] The finisher provides a notification that the task is completed: latencyfinisher=T6;

[0078] In the methods provided by existing patents, such as Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, the task processing time of the distribution engine is Latencypre = T3 + T4 + T6. In its patent, the task decoding unit and the distribution engine process in a pipelined manner, so the task processing time of the existing patent is roughly estimated as Latencypre. When multiple tasks are executed, their processing time accumulates exponentially. For example, the processing time for 4 tasks is 4 * Latencypre.

[0079] Compared to the channel-based multi-stage pipelined processing scheme proposed in this method, where task execution is divided into multiple stages of pipelined processing, the task processing time is the maximum value of the latency of each stage pipeline (e.g., the latency executor is the largest). Therefore, the single-channel task processing time in this method is the latency executor, which is much lower than the latency pre. Furthermore, the multi-channel processing scheme will further reduce the multi-task processing time; for example, the processing time for four tasks can be estimated as the latency pre.

[0080] As analyzed in the example above, the PRP linked list processing scheme based on channel allocation utilizes a multi-stage pipeline and reordering scheme to improve performance. After applying this scheme, the PRP linked list processing time depends only on the longest path in the multi-stage processing, maximizing the processing efficiency of the PRP linked list and achieving a performance optimization rate of over 50%.

[0081] This invention presents a PRP linked list processing scheme based on channel allocation, decoupling parallel processing channels from the PRP linked list model. Regardless of how tasks are distributed, the arbitor module first checks whether channels ch0-ch3 are busy. If there are idle channels, ch0-ch3 are polled and arbitrated, and data is allocated to the arbitrated channel. Simultaneously, the arbitration result is written to origin_buf; this achieves maximum processing parallelism. The channel-based allocation processing scheme significantly improves the scalability of parallel processing.

[0082] In some embodiments, please refer to Figure 1 and Figure 5 The step of obtaining the PRP linked list task and storing the PRP linked list task in the pre-buffer as data to be processed includes:

[0083] Obtain the PRP linked list tasks and parse the storage location of the PRP linked list tasks;

[0084] Retrieve PRP list task information from the PRP list task queue pointed to by the storage location, and store the PRP list task information in the pre-buffer as pending data to be called.

[0085] Reference Figure 5 As shown, the method in this embodiment can also be implemented through a task decoding unit and a distribution engine. When there is an available task, the storage location of the current task is parsed and obtained, the current task information is obtained from the task queue pool, and the task information is sent to the distribution engine. The task decoding unit will immediately obtain and parse the storage location of the current task when there is an available task, obtain the current task information from the task queue pool, and provide it to the distribution engine for use.

[0086] The distribution engine retrieves index values ​​from the memory index pool based on the current task requirements, constructs a PRP linked list, and stores the constructed PRP linked list in the PRP list storage pool. A notification is issued upon task completion. The task decoding unit and the distribution engine exchange data via a valid-ready handshake. Upon receiving the data, the distribution engine performs a series of sequential operations according to the requirements of the constructed PRP linked list until a task completion notification is issued. Then, it again uses a valid-ready handshake to obtain information about the next task from the task decoding unit. Under the task processing ordering requirement, the order in which task completion notifications are issued must be the same as the order in which the corresponding tasks were issued.

[0087] The order preservation function is achieved by serially building a linked list by the distribution engine, and the valid-ready handshake between the distribution engine and the task decoding unit improves hardware utilization to a certain extent.

[0088] Once the data arrives, it is first prefetched by the prefetch module and stored in the pre_buffer to await calls from subsequent sub-modules.

[0089] In some embodiments, please refer to Figure 1 , Figure 8 and Figure 11 The steps of determining the working mode of the data to be processed, selecting the process to execute the data to be processed according to the working mode, writing the execution result into the corresponding working cache, and writing the number of data items in all working caches into the end cache include:

[0090] Determine the working mode of the data to be processed and group it according to the working mode;

[0091] The process of selecting and executing data to be processed based on grouping;

[0092] The status of the task is periodically checked during the process execution;

[0093] If the task proceeds normally, select "Create Process" to create a process for the data to be processed.

[0094] In response to an exception in task assignment or an exception during task execution, the exception handling procedure is selected to interrupt the task or report the event to the host.

[0095] In response to insufficient index values ​​in the memory index pool or other preset events, a retry process is initiated, and a retry request is reported.

[0096] After the process is completed, the execution result is written to the corresponding working cache;

[0097] Write the total number of data items in the working cache to the ending cache.

[0098] like Figure 11 As shown, tasks are split according to the RPP linked list pattern and further split into fine-grained parts in the executor based on the task execution flow. Therefore, theoretically, tasks of four different patterns can be processed in parallel, and the task execution efficiency is relatively fast. The order preservation problem is solved by the reordering method, which greatly improves the processing efficiency of the PRP linked list.

[0099] In this embodiment, the distribution engine is subjected to multi-stage pipeline processing, which is divided into three-stage pipeline processing modules including checker, executor and finisher. The pipeline is cached using buf between each stage of processing modules.

[0100] Special situations (errors or retries) that occur during task processing are considered special working modes. Based on the task situation, the executor is further decomposed into three types: retry, error, and normal.

[0101] To ensure the data order preservation function is implemented correctly, a reordering module needs to be added after the pipeline is added to ensure that the order of the inlet and outlet data is consistent.

[0102] like Figure 8As shown, the executor has three execution branches: normal, error, and retry. Any task, after being judged by the checker, is categorized into one of these execution flows. The normal flow is the normal creation flow under the corresponding PRP linked list type. When an exception occurs during task issuance or execution, the error flow is initiated, reporting to the host via interruption or event. When the memory index pool index value is insufficient or other situations arise, the retry flow is initiated, reporting a retry request. After the flow execution is complete, the result is written to ch0_buffer.

[0103] In some embodiments, please refer to Figure 1 and Figure 11 The step of determining the working mode of the data to be processed includes:

[0104] In response to the working mode of creating an empty linked list, the structure of the PRP linked list is created;

[0105] In response to the working mode of creating a new linked list, memory space is allocated and the PRP linked list is constructed.

[0106] In response to the working mode of creating an extended linked list, the space size of the existing PRP linked list is obtained, and the space size is extended based on the original PRP linked list according to the task requirements.

[0107] In response to the working mode of creating a populated linked list, the index information of an existing PRP linked list is obtained, and invalid index values ​​are replaced with newly created index values ​​without changing the structure of the original PRP linked list.

[0108] like Figure 11 As shown, tasks are grouped and processed according to the granularity of the working mode based on the type of the created PRP linked list, realizing multi-channel parallel processing under multi-stage pipeline.

[0109] In some embodiments, please refer to Figure 1 Each of the several preset channels is used to process all working modes.

[0110] Each channel can handle all working modes, ensuring that each task can be performed normally when the channel is selected first, thus improving the parallelism of data processing and increasing work efficiency.

[0111] In some embodiments, please refer to Figure 1 The step of outputting the execution results in the working cache according to the order of the data in the starting cache and the ending cache includes:

[0112] Obtain the input order of the data to be processed in the starting buffer, the number of data in the ending buffer, and reorder them based on these to generate the data output order;

[0113] Select the execution result from the working cache corresponding to the channel based on the data output order;

[0114] If the working buffer corresponding to the channel is empty, determine whether to wait based on the data output order;

[0115] If the result is yes, then wait until it is not empty.

[0116] The origin_buf and result_buf information are input into the MUX module, which then performs ordered output. Since the origin_buf retains the original information of the data input order, the MUX module can select which output path to use based on the data order in the origin_buf. If the current output buffer is empty, it needs to wait until the buffer is not empty before outputting the data.

[0117] In some embodiments, please refer to Figure 1 The methods also include:

[0118] Simulations were performed based on the working time and number of channels corresponding to different working modes, and simulation results were obtained.

[0119] Set the number of channels based on the simulation results.

[0120] To achieve optimal PPA, this solution actually requires simulation based on the working time and number of channels for different processing modes, and then determining how many channels should be instantiated. However, this process is time-consuming. In practical applications, simulation calculations can be performed in advance through methods such as system modeling, aiming to achieve a solution that is finalized in one go with minimal modifications.

[0121] This invention proposes a PRP linked list processing system; please refer to [link to relevant documentation]. Figure 2 ,include:

[0122] The acquisition unit 100 is configured to acquire PRP linked list tasks and store the PRP linked list tasks in a pre-buffer as data to be processed.

[0123] Channel unit 200 is configured to detect whether several preset channels are idle, poll and arbitrate the detected idle channels, allocate the data to be processed to the corresponding arbitrated channel, and write the arbitration result into the starting buffer;

[0124] Process unit 300 is configured to determine the working mode of the data to be processed, select the process to execute the data to be processed according to the working mode, write the execution result into the corresponding working cache, and write the data count in all working caches into the end cache.

[0125] Output unit 400 is configured to output the execution results in the working cache according to the order of the data in the start cache and end cache.

[0126] This implementation method can not only effectively reduce the processing time of the PRP linked list in the NVMe protocol and improve the degree of parallelism, but also achieve optimal PPA by controlling the number of instantiated channels, thus making trade-offs between performance and area.

[0127] In some embodiments, please refer to Figure 7 , Figure 9 and Figure 10 This invention is a channel-based PRP linked list processing, which is an optimization of the pattern-based PRP linked list processing.

[0128] PRP linked list processing scheme based on pattern allocation, such as Figure 7 As shown.

[0129] Depend on Figure 7 The processing procedure is as follows:

[0130] (1) After a task arrives, it is first prefetched by the prefetch module, which parses the storage location of the current task, retrieves the current task information from the task queue, and stores it in pre_buffer to wait for subsequent sub-modules to call it;

[0131] (2) The mode_judge module is responsible for retrieving task information from pre_buffer, determining its working mode, inputting the corresponding i_buffer_0~i_buffer_3 for later use, and writing the information of which buffer the data is sent to into origin_buf for later use.

[0132] (3) If there is data in i_buffer_0, checker_0 will then perform task information judgment, determine the task execution branch, and write the information required for the subsequent process into the corresponding buffer.

[0133] (4) The executor is divided into three execution branches: normal, error, and retry. Any task is classified and enters one of the execution flows after being judged by the checker. After any execution flow is completed, the execution result is submitted and written to o_buffer.

[0134] (5) Write the information on the number of cached data from o_buffer_0 to o_buffer_3 into result_buf.

[0135] (6) Input the origin_buf and result_buf information into the MUX module, and the MUX module will output them in order.

[0136] However, after analysis, it was found that this scheme also has certain drawbacks: the parallelism of data processing in this scheme actually depends on the PRP linked list pattern of external tasks.

[0137] like Figure 9 As shown, the parallelism is highest when tasks are sent in the order of mode 0 / 1 / 2 / 3, or when mode interleaving is in progress.

[0138] like Figure 10 As shown, if all the data to be processed within a certain period is of the same type (such as mode0), then only one processing path can be followed. In reality, only multi-stage pipeline processing is implemented, while other channels are idle and wasted. In this scenario, the task processing efficiency of the improved solution will be greatly reduced.

[0139] As the above analysis shows, the bottleneck of this solution lies in the PRP linked list pattern that depends on the task. Therefore, Figure 7 Each path in the process should be appropriately modified, and each path needs to be capable of handling all PRP linked list mode tasks. That is, the "distribution by working mode" should be changed to "distribution by channel". This results in the PRP linked list processing based on channel allocation designed in this invention.

[0140] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 12 As shown, an embodiment of the present invention also provides a computer device 30, which includes a processor 310 and a memory 320. The memory 320 stores a computer program 321 that can be run on the processor. When the processor 310 executes the program, it performs the steps of the method described above.

[0141] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 13 As shown, embodiments of the present invention also provide a computer-readable storage medium 40, which stores a computer program 410 that, when executed by a processor, performs the methods described above.

[0142] Embodiments of the present invention may also include a corresponding computer device. The computer device includes a memory, at least one processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes any of the methods described above when executing the program.

[0143] The memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions / modules in the embodiments of this application. The processor executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory, thereby implementing the above-described method.

[0144] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the device. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0145] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0146] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0147] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. The sequence numbers of the disclosed embodiments of this invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0148] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0149] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A method for processing PRP linked lists, characterized in that, include: Retrieve PRP linked list tasks and store them in a pre-buffer as data to be processed. The system detects whether several preset channels are idle, polls and arbitrates the detected idle channels, allocates the data to be processed to the corresponding arbitrated channel, and writes the arbitration result into the starting buffer. The process involves determining the working mode of the data to be processed, selecting and executing the process based on the working mode, writing the execution result into the corresponding working cache, and writing the number of data items in all working caches into the end cache. This includes: determining the working mode of the data to be processed and grouping it according to the working mode; selecting and executing the process based on the grouping; and periodically checking the status of the task during the process execution. If the task proceeds normally, a process creation option is selected to create a process for the data to be processed; if an exception occurs during task issuance or execution, an exception process is selected to interrupt the task or report the event to the host; if an insufficient index value occurs in the memory index pool or other preset events, a retry process is initiated and a retry request is reported; after the process is completed, the execution result is written to the corresponding working cache; and the number of data items in all working caches is written to the end cache. The execution results in the working cache are output according to the order of the data in the starting cache and the ending cache, including: obtaining the input order of the data to be processed in the starting cache and the number of data in the ending cache and reordering them to generate the data output order; selecting the execution results in the working cache corresponding to the channel according to the data output order; in response to the working cache corresponding to the channel being empty, determining whether to wait based on the data output order; in response to the result being yes, waiting until it is not empty.

2. The PRP linked list processing method according to claim 1, characterized in that, The steps of obtaining the PRP linked list task and storing the PRP linked list task in the pre-buffer as data to be processed include: Obtain the PRP linked list tasks and parse the storage location of the PRP linked list tasks; Retrieve PRP chain list task information from the PRP chain list task queue pointed to by the storage location, and store the PRP chain list task information in the pre-buffer as data to be processed and awaiting call.

3. The PRP linked list processing method according to claim 1, characterized in that, The steps for determining the working mode of the data to be processed include: In response to the working mode of creating an empty linked list, the structure of the PRP linked list is created; In response to the working mode of creating a new linked list, memory space is allocated and the PRP linked list is constructed. In response to the working mode of creating an extended linked list, the space size of the existing PRP linked list is obtained, and the space size is extended based on the original PRP linked list according to the task requirements. In response to the working mode of creating a populated linked list, the index information of an existing PRP linked list is obtained, and invalid index values ​​are replaced with newly created index values ​​without changing the structure of the original PRP linked list.

4. The PRP linked list processing method according to claim 1, characterized in that, Each of the several preset channels is used to process all working modes.

5. The PRP linked list processing method according to claim 1, characterized in that, The method also includes: Simulations were performed based on the working time and number of channels corresponding to different working modes, and simulation results were obtained. Set the number of channels based on the simulation results.

6. A PRP linked list processing system, characterized in that, include: The acquisition unit is configured to acquire PRP linked list tasks and store the PRP linked list tasks in a pre-buffer as data to be processed. The channel unit is configured to detect whether several preset channels are idle, poll and arbitrate the detected idle channels, allocate the data to be processed to the corresponding arbitrated channel, and write the arbitration result into the starting buffer. The process unit is configured to determine the working mode of the data to be processed, select the process to execute the data to be processed according to the working mode, write the execution result into the corresponding working cache, and write the data count in all working caches into the end cache. The output unit is configured to output the execution results in the working cache according to the order of the data in the start cache and the end cache; The process unit is further used to: determine the working mode of the data to be processed, and group the data according to the working mode of the data to be processed; The process of selecting and executing data to be processed based on the grouping is as follows; The status of the task is periodically checked during the process execution; If the task proceeds normally, select "Create Process" to create a process for the data to be processed. In response to an exception in task assignment or an exception during task execution, the exception handling procedure is selected to interrupt the task or report the event to the host. In response to insufficient index values ​​in the memory index pool or other preset events, a retry process is initiated, and a retry request is reported; after the process is completed, the execution result is written to the corresponding working cache. Write the total number of data items in the working cache to the end cache; The output unit is further configured to: obtain the input order of the data to be processed in the starting buffer and the number of data in the ending buffer, and reorder them based on the data to generate a data output order; select the execution result in the working buffer corresponding to the channel according to the data output order; and determine whether to wait based on the data output order if the working buffer corresponding to the channel is empty. If the result is yes, then wait until it is not empty.

7. A computer device, comprising: At least one processor; The processor also includes a memory storing a computer program that can run on the processor, characterized in that the processor executes the program by performing the steps of the PRP linked list processing method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the linked list processing method of the PRP as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Out of order read transfer with host memory buffer

    CN108885584A

  • Command processing method of solid state disk based on NVMe and related equipment

    CN112416250A