A storage device

By building storage devices with multiple data paths, the performance and latency problems of large-scale concurrent tasks in embedded CPUs are solved, and the parallel processing and resource management of tasks are realized, improving the performance and latency performance of storage devices.

CN114510436BActive Publication Date: 2025-08-08BEIJING STARBLAZE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210139022.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-17
Publication Date
2025-08-08
Estimated Expiration
2040-04-17

AI Technical Summary

Technical Problem

The prior art is difficult to effectively handle the performance and latency requirements of large-scale concurrent tasks in embedded CPUs, especially in storage devices, and existing operating system scheduling solutions are difficult to meet the stringent performance and latency requirements.

Method used

Build a storage device with multiple data channels, and by creating task processing units, channels and DTU processing modules, it realizes parallel processing and resource management of tasks, including inbound interfaces, outbound interfaces, DTU processing modules and resource managers, ensuring the association between task processing units and channels and the effective allocation of resources.

Benefits of technology

It improves the concurrency and latency performance of task processing in embedded storage devices, meets strict performance and latency requirements, and realizes flexible expansion and functional enhancement of storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510436B_ABST
    Figure CN114510436B_ABST
Patent Text Reader

Abstract

The present application provides a storage device, characterized in that it includes at least one storage chip and at least one data path, each data path corresponding to one or more storage chips; in response to receiving a command, the storage device accesses the storage chip corresponding to the one data path through one data path of the at least one data path, and completes the operation indicated by the command, wherein the operation includes a read operation, a write operation, and an erase operation; wherein the at least one data path includes at least one type of data path, and the at least one type of data path has at least one identical or different task processing unit, and the at least one task processing unit is used to process the corresponding task in the command processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to storage technology, and in particular, to a data processing system with multiple data paths and a virtual electronic device constructed using the multiple data paths. Background Art

[0002] In some applications, processors handle large-scale concurrent tasks. For example, embedded processors used in network devices and storage devices handle multiple concurrent network packets or I / O commands.

[0003] In desktop CPUs and server CPUs, the operating system runs, and the operating system schedules multiple processes and / or threads running on the CPU to handle tasks by time slicing and / or preempting. Users do not need to intervene too much in switching between processes / threads. The operating system selects the appropriate process / thread for scheduling to fully utilize the CPU computing power. However, in embedded CPUs, available memory, CPU processing power and other resources are limited, and any processing is special, such as relatively simple tasks with large-scale concurrency. In addition, some embedded systems have strict requirements on performance, especially task processing delay, and the operating system of the existing technology is difficult to apply to this scenario.

[0004] To improve the performance of any processing, the task is usually divided into multiple stages (or subtasks). For a single task, its stages are processed sequentially, while multiple tasks can be processed concurrently.

[0005] Chinese patent applications with application numbers 201811095364.7, 201811160925.7 and 2019102538859 provide a signal-slot-based task scheduling solution to handle a large number of concurrent IO commands and ensure the overall service quality of multiple IO commands.

[0006] Figure 1A This is a diagram of task scheduling.

[0007] Figure 1A , the direction from left to right is the direction of time passage. A plurality of tasks (1-1, 2-1, 3-1, 1-2, 2-2, and 3-2) being processed are also shown, wherein in the reference numerals having the structure "ab", the preceding symbol a indicates a task, and the following symbol b indicates a subtask included in the task. Figure 1A It shows three tasks processed in chronological order, each task consists of two subtasks.

[0008] The solid arrows indicate the time sequence of processing multiple tasks, and the dotted arrows indicate the logical sequence of task processing. For example, taking Task 1 as an example, its subtask 1-1 (Task 1-1) should be processed first, and then its subtask 1-2 (Task 1-2) should be processed. Figure 1A ,After processing subtask 1-1, subtask 2-1 and subtask 3-1 are scheduled for execution in order to improve the parallelism of task processing. ,Then it is identified that the conditions for executing subtask 1-2 are met. ,After processing subtask 3-1, subtask 1-2 is scheduled for execution.

[0009] On a processor, tasks (or subtasks) are processed by executing code segments. A single CPU (or CPU core) processes only a single task at any one time. For example, Figure 1A As shown, for multiple tasks to be processed, the code segment for processing subtask 1-1 is executed first, the code segment for processing subtask 2-1 is executed next, the code segment for processing subtask 3-1 is executed next, the code segment for processing subtask 1-2 is executed next, the code segment for processing subtask 2-2 is executed next, and the code segment for processing subtask 3-2 is executed next. Optionally, the logical order of task processing is indicated in the code segment of each processing task (or subtask). For example, the logical order includes that subtask 1-2 should be processed after task 1-1. As another example, in the code segment for processing subtask 1-1, it is indicated that the code segment whose logical order is to be processed later should be the code segment for processing subtask 1-2.

[0010] Figure 1B It is a block diagram of the task processing system.

[0011] See Figure 1B The task processing system consists of two parts: software and hardware. The hardware includes, for example, one or more CPUs that run the software and other hardware resources that handle related tasks (e.g., memory, codecs, interfaces, accelerators, interrupt controllers, DMA units, etc.).

[0012] The code segments of software running on a CPU are called task processing units. A task processing system includes multiple task processing units. Each task processing unit processes the same or different tasks. For example, task processing unit 0 processes the first subtask of a task (e.g., subtask 1-1, subtask 2-1, and subtask 3-1), while task processing units 1, 2, and 3 process the second subtask of a task (e.g., subtask 1-2, subtask 2-2, and subtask 3-2).

[0013] The task processing system further includes a task management unit implemented in software for scheduling one of the task processing units to run on the hardware.

[0014] The resources required by the task processing unit include, for example, a cache unit, a descriptor (or context) for processing the task, and the like.

[0015] A storage device is used to provide storage capacity for a host coupled thereto. The host and storage device can be coupled in various ways, including but not limited to connecting the host and storage device 102 via, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIe (Peripheral Component Interconnect Express), NVMe (NVM Express), Ethernet, Fibre Channel, wireless communication networks, and the like. The host can be an information processing device capable of communicating with the storage device via the aforementioned methods, such as a personal computer, tablet computer, server, laptop computer, network switch, router, cellular phone, personal digital assistant, and the like. The storage device processes IO commands. IO commands include, for example, read commands, write commands, or other IO commands. A storage device includes an interface, a control unit, one or more NVM chips, and optionally DRAM (Dynamic Random Access Memory). The control unit of the storage device includes one or more CPUs. The CPU runs software or firmware to process I / O commands as a task processing unit.

[0016] The storage device also divides the IO command into one or more sub-commands for processing. Each sub-command has relatively consistent specifications, such as accessing the same size address range, so that the task processing unit that processes the sub-command can be implemented in a relatively simple manner. Summary of the Invention

[0017] Storage devices with various specifications need to be provided, such as those with varying storage capacities, performance, and / or differentiated functionality. This necessitates the provision of different design solutions for each storage device specification. These different design solutions share commonalities and are designed to reuse existing technical achievements. It is also desirable for components developed by multiple members of the team to be effectively combined and interact with each other. Furthermore, the design solution should be easily extensible to provide enhanced functionality and / or performance.

[0018] In order to solve the technical problem in the prior art of providing different design versions for storage devices of different specifications, according to the first aspect of the present application, a method for constructing a first downstream data path according to the first aspect of the present application is provided, including: creating at least one task processing unit; creating at least one channel; and associating the at least one task processing unit with the at least one channel.

[0019] According to the method for constructing the first downlink data path of the first aspect of the present application, a method for constructing the second downlink data path according to the first aspect of the present application is provided, wherein the task processing unit includes an inbound interface, an outbound interface, and a DTU processing module; the method further includes: the inbound interface obtains a DTU from the channel associated with it; the outbound interface adds a DTU to the channel associated with it; the DTU processing module extracts subcommands from the DTU obtained through the inbound interface, processes the subcommands, and adds the DTU carrying the processed subcommands to the channel associated with it through the outbound interface.

[0020] According to the method for constructing the first or second downlink data path of the first aspect of the present application, a method for constructing a third downlink data path according to the first aspect of the present application is provided, wherein the channel includes a DTU list and multiple functions for operating the DTU list, the DTU list includes a container for accommodating one or more DTUs, and the multiple functions for operating the DTU list include at least a first Push function and a Pop function; wherein, when the first Push function is called, at least one DTU is added to the DTU list; when the Pop function is called, at least one DTU is obtained from the DTU list.

[0021] According to the method for constructing the third downlink data path of the first aspect of the present application, a method for constructing the fourth downlink data path according to the first aspect of the present application is provided, wherein the channel also includes a direct forwarding unit, and the multiple functions for operating the DTU list also include a second Push function; wherein, in response to the second Push function being called, the direct forwarding unit obtains the DTU through the second Push function and provides it to the task processing unit.

[0022] According to the method for constructing the fourth downlink data path of the first aspect of the present application, a method for constructing the fifth downlink data path according to the first aspect of the present application is provided, wherein the creating of at least one channel further includes: creating a direct forwarding unit of the channel and setting a destination index; wherein the destination index indicates a function associated with the task processing unit, and the direct forwarding unit calls the function associated with the task processing unit to provide the DTU obtained from the second Push function to the task processing unit.

[0023] According to one of the first to fifth downlink data path construction methods of the first aspect of the present application, a sixth downlink data path construction method according to the first aspect of the present application is provided, wherein the channel obtains DTUs from one or more task processing units associated therewith, and only provides DTUs to one task processing unit associated therewith.

[0024] According to one of the first to fourth downlink data path construction methods of the first aspect of the present application, a seventh downlink data path construction method according to the first aspect of the present application is provided, where a DTU is a message unit that carries a subcommand and / or a subcommand context.

[0025] According to one of the methods for constructing the first to seventh downlink data paths of the first aspect of the present application, a method for constructing the eighth downlink data path according to the first aspect of the present application is provided, wherein the downlink path further includes at least one resource manager; the resource manager manages the use of specified resources; the method further includes associating at least one task processing unit with at least one resource manager, so that the task manager accesses resources through the resource manager associated with it.

[0026] According to the eighth downlink data path construction method of the first aspect of the present application, a ninth downlink data path construction method according to the first aspect of the present application is provided, further comprising: associating one or more channels with one or more resource managers, wherein a monitoring function of the resource manager is registered with the channel; in response to a DTU being added to the channel, the registered monitoring function is called to access resources managed by the resource manager corresponding to the called monitoring function.

[0027] According to the eighth or ninth downlink data path construction method of the first aspect of the present application, a tenth downlink data path construction method according to the first aspect of the present application is provided, further comprising: a resource manager managing the allocation or recycling of specified resources; and a resource manager managing the status of specified resources.

[0028] According to one of the first to tenth downlink data path construction methods of the first aspect of the present application, an eleventh downlink data path construction method according to the first aspect of the present application is provided, and the number of channels is less than or equal to the number of task processing units.

[0029] According to one of the first to eleventh methods for constructing downlink data paths of the first aspect of the present application, a twelfth method for constructing a downlink data path according to the first aspect of the present application is provided, wherein the at least one task processing unit is associated with the at least one channel, comprising: setting one or more channels associated with the inbound interface of each task processing unit of the downlink channel; and setting a channel associated with the outbound interface of each task processing unit of the downlink channel.

[0030] According to one of the first to twelfth methods for constructing downlink data paths of the first aspect of the present application, a thirteenth method for constructing downlink data paths according to the first aspect of the present application is provided, wherein the task processing unit is a schedulable software unit, and the channel is not schedulable.

[0031] According to one of the first to thirteenth downstream data path construction methods of the first aspect of the present application, a fourteenth downstream data path construction method according to the first aspect of the present application is provided, and the at least one task processing unit is associated with the at least one channel, including: associating one task processing unit with two or more channels; and / or associating one task processing unit with one channel.

[0032] According to one of the construction methods of the first to fourteenth downlink data paths of the first aspect of the present application, a construction method of the fifteenth downlink data path according to the first aspect of the present application is provided, and the at least one task processing unit created includes a first task processing unit and a second task processing unit, wherein the first task processing unit and the second task processing unit are task processing units that process the same or different tasks.

[0033] According to the method for constructing the fifteenth downstream data path of the first aspect of the present application, a method for constructing the sixteenth downstream data path according to the first aspect of the present application is provided, wherein the at least one task processing unit includes a first task processing unit for processing address conversion tasks, a second task processing unit for processing data assembly tasks, and a third task processing unit for processing garbage collection tasks; the at least one channel created includes a first channel, a second channel, and a third channel; the inbound interface of the first task processing unit is associated with the first channel and the third channel; the outbound interface of the first task processing unit is associated with the second channel; the inbound interface of the second task processing unit is associated with the second channel; and the outbound interface of the third task processing unit is associated with the third channel.

[0034] According to the construction method of the sixteenth downlink data path of the first aspect of the present application, a construction method of the seventeenth downlink data path according to the first aspect of the present application is provided, wherein the first task processing unit is associated with a resource manager that manages address mapping table resources; the second task processing unit is associated with a resource manager that manages accelerator resources; and the third task processing unit is associated with a resource manager that manages storage medium resources.

[0035] According to one of the methods for constructing the fifteenth to seventeenth downlink data paths of the first aspect of the present application, a method for constructing the eighteenth downlink data path according to the first aspect of the present application is provided, wherein the at least one task processing unit also includes a fourth task processing unit that processes address conversion tasks; the at least one channel created also includes a fourth channel and a fifth channel; the inbound interface of the fourth task processing unit is associated with the fourth channel; the outbound interface of the fourth task processing unit is associated with the fifth channel; and the inbound interface of the second task processing unit is associated with the fifth channel.

[0036] According to the eighteenth downlink data path construction method of the first aspect of the present application, a nineteenth downlink data path construction method according to the first aspect of the present application is provided, wherein at least one channel created also includes a sixth channel; the inbound interface of the fourth task processing unit is associated with the sixth channel; and the outbound interface of the third task processing unit is associated with the sixth channel.

[0037] According to one of the methods for constructing the first to nineteenth downlink data paths of the first aspect of the present application, a method for constructing a twentieth downlink data path according to the first aspect of the present application is provided, wherein the method further includes associating the downlink data path with a command transmission unit and a sub-command processing unit; wherein the command transmission unit splits the IO command into one or more sub-commands, obtains a DTU carrying the sub-command, and delivers the DTU carrying the sub-command to a task processing unit coupled to itself; and the sub-command processing unit accesses the storage medium according to the sub-command carried by the DTU.

[0038] According to the method for constructing the twentieth downlink data path of the first aspect of the present application, a method for constructing the twenty-first downlink data path according to the first aspect of the present application is provided, wherein a first task processing unit in at least one task processing unit is associated with the command transmission unit, the first task processing unit is directly connected to the command transmission unit or coupled through a channel, and the first task processing unit is the first task processing unit in at least one task processing unit to process a sub-command; and a second task processing unit in at least one task processing unit is associated with the sub-command processing unit, the second task processing unit is directly connected to the sub-command processing unit, and the second task processing unit is the last task processing unit in at least one task processing unit to process a sub-command.

[0039] According to the second aspect of the present application, a first information processing device according to the second aspect of the present application is provided, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of the above-mentioned first aspects is implemented.

[0040] According to the third aspect of the present application, a device for constructing a first downlink data path according to the third aspect of the present application is provided, including: a first creation unit for creating at least one task processing unit; a second creation unit for creating at least one channel; and an association unit for associating the at least one task processing unit with the at least one channel.

[0041] According to a fourth aspect of the present application, a first downlink data path according to the fourth aspect of the present application is provided, comprising: at least one task processing unit and at least one channel; wherein a first task processing unit in the at least one task processing unit obtains a DTU from the channel associated with itself, the DTU carrying a sub-command, the first task processing unit is any one of the at least one task processing unit, and the second task processing unit is a task processing unit other than the first task processing unit in the at least one task processing unit; the first task processing unit processes the sub-command, and after the sub-command processing is completed, fills the DTU into the channel associated with itself, so that the second task processing unit obtains the DTU from the channel.

[0042] According to the first downlink data path of the fourth aspect of the present application, a second downlink data path according to the fourth aspect of the present application is provided, wherein the first task processing unit obtains the DTU from the first channel associated with itself, and after the sub-command processing is completed, fills the DTU into the second channel associated with itself, so that the second task processing unit obtains the DTU from the second channel; or, the first task processing unit obtains the DTU from the first channel associated with itself, and after the sub-command processing is completed, fills the DTU into the first channel, so that the second task processing unit obtains the DTU from the first channel; wherein the first channel and the second channel are both associated with the first task processing unit, and the first channel and the second channel are different channels.

[0043] According to the first or second downlink data path of the fourth aspect of the present application, a third downlink data path according to the fourth aspect of the present application is provided, wherein the first task processing unit includes an inbound interface, an outbound interface, and a DTU processing module; the DTU processing module obtains the DTU from the channel associated with the first task processing unit through the inbound interface; the DTU processing module obtains the subcommand from the DTU, processes the subcommand, and carries the processed subcommand on the DTU; the DTU processing module adds the DTU to the channel associated with the first task processing unit through the outbound interface.

[0044] According to one of the first to third downlink data paths of the fourth aspect of the present application, a fourth downlink data path according to the fourth aspect of the present application is provided, wherein each of the at least one channel includes a DTU list and multiple functions for operating the DTU list, the DTU list being used to accommodate multiple DTUs, and the multiple functions for operating the DTU list including at least a first Push function and a Pop function; wherein the task processing unit adds at least one DTU to the DTU list by calling the first Push function; and the task processing unit obtains at least one DTU from the DTU list by calling the Pop function.

[0045] According to the fourth downlink data path of the fourth aspect of the present application, a fifth downlink data path according to the fourth aspect of the present application is provided, wherein each channel further includes a direct forwarding unit, and the multiple functions of operating the DTU list further include a second Push function; when the first task processing unit calls the second Push function, the direct forwarding unit obtains the DTU from the second Push function, and provides the DTU to the second task processing unit.

[0046] According to one of the first to fifth downlink data paths of the fourth aspect of the present application, a sixth downlink data path according to the fourth aspect of the present application is provided, wherein the downlink data path also includes at least one resource manager; the resource manager manages the use of specified resources; at least one task processing unit is associated with at least one resource manager, so that the task processing unit accesses resources through the resource manager associated therewith.

[0047] According to the sixth downlink data path of the fourth aspect of the present application, a seventh downlink data path according to the fourth aspect of the present application is provided, and the resource manager manages multiple types of resources, and the multiple types of resources include at least cache resources, address mapping table resources, computing resources and / or storage medium resources.

[0048] According to the seventh downlink data path of the fourth aspect of the present application, an eighth downlink data path according to the fourth aspect of the present application is provided, wherein one resource manager manages multiple types of resources; or, each of the multiple resource managers manages one type of resource, and different resource managers manage different types of resources.

[0049] According to the seventh or eighth downlink data path of the fourth aspect of the present application, a ninth downlink data path according to the fourth aspect of the present application is provided, wherein the inbound interface of the task processing unit calls the Pop function of the channel associated with itself to obtain the DTU; the outbound interface of the task processing unit calls the Push function of the channel associated with itself to add the DTU to the channel.

[0050] According to one of the first to ninth downlink data paths of the fourth aspect of the present application, a tenth downlink data path according to the fourth aspect of the present application is provided, wherein the first task processing unit further includes a callback function; before adding the DTU to the channel, the first task processing unit writes a callback function index indicating the callback function in the DTU; wherein the callback function is called through the callback function index, so as to request the resource manager to release resources.

[0051] According to one of the first to tenth downlink data paths of the fourth aspect of the present application, an eleventh downlink data path according to the fourth aspect of the present application is provided, and multiple task processing units are associated with a third channel. If multiple task processing units call the first Push function of the third channel, multiple DTUs from the multiple task processing units are added to the DTU list in the third channel, and the third channel is any one of the at least one channel.

[0052] According to one of the first to eleventh downlink data paths of the fourth aspect of the present application, a twelfth downlink data path according to the fourth aspect of the present application is provided, multiple channels are associated with the first task processing unit, and the first task processing unit obtains DTUs from the multiple channels according to the priorities of the multiple channels; alternatively, the first task processing unit polls the multiple channels to obtain DTUs from the multiple channels.

[0053] According to one of the first to twelfth downlink data paths of the fourth aspect of the present application, a thirteenth downlink data path according to the fourth aspect of the present application is provided, wherein the downlink data path includes a third task processing unit, a fourth task processing unit, a fifth task processing unit, a sixth task processing unit, multiple channels, and a resource manager, wherein the third task processing unit processes a cache task, the fourth task processing unit processes an address conversion task, the fifth task processing unit processes a data assembly task, and the sixth task processing unit processes a garbage collection task; wherein the third task processing unit obtains a DTU from the third channel or the seventh channel, executes a cache task, and adds a DTU carrying a cache task execution result to the fourth channel; the fourth task processing unit obtains a DTU from the fourth channel, executes an address conversion task, and adds a DTU carrying an address conversion task execution result to the fifth channel; the fifth task processing unit obtains a DTU from the fifth channel, executes a data assembly task, and sends the DTU carrying the data assembly task execution result to the sub-command processing unit; the sixth task processing unit obtains a DTU from the sixth channel, executes a garbage collection task, and adds a DTU carrying a garbage collection task execution result to the seventh channel.

[0054] According to the twelfth downlink data path of the fourth aspect of the present application, a fourteenth downlink data path according to the fourth aspect of the present application is provided, wherein the downlink data path includes a third task processing unit, a fourth task processing unit, a fifth task processing unit, a sixth task processing unit, a seventh task processing unit, an eighth task processing unit, multiple channels and a resource manager, wherein the third task processing unit and the fourth task processing unit process cache tasks, the fifth task processing unit and the sixth task processing unit process address conversion tasks, the seventh task processing unit processes data assembly tasks, and the eighth task processing unit processes garbage collection tasks; wherein the third task processing unit obtains a DTU from the third channel, executes a cache task, and adds the DTU carrying the cache task execution result to the fifth channel; the fourth task processing unit obtains a DTU from the fourth channel, executes a cache task The fifth task processing unit obtains the DTU from the fifth channel and / or the tenth channel, performs the address conversion task, and adds the DTU carrying the execution result of the address conversion task to the seventh channel; the sixth task processing unit obtains the DTU from the sixth channel and / or the eleventh channel, performs the address conversion task, and adds the DTU carrying the execution result of the address conversion task to the eighth channel; the seventh task processing unit obtains the DTU from the seventh channel and / or the eighth channel, performs the data assembly task, and sends the DTU carrying the execution result of the data assembly task to the sub-command processing unit; the eighth task processing unit obtains the DTU from the ninth channel, performs the garbage collection task, and adds the DTU carrying the execution result of the garbage collection task to the tenth channel and / or the eleventh channel.

[0055] According to a fifth aspect of the present application, a method for constructing a first uplink data path according to the fifth aspect of the present application is provided, comprising: in one or more task processing units of a downlink data path, writing one or more callback function indexes into a data transmission unit DTU to construct an uplink data path for the DTU; wherein, one or more callback functions indicated by the one or more callback function indexes constitute the uplink data path, and the DTU carries a subcommand; in response to completion of processing the subcommand, calling the callback function indicated by the one or more callback function indexes recorded in the DTU to return the processing result of the subcommand through the uplink data path.

[0056] According to the method for constructing the first uplink data path of the fifth aspect of the present application, a method for constructing the second uplink data path according to the fifth aspect of the present application is provided, wherein the one or more callback function indexes in the DTU are ordered, and the callback functions indicated by the one or more callback function indexes in the DTU called in sequence constitute the uplink data path, wherein the order of calling the callback functions indicated by the one or more callback function indexes in the DTU is the reverse order of writing the one or more callback function indexes to the DTU in constructing the uplink data path.

[0057] According to the method for constructing the first or second uplink data path of the fifth aspect of the present application, a method for constructing the third uplink data path according to the fifth aspect of the present application is provided, wherein when the first task processing unit processes the sub-command, the first callback function index is written to the DTU; wherein the callback function indicated by the first callback function index is used to release the first resource allocated by the first task processing unit for processing the sub-command, and the first task processing unit is a task processing unit in the downlink data path.

[0058] According to one of the methods for constructing the first to third uplink data paths of the fifth aspect of the present application, a method for constructing a fourth uplink data path according to the fifth aspect of the present application is provided, wherein when the second task processing unit processes the sub-command, it writes a second callback function index to the DTU; wherein the callback function indicated by the second callback function index is used to release the first resource allocated by the first task processing unit for processing the sub-command, and the second task processing unit is a task processing unit in the downlink data path.

[0059] According to one of the methods for constructing the first to fourth uplink data paths of the fifth aspect of the present application, a method for constructing a fifth uplink data path according to the fifth aspect of the present application is provided, wherein the downlink data path includes multiple task processing units, and each of the multiple task processing units writes a callback function index in the DTU during the process of processing the sub-command; wherein the sub-command is obtained by each task processing unit from the DTU, and the callback function written into the DTU by each task processing unit is the same or different.

[0060] According to one of the first to fifth uplink data path construction methods of the fifth aspect of the present application, a sixth uplink data path construction method according to the fifth aspect of the present application is provided, wherein the uplink data path further includes a monitoring unit, which is the first task processing unit of the uplink data path; the monitoring unit monitors and identifies whether the subcommand is processed; in response to the completion of the subcommand processing, the monitoring unit obtains the DTU indicating the processing result of the subcommand.

[0061] According to the method for constructing the sixth uplink data path of the fifth aspect of the present application, a method for constructing the seventh uplink data path according to the fifth aspect of the present application is provided, wherein the last task processing unit of the downlink data path sends the DTU to the subcommand processing unit, the subcommand processing unit caches the DTU, processes the subcommand indicated by the DTU, and provides the processing result of the subcommand to the monitoring unit.

[0062] According to one of the first to seventh uplink data path construction methods of the fifth aspect of the present application, there is provided an eighth uplink data path construction method according to the fifth aspect of the present application, wherein the one or more task processing units are schedulable.

[0063] According to one of the first to eighth uplink data path construction methods of the fifth aspect of the present application, a ninth uplink data path construction method according to the fifth aspect of the present application is provided, wherein the callback function called last in the uplink data path sends the DTU to the command transmission unit; the command transmission unit obtains the processing result of the subcommand according to the instruction of the DTU; returns the processing results of one or more subcommands to the issuer of the command, the command including the one or more subcommands; and the command transmission unit releases the DTU.

[0064] According to the ninth uplink data path construction method of the fifth aspect of the present application, a tenth uplink data path construction method according to the fifth aspect of the present application is provided, wherein the command transmission unit, in response to receiving a command, splits the command into one or more sub-commands, allocates a DTU to each sub-command, and indicates one of the sub-commands in the allocated DTU.

[0065] According to the sixth aspect of the present application, a first information processing device according to the sixth aspect of the present application is provided, comprising a memory, a processor, and a program stored on the memory and executable on the processor, wherein the processor implements a method as described in any one of the fifth aspects when executing the program.

[0066] According to a seventh aspect of the present application, a device for constructing a first uplink data path according to the seventh aspect of the present application is provided, comprising: a callback function index generating unit, configured to write one or more callback function indexes into a data transmission unit DTU in one or more task processing units of a downlink data path to construct an uplink data path for the DTU; wherein the one or more callback functions indicated by the one or more callback function indexes constitute the uplink data path, the DTU carries a subcommand, a task processing unit in the downlink data path obtains and processes the subcommand indicated in the DTU, and provides the DTU to another task processing unit of the downlink data path; a callback function index calling unit, configured to, in response to completion of the processing of the subcommand, sequentially call the one or more callback functions recorded in the DTU to return the processing result of the subcommand through the uplink data path.

[0067] According to the eighth aspect of the present application, a first data processing system according to the eighth aspect of the present application is provided, comprising an uplink data path and a downlink data path; the downlink data path comprises one or more task processing units; wherein a first task processing unit among the multiple task processing units is coupled to a command transmission unit, and a second task processing unit among the multiple task processing units is coupled to a sub-command processing unit; the downlink data path processes a DTU provided by the command transmission unit, and constructs the uplink data path for the DTU during processing the DTU; in response to the sub-command being processed by the sub-command processing unit, the processing result of the sub-command is obtained from the command transmission unit through the uplink data path.

[0068] According to the first data processing system of the eighth aspect of the present application, a second data processing system according to the eighth aspect of the present application is provided, wherein the uplink data path also includes a monitoring unit, and the sub-command processing unit is coupled to the monitoring unit; the monitoring unit obtains a sub-command processing completion indication from the sub-command processing unit; in response to the sub-command processing completion indication, the monitoring unit calls the callback function indicated by the data transmission unit DTU to provide the processing result of the sub-command to the command transmission unit through the uplink data path.

[0069] According to the first or second data processing system of the eighth aspect of the present application, a third data processing system according to the eighth aspect of the present application is provided, wherein the monitoring unit obtains the DTU according to the sub-command processing completion indication; and obtains at least one callback function index from the DTU; wherein the callback function index indicates a callback function, and the at least one callback function index is written into the DTU when one or more task processing units of the downlink data path process a sub-command; wherein the at least one callback function constitutes the uplink data path.

[0070] According to the third data processing system of the eighth aspect of the present application, there is provided the fourth data processing system according to the eighth aspect of the present application, wherein the monitoring unit calls the callback function indicated by the at least one callback function index.

[0071] According to the fourth data processing system of the eighth aspect of the present application, a fifth data processing system according to the eighth aspect of the present application is provided, wherein the monitoring unit calls the at least one callback function corresponding to the at least one callback function index in positive sequence according to the writing order of the at least one callback function index.

[0072] According to the fourth data processing system of the eighth aspect of the present application, a sixth data processing system according to the eighth aspect of the present application is provided, wherein the monitoring unit calls the at least one callback function corresponding to the at least one callback function index in reverse order according to the writing order of the at least one callback function index.

[0073] According to one of the fourth to sixth data processing systems of the eighth aspect of the present application, a seventh data processing system according to the eighth aspect of the present application is provided, which, in response to the at least one callback function being called, executes a first callback function among the at least one callback function to send the processing result of the sub-command to the command unit; wherein the first callback function is a callback function written into the DTU when the first task processing unit processes the sub-command.

[0074] According to the seventh data processing system of the eighth aspect of the present application, an eighth data processing system according to the eighth aspect of the present application is provided, which executes the first callback function to release the first resource.

[0075] According to the seventh or eighth data processing system of the eighth aspect of the present application, a ninth data processing system according to the eighth aspect of the present application is provided, wherein the data processing system further includes a resource manager; when executing the first callback function, a request is made to the resource manager to release a first resource, wherein the first resource is allocated by the first task processing unit by requesting the resource manager when processing a sub-command; in response to the request to release the first resource, the resource manager releases the first resource.

[0076] According to one of the fourth to ninth data processing systems of the eighth aspect of the present application, a tenth data processing system according to the eighth aspect of the present application is provided, which, in response to the at least one callback function being called, executes a second callback function among the at least one callback function to request the resource manager to release a second resource, wherein the second resource is allocated by the second task processing unit by requesting the resource manager when processing a sub-command; in response to the request to release the second resource, the resource manager releases the second resource.

[0077] According to the tenth data processing system of the eighth aspect of the present application, there is provided an eleventh data processing system according to the eighth aspect of the present application, wherein the monitoring unit calls the first callback function after calling the second callback function.

[0078] According to one of the first to eleventh data processing systems of the eighth aspect of the present application, a twelfth data processing system according to the eighth aspect of the present application is provided, wherein the monitoring unit polls the sub-command processing unit to obtain the sub-command processing completion indication.

[0079] According to one of the first to twelfth data processing systems of the eighth aspect of the present application, there is provided a thirteenth data processing system according to the eighth aspect of the present application, wherein the at least one task processing unit is a schedulable processing unit.

[0080] According to the ninth aspect of the present application, a first data processing system according to the ninth aspect of the present application is provided, comprising a command transmission unit and multiple data paths; wherein the data path comprises a downstream data path and an upstream data path; the downstream data path comprises one or more task processing units; the downstream data path is coupled to the command transmission unit; the command transmission unit allocates a DTU to carry sub-commands for one or more first sub-commands to be processed, and provides the DTU carrying the sub-commands to a downstream data path of the first data path of the multiple data paths; wherein the first sub-command is associated with a command to access a first device, and the first data path corresponds to the first device.

[0081] According to the first data processing system of the ninth aspect of the present application, a second data processing system according to the ninth aspect of the present application is provided, wherein the first task processing unit of the downlink data path is coupled to the command transmission unit; the command transmission unit provides the DTU carrying the first sub-command to the first task processing unit of the downlink data path of the first data path.

[0082] According to the first or second data processing system of the ninth aspect of the present application, a third data processing system according to the ninth aspect of the present application is provided, wherein the command transmission unit allocates a DTU to carry the sub-command for one or more second sub-commands to be processed, and provides the DTU carrying the second sub-command to the first task processing unit of the downlink data path of the second data path; wherein the second sub-command is associated with a command to access a second device, and the second data path corresponds to the second device.

[0083] According to one of the first to third data processing systems of the ninth aspect of the present application, a fourth data processing system according to the ninth aspect of the present application is provided, wherein the multiple data paths each correspond to a device to be accessed by the command; and the command transmission unit determines, based on the device to be accessed by the command, one of the data paths to which the sub-command associated with the command will be provided.

[0084] According to one of the first to fourth data processing systems of the ninth aspect of the present application, a fifth data processing system according to the ninth aspect of the present application is provided, wherein the downlink data path is a downlink data path as described in any one of the above-mentioned fourth aspect; and / or, the uplink data path is an uplink data path as described in any one of the above-mentioned eighth aspect.

[0085] According to one of the first to fifth data processing systems of the ninth aspect of the present application, a sixth data processing system according to the ninth aspect of the present application is provided, further comprising a first sub-command processing unit; the respective downlink data paths of the first plurality of data paths are coupled to the first sub-command processing unit; the last task processing unit of the respective downlink data paths of the first plurality of data paths sends a DTU to the first sub-command processing unit, the first sub-command processing unit caches the DTU received from the respective downlink data paths of the first plurality of data paths, and processes the sub-command indicated by the received DTU.

[0086] According to the sixth data processing system of the ninth aspect of the present application, a seventh data processing system according to the ninth aspect of the present application is provided, wherein the first sub-command processing unit is coupled to the monitoring unit of the uplink data path of each of the first plurality of data paths; the monitoring unit obtains the processing result of the sub-command from the first sub-command processing unit; the monitoring unit obtains the DTU carrying the processed sub-command, obtains at least one callback function index from the DTU of the processed sub-command, and calls the callback function indicated by the at least one callback function index.

[0087] According to the sixth or seventh data processing system of the ninth aspect of the present application, an eighth data processing system according to the ninth aspect of the present application is provided, wherein the first sub-command processing unit is coupled to one or more first NVM chips; and / or, the first multiple data paths are each associated with one of a plurality of namespaces.

[0088] According to the eighth data processing system of the ninth aspect of the present application, a ninth data processing system according to the ninth aspect of the present application is provided, wherein each of the first plurality of data paths is coupled to a first resource manager, and the task processing unit of the downstream data path of each of the first plurality of data paths accesses the first resource through the first resource manager.

[0089] According to the ninth data processing system of the ninth aspect of the present application, there is provided a tenth data processing system according to the ninth aspect of the present application, wherein the first resource is associated with the one or more first NVM chips.

[0090] According to the tenth data processing system of the ninth aspect of the present application, an eleventh data processing system according to the ninth aspect of the present application is provided, wherein each of the first multiple data paths is coupled to one of multiple second resource managers, and the task processing unit of the downstream data path of each of the first multiple data paths accesses the second resource through the coupled second resource manager.

[0091] According to one of the sixth to eleventh data processing systems of the ninth aspect of the present application, a twelfth data processing system according to the ninth aspect of the present application is provided, wherein the first sub-command processing unit is coupled to one or more first NVM chips; and / or, the first multiple data paths are each associated with a storage device complying with the SATA protocol, a storage device complying with the open channel protocol, a storage device complying with the key-value (KV) storage protocol, a storage device complying with the NVMe protocol and / or one of multiple namespaces complying with the NVMe protocol.

[0092] According to one of the sixth to twelfth data processing systems of the ninth aspect of the present application, a thirteenth data processing system according to the ninth aspect of the present application is provided, further comprising a second sub-command processing unit; a downstream data path of a third data path of the multiple data paths is coupled to the second sub-command processing unit; the downstream data path of the third data path sends a DTU to the second sub-command processing unit, and the second sub-command processing unit processes a third sub-command indicated by the received DTU; wherein the third sub-command is associated with a command to access a third device, and the third data path corresponds to the third device.

[0093] According to the thirteenth data processing system of the ninth aspect of the present application, a fourteenth data processing system according to the ninth aspect of the present application is provided, wherein the second sub-command processing unit is coupled to one or more random access memory chips; and the third data path is associated with a non-volatile memory device.

[0094] According to the fourteenth data processing system of the ninth aspect of the present application, a fifteenth data processing system according to the ninth aspect of the present application is provided, wherein the second sub-command processing unit obtains the processing result of the third sub-command, and obtains the DTU that carries the third sub-command processed, and provides the third sub-command that carries the processed to the command transmission unit through the uplink data path of the third data path.

[0095] According to one of the sixth to fifteenth data processing systems of the ninth aspect of the present application, a sixteenth data processing system according to the ninth aspect of the present application is provided, wherein the command transmission unit provides a sub-command associated with the management command to the first task processing unit of the fourth data path of the multiple data paths.

[0096] According to one of the first to sixteenth data processing systems of the ninth aspect of the present application, a seventeenth data processing system according to the ninth aspect of the present application is provided, wherein the multiple data paths are coupled to a first resource manager that manages a first resource, and the first resource manager handles conflicts among the multiple data paths using multiple instances of the first resource; and / or, each of the multiple data paths is coupled to one of a plurality of second resource managers that manage a second resource, and each second resource manager exclusively occupies one or more instances of the second resource.

[0097] According to the tenth aspect of the present application, a first data processing method according to the tenth aspect of the present application is provided, which is applied to a data processing system, wherein the data processing unit includes a command transmission unit, multiple data paths and at least one sub-command processing unit, each data path includes an upstream data path and a downstream data path, and the method includes: the command transmission unit allocates a DTU to carry the sub-commands for one or more first sub-commands, and provides the DTU carrying the sub-commands to the downstream data path of the first data path of one of the multiple data paths; wherein the first sub-command is associated with a command to access a first device, and the first data path corresponds to the first device.

[0098] According to the first data processing method of the tenth aspect of the present application, a second data processing method according to the tenth aspect of the present application is provided, and the command transmission unit provides the DTU carrying the first sub-command to the first task processing unit of the downlink data path of the first data path.

[0099] According to the first or second data processing method of the tenth aspect of the present application, a third data processing method according to the tenth aspect of the present application is provided, wherein the command transmission unit allocates a DTU to carry the sub-command for one or more second sub-commands to be processed, and provides the DTU carrying the second sub-command to the first task processing unit of the downlink data path of the second data path; wherein the second sub-command is associated with a command to access the second device, and the second data path corresponds to the second device.

[0100] According to one of the first to third data processing methods of the tenth aspect of the present application, a fourth data processing method according to the tenth aspect of the present application is provided, wherein the multiple data paths each correspond to a device to be accessed by the command; the method also includes: the command transmission unit determines one of the data paths to which the sub-command associated with the command will be provided based on the device to be accessed by the command.

[0101] According to one of the first to fourth data processing methods of the tenth aspect of the present application, a fifth data processing method according to the tenth aspect of the present application is provided, wherein the downlink data path is the downlink data path as described in any one of the above-mentioned fourth aspect; and / or, the uplink data path is the uplink data path as described in any one of the above-mentioned eighth aspect.

[0102] According to one of the first to fifth data processing methods of the tenth aspect of the present application, a sixth data processing method according to the tenth aspect of the present application is provided, wherein the downlink data paths of the first plurality of data paths among the multiple data paths are all coupled to the first sub-command processing unit, and the method further includes: the downlink data paths of the first plurality of data paths all send a DTU to the first sub-command processing unit; the first sub-command processing unit caches multiple DTUs and processes multiple sub-commands indicated by the multiple DTUs, where the multiple DTUs are sent to the first sub-command processing unit by the first plurality of data paths.

[0103] According to the sixth data processing method of the tenth aspect of the present application, a seventh data processing method according to the tenth aspect of the present application is provided, wherein the data processing system also includes a monitoring unit, and the first sub-command processing unit is coupled to the monitoring unit, and the method also includes: the monitoring unit obtains the processing result of the sub-command from at least one sub-command processing unit; the monitoring unit obtains the DTU carrying the processed sub-command, obtains at least one callback function index from the DTU of the processed sub-command, and calls the callback function indicated by the at least one callback function index.

[0104] According to one of the first to seventh data processing methods of the tenth aspect of the present application, an eighth data processing method according to the tenth aspect of the present application is provided, wherein the data processing system also includes a resource manager; each of the first plurality of data paths is coupled to the first resource manager; the method also includes: the task processing unit of the downstream data path of each of the first plurality of data paths accesses the first resource through the first resource manager.

[0105] According to the seventh or eighth data processing method of the tenth aspect of the present application, a ninth data processing method according to the tenth aspect of the present application is provided, which further includes: after the command transmission unit receives the processing results of one or more sub-commands provided by the uplink data path through which the data passes, the processing results of the one or more sub-commands are merged into the processing result of one command.

[0106] According to the ninth data processing method of the tenth aspect of the present application, a tenth data processing method according to the tenth aspect of the present application is provided, which also includes: after receiving the processing results of all sub-commands associated with a command, merging the processing results of all sub-commands into a processing result of one command.

[0107] According to the sixth or seventh data processing method of the tenth aspect of the present application, an eleventh data processing method according to the tenth aspect of the present application is provided, wherein the data processing system also includes a second sub-command processing unit; the downlink data path of the third data path of the multiple data paths is coupled to the second sub-command processing unit; the method also includes: the downlink data path of the third data path sends the DTU to the second sub-command processing unit, and the second sub-command processing unit processes the third sub-command indicated by the received DTU; wherein the third sub-command is associated with a command to access a third device, and the third data path corresponds to the third device.

[0108] According to the eleventh data processing method of the tenth aspect of the present application, a twelfth data processing method according to the tenth aspect of the present application is provided, wherein the second sub-command processing unit is coupled to one or more random access memory chips; and the third data path is associated with a non-volatile memory device.

[0109] According to the twelfth data processing method of the tenth aspect of the present application, a thirteenth data processing method according to the tenth aspect of the present application is provided, the method also including: the second sub-command processing unit obtains the processing result of the third sub-command, and obtains the DTU that carries the third sub-command processed, and provides the third sub-command that carries the processed to the command transmission unit through the uplink data path of the third data path.

[0110] According to one of the first to thirteenth data processing methods of the tenth aspect of the present application, a fourteenth data processing method according to the tenth aspect of the present application is provided, wherein the multiple data paths are coupled to a first resource manager that manages a first resource, and the first resource manager handles conflicts among the multiple data paths using multiple instances of the first resource; and / or, each of the multiple data paths is coupled to one of a plurality of second resource managers that manage a second resource, and each second resource manager exclusively occupies one or more instances of the second resource.

[0111] According to the eleventh aspect of the present application, a first storage device according to the eleventh aspect of the present application is provided, comprising at least one storage chip and at least one data path, each data path corresponding to one or more storage chips; in response to receiving a command, the storage device accesses the storage chip corresponding to the one data path through one data path in the at least one data path, and completes the operation indicated by the command, the operation including a read operation, a write operation, and an erase operation.

[0112] According to the first storage device of the eleventh aspect of the present application, a second storage device according to the eleventh aspect of the present application is provided, at least one data path includes at least one of a first type of path, a second type of path and a third type of path, and the first type of path, the second type of path and the third type of path have at least one identical or different task processing unit.

[0113] According to the second storage device of the eleventh aspect of the present application, there is provided the third storage device according to the eleventh aspect of the present application, wherein the at least one data path further includes a fourth type of path, and the fourth type of path processes management commands.

[0114] According to the second storage device of the eleventh aspect of the present application, a fourth storage device according to the eleventh aspect of the present application is provided, each data path includes a first task processing unit, a second task processing unit and a third task processing unit, wherein the first task processing unit processes the cache task and the second task processing unit processes the address conversion task.

[0115] According to the second or fourth storage device of the eleventh aspect of the present application, a fifth storage device according to the eleventh aspect of the present application is provided, and the second type of path and the first type of path include a third task processing unit, and the third task processing unit processes the data assembly task.

[0116] According to the second, fourth or fifth storage device of the eleventh aspect of the present application, there is provided a sixth storage device according to the eleventh aspect of the present application, wherein the first type of path includes a fourth task processing unit, and the fourth task processing unit processes garbage collection tasks.

[0117] According to one of the first to sixth storage devices of the eleventh aspect of the present application, a seventh storage device according to the eleventh aspect of the present application is provided, wherein the storage chip corresponding to the third type of path is a RAM chip; and the storage chip corresponding to the first type of path or the second type of path is an NVM chip.

[0118] According to one of the first to seventh storage devices of the eleventh aspect of the present application, an eighth storage device according to the eleventh aspect of the present application is provided, and the storage device also includes a command transmission unit; in response to receiving a command, the command transmission unit splits the command into at least one sub-command, and determines the type of data path to which the sub-commands split from the command will be provided based on the identification information carried by the command.

[0119] According to the eighth storage device of the eleventh aspect of the present application, a ninth storage device according to the eleventh aspect of the present application is provided, wherein the command transmission unit sends the at least one sub-command to the first data path to access the first storage chip through the first data path; wherein the identification information indicates that the object of the operation is the first storage chip, and the first data path is a data path corresponding to the first storage chip.

[0120] According to the eighth or ninth storage device of the eleventh aspect of the present application, a tenth storage device according to the eleventh aspect of the present application is provided, wherein the command transmission unit determines the first storage chip to be accessed based on the identification information; and determines the first data path based on the correspondence between the storage chip and the data path.

[0121] According to the first storage device of the eleventh aspect of the present application, an eleventh storage device according to the eleventh aspect of the present application is provided, the storage device includes multiple command transmission units and command allocation units, each command transmission unit corresponds to a data path; in response to receiving a command, the command allocation unit determines the first command transmission unit according to the identification information carried by the command, the first command transmission unit corresponds to the first data path, the identification information indicates that the object of the operation is the first storage chip, and the first data path is the data path corresponding to the first storage chip; the first command transmission unit splits the command into at least one sub-command, and sends the at least one sub-command to the first data path to access the first storage chip through the first data path.

[0122] According to the twelfth aspect of the present application, a first data path according to the twelfth aspect of the present application is provided, including a channel, at least one task processing unit and at least one resource manager, the at least one resource manager managing different types of resources; when processing a sub-command, the at least one task processing unit requests the at least one resource manager to allocate resources; in response to obtaining resources, the at least one task processing unit allocates the obtained resources to a DTU, the DTU being obtained from the channel by the at least one task processing unit, and the DTU carrying the sub-command; in response to completion of use of the resources allocated to the DTU, the at least one task processing unit releases the resources to the at least one resource manager.

[0123] According to the first data path of the twelfth aspect of the present application, a second data path according to the twelfth aspect of the present application is provided, and when processing a sub-command, the at least one task processing unit determines whether to request resources from at least one resource manager based on the type of the sub-command; when the judgment result is no, no resources are requested from at least one resource manager.

[0124] According to the first or second data path of the twelfth aspect of the present application, a third data path according to the twelfth aspect of the present application is provided. When at least one task processing unit allocates multiple resources to the DTU, after the multiple resources are all used up, the at least one task processing unit releases the resources to at least one resource manager; in response to the resources being released, the at least one resource manager reclaims the multiple resources.

[0125] According to the third data path of the twelfth aspect of the present application, a fourth data path according to the twelfth aspect of the present application is provided, wherein each task processing unit of at least one task processing unit releases at least one resource allocated to the DTU by itself; or, the first task processing unit of at least one task processing unit releases at least one resource allocated to the DTU by the second task processing unit of at least one task processing unit.

[0126] According to one of the first to fourth data paths of the twelfth aspect of the present application, a fifth data path according to the twelfth aspect of the present application is provided, and according to the type of resources, each task processing unit allocates a type of resource to the DTU, and each task processing unit releases at least one resource of its own corresponding resource type.

[0127] According to the first data path of the twelfth aspect of the present application, a sixth data path according to the twelfth aspect of the present application is provided, wherein the data path includes a resource manager, which manages at least one type of resource; in response to a resource allocation request, the resource manager allocates at least one resource and provides it to at least one task processing unit; wherein, when the number of at least one resource is greater than 1, the type of at least one resource is different.

[0128] According to the first data path of the twelfth aspect of the present application, a seventh data path according to the twelfth aspect of the present application is provided, wherein the data path includes multiple resource managers, and the multiple resource managers manage multiple types of resources; in response to resource allocation requests, the multiple resource managers allocate multiple different types of resources and provide them to multiple task processing units.

[0129] According to one of the first to seventh data paths of the twelfth aspect of the present application, an eighth data path according to the twelfth aspect of the present application is provided, and when at least one task processing unit allocates the obtained resources to the DTU, the at least one task processing unit also writes a callback function index in the DTU, and the callback function index points to a callback function in the at least one task processing unit.

[0130] According to the eighth data path of the twelfth aspect of the present application, there is provided the ninth data path according to the twelfth aspect of the present application, which releases resources to at least one resource manager when the callback function is called.

[0131] According to one of the first to ninth data paths of the twelfth aspect of the present application, a tenth data path according to the twelfth aspect of the present application is provided, and at least one task processing unit sends a resource release request to at least one resource manager during data downlink transmission or data uplink transmission.

[0132] According to one of the first to tenth data paths of the twelfth aspect of the present application, an eleventh data path according to the twelfth aspect of the present application is provided, and after at least one task processing unit obtains the DTU from the channel, it determines whether the resources allocated to the DTU are used up; when the judgment result is yes, the at least one task processing unit releases the resources to at least one resource manager.

[0133] According to the eleventh data path of the twelfth aspect of the present application, a twelfth data path according to the twelfth aspect of the present application is provided. If it is determined that the multiple resources allocated to the DTU have been used up, at least one task processing unit releases the multiple resources in sequence in the positive or reverse order of the allocation order of the multiple resources.

[0134] According to one of the first to twelfth data paths of the twelfth aspect of the present application, a thirteenth data path according to the twelfth aspect of the present application is provided, and the channel includes a monitoring unit; the monitoring unit monitors the occurrence of adding or removing DTUs to the channel in which it is located, and notifies one or more resource managers in response.

[0135] According to the thirteenth data path of the twelfth aspect of the present application, a fourteenth data path according to the twelfth aspect of the present application is provided, wherein the monitoring unit records the monitoring functions registered with it by one or more resource managers; in response to the monitoring unit adding a DTU or removing a DTU to the channel where it is located, the registered monitoring function is called to notify the one or more resource managers.

[0136] According to the thirteenth or fourteenth data path of the twelfth aspect of the present application, a fifteenth data path according to the twelfth aspect of the present application is provided, and the monitoring unit notifies the resource manager to request allocation of resources for the DTU; and / or, the monitoring unit notifies the resource manager that the status of the resources it manages has changed.

[0137] According to the thirteenth aspect of the present application, a first resource management method according to the thirteenth aspect of the present application is provided, which is applied to a task processing unit, the method including: obtaining a DTU from a channel, the DTU carrying a sub-command; when processing the sub-command, requesting at least one resource manager to allocate resources; in response to obtaining resources from the resource manager, allocating the obtained resources to the DTU; in response to completion of use of the resources allocated to the DTU, releasing the resources to at least one resource manager.

[0138] According to the first resource management method of the thirteenth aspect of the present application, a second resource management method according to the thirteenth aspect of the present application is provided. Before requesting resource allocation to at least one resource manager, the method also includes: judging whether to request resource allocation based on the type of sub-command; when the judgment result is no, no resource allocation is requested.

[0139] According to the first or second resource management method of the thirteenth aspect of the present application, a third resource management method according to the thirteenth aspect of the present application is provided, wherein when processing a sub-command, requesting resource allocation to at least one resource manager includes: requesting resource allocation to one resource manager so that one resource manager allocates one resource; or, requesting resource allocation to one resource manager so that one resource manager allocates multiple resources; or, requesting resource allocation to multiple resource managers so that multiple resource managers allocate multiple resources; wherein, the multiple resource managers allocating multiple resources includes: multiple resource managers respectively allocating one resource, and each of the multiple resources is of a different type.

[0140] According to one of the first to third resource management methods of the thirteenth aspect of the present application, a fourth resource management method according to the thirteenth aspect of the present application is provided, wherein in response to obtaining resources from the resource manager, allocating the obtained resources to the DTU includes: when one resource is obtained from the resource manager, allocating the one resource to the DTU; or, when multiple resources are obtained from the resource manager, allocating the multiple resources to the DTU in the order of requested allocation.

[0141] According to the fourth resource management method of the thirteenth aspect of the present application, a fifth resource management method according to the thirteenth aspect of the present application is provided, and when resources are allocated to the DTU, a callback function index is also written in the DTU, including: when multiple resources are allocated to the DTU, at least one callback function index is written in the DTU; wherein, writing multiple callback function indexes in the DTU includes: writing the indexes of multiple callback functions in ascending or descending order according to the allocation order of multiple resources.

[0142] According to one of the first to fifth resource management methods of the thirteenth aspect of the present application, there is provided a sixth resource management method according to the thirteenth aspect of the present application, wherein before releasing resources to at least one resource manager in response to completion of use of resources allocated to the DTU, the method further comprises: determining whether the resources allocated to the DTU are completely used;

[0143] When the judgment result is yes, it is determined that the resources allocated to the DTU are completely used.

[0144] According to the fifth or sixth resource management method of the thirteenth aspect of the present application, a seventh resource management method according to the thirteenth aspect of the present application is provided, wherein in response to the completion of the use of the resources allocated to the DTU, the resources are released to at least one resource manager, including: calling at least one callback function through at least one callback function index in the DTU to release at least one resource; wherein, when calling multiple callback functions, the multiple callback functions are called sequentially in forward or reverse order according to the allocation order of the multiple resources.

[0145] According to the fourteenth aspect of the present application, a first information processing device according to the fourteenth aspect of the present application is provided, comprising a memory, a processor, and a program stored on the memory and executable on the processor, wherein when the processor executes the program, a method as described in any one of the above-mentioned thirteenth aspects is implemented.

[0146] According to the fifteenth aspect of the present application, a first resource management method according to the fifteenth aspect of the present application is provided, which is applied to a resource manager, and the method includes: allocating resources to at least one task processing unit in response to a request for resource allocation from at least one task processing unit; and reclaiming the allocated resources in response to a resource release request from at least one task processing unit.

[0147] According to the first resource management method of the fifteenth aspect of the present application, a second resource management method according to the fifteenth aspect of the present application is provided, wherein in response to at least one task processing unit requesting resource allocation, resources are allocated to at least one task processing unit, including: in response to a task processing unit requesting allocation of a resource, one resource is allocated to the task processing unit; or, in response to a task processing unit requesting allocation of a resource once, multiple resources are allocated to the task processing unit, and the types of the multiple resources are different; or, in response to multiple task processing units requesting allocation of multiple resources, multiple resources are allocated to the multiple task processing units, and the types of the multiple resources are the same or different, and each of the multiple task processing units obtains at least one resource.

[0148] According to the first or second resource management method of the fifteenth aspect of the present application, a third resource management method according to the fifteenth aspect of the present application is provided, wherein the method of recovering the allocated resources in response to at least one task processing unit releasing resources includes: recovering an allocated resource in response to a task processing unit releasing a resource; or, recovering multiple allocated resources in response to a task processing unit releasing a resource once, where the types of the multiple resources are different; or, recovering multiple allocated resources in response to multiple task processing units releasing multiple resources, where the types of the multiple resources are the same or different.

[0149] According to the sixteenth aspect of the present application, a first information processing device according to the sixteenth aspect of the present application is provided, comprising a memory, a processor, and a program stored on the memory and executable on the processor, wherein when the processor executes the program, the method as described in any one of the fifteenth aspects above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0150] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0151] Figure 1A A schematic diagram of task scheduling in the prior art;

[0152] Figure 1B A block diagram of a task processing system in the prior art;

[0153] Figure 2A A block diagram of a task processing system provided in an embodiment of the present application;

[0154] Figure 2B A block diagram of a task processing unit provided in an embodiment of the present application;

[0155] Figure 2C A schematic diagram of the process of processing DTU provided in an embodiment of the present application;

[0156] Figure 2D A block diagram of a channel provided in an embodiment of the present application;

[0157] Figure 3A A schematic diagram of a downlink data path provided in an embodiment of the present application;

[0158] Figure 3B A schematic diagram of a process for constructing a downlink path according to an embodiment of the present application;

[0159] Figure 3C A schematic diagram of another downlink data path provided in an embodiment of the present application;

[0160] Figure 4A A schematic diagram of another downlink data path provided in an embodiment of the present application;

[0161] Figure 4B A schematic diagram of another downlink data path provided in an embodiment of the present application;

[0162] Figure 5A A schematic diagram of an uplink data path provided in an embodiment of the present application;

[0163] Figure 5B A schematic diagram of another uplink data path provided in an embodiment of the present application;

[0164] Figure 5C A schematic diagram of a process for establishing an uplink path according to an embodiment of the present application;

[0165] Figure 5D A schematic diagram of a DTU provided in an embodiment of the present application;

[0166] Figure 6A A schematic diagram of resource management provided in an embodiment of the present application;

[0167] Figure 6B A schematic diagram of another resource management provided in an embodiment of the present application;

[0168] Figure 6C A schematic diagram of another resource management provided in an embodiment of the present application;

[0169] Figure 7 A block diagram of a storage device provided in an embodiment of the present application;

[0170] Figure 8A A block diagram of another storage device provided in an embodiment of the present application;

[0171] Figure 8B A block diagram of another storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0172] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0173] Figure 2A A block diagram of a task processing system for a storage device according to an embodiment of the present application is shown.

[0174] The CPU in the storage device's control unit runs software (also known as firmware). This software includes a scheduler, task processing units, and a channel and resource manager. The scheduler schedules the execution of task processing units. Task processing units are operating system threads, processes, tasks, or other software units that can be scheduled by the scheduler.

[0175] The task processing unit, channel and resource manager each include one or more instances. Figure 2A4 task processing units (210, 212, 214 and 216), 4 channels (220, 222, 224 and 226) and 2 resource managers (240 and 245) are shown.

[0176] Channels are used for communication between task processing units. The message units carried by a channel are called Data Transfer Units (DTUs). For example, a DTU corresponds to a subcommand. Each subcommand is assigned a DTU to carry the subcommand's context and track the subcommand's processing and results. A DTU is, for example, an instance of an encapsulated data structure. Subcommands, for example, access the same amount of memory. A channel includes, for example, a DTU list to accommodate one or more DTUs.

[0177] The channel also includes functions for handling DTU operations, such as push functions for adding DTUs to the DTU list and / or functions for retrieving DTUs from the DTU list. Optionally, custom callback functions can also be registered with the channel. These callback functions are used, for example, to invoke services provided by the resource manager.

[0178] According to an embodiment of the present application, a channel instance may be bound to a task processing unit. A channel receives DTUs from one or more bound task processing units and provides DTUs to only one bound task processing unit.

[0179] According to an embodiment of the present application, only the task processing unit can use the channel, and the scheduler cannot call or schedule the channel instance. The index of the channel instance bound to it is recorded in the task processing unit, so that the task processing unit can operate the channel instance through, for example, Push / Pop functions.

[0180] By binding channel instances between task processing unit instances, the task processing unit obtains the DTU from the bound channel, processes the sub-commands carried by the DTU, and adds the processed sub-commands to other channels through the DTU. In this way, the task processing unit instances are coupled through channels, so that the task processing unit instances are decoupled and can be executed concurrently and asynchronously. The execution process and current state of a task processing unit instance do not affect (for example, block) the execution of other task processing unit instances. If the control component includes multiple CPUs, each CPU can process each task processing unit instance in parallel.

[0181] The resource manager manages the use of specified resources, such as allocation, release and / or recycling. The resource manager is only called by the task processing unit and / or channel, and is not called or scheduled by the channel. According to one embodiment, the resources shared by multiple task processing units in the task processing system (for example, the FTL table (recording the mapping of the logical address of the storage device to the physical address of the NVM chip) or the cache) are managed by the resource manager. The task processing unit accesses the specified resource through the specified resource management unit. If there is a conflict in the access of multiple task processing unit instances to the specified resource, the resource management unit resolves the conflict by locking, queuing, etc.

[0182] Figure 2B A block diagram of a task processing unit according to an embodiment of the present application is shown. Figure 2C A flowchart implemented by a task processing unit according to an embodiment of the present application is shown.

[0183] See Figure 2B ,The task processing unit includes an inbound interface, an outbound interface, a DTU processing module and one or more optional callback functions.

[0184] The inbound interface obtains a DTU from the channel bound to the task processing unit. For example, the DTU is obtained from the DTU list by calling the Pop function of the bound channel. The outbound interface adds a DTU to the channel bound to the task processing unit. For example, the DTU is added to the DTU list by calling the Push function of the bound channel. The DTU processing module extracts subcommands from the DTU obtained from the inbound interface, processes the subcommands, and carries the processed subcommands in the DTU and adds it to the channel via the outbound interface. The DTU processing module optionally adds the index of one or more callback functions to the DTU to establish an uplink data path. The implementation method of establishing the uplink data path will be described in detail later.

[0185] Optionally, the task processing unit includes two or more inbound interfaces and / or two or more outbound interfaces, each of which is coupled to one of the channels, and each of which is coupled to one of the channels.

[0186] According to an embodiment of the present application, the task processing system provides templates such as task processing units, channels, and resource managers. For example, a programmer user copies the template and adds the required code to the copied template to build a task processing unit. Taking the task processing unit as an example, its reusable parts (such as inbound interface, outbound interface, DTU processing module) are provided by the template, and it is necessary to set the channel instance coupled to the inbound interface, the channel instance coupled to the outbound interface and the function of processing sub-commands to be implemented by the task processing unit (for example, allocating a cache for the sub-command, or querying the physical address to be accessed for the sub-command). Thus, when constructing the task processing unit, it is only necessary to focus on the implementation of the specific functions of the task processing unit instance, without having to worry about how to obtain the sub-commands to be processed, how to process the sub-commands concurrently, and other issues.

[0187] Figure 2C The flowchart of how the DTU processing unit processes DTUs is shown.

[0188] See Figure 2C , DTU processing unit (see also Figure 2B ) obtains a DTU (260) from a channel coupled to each inbound interface of the task processing unit in which it is located. The DTU processing unit polls each inbound interface with a DTU to be processed. Optionally, the multiple inbound interfaces of the task processing unit each have a priority, and the DTU processing unit obtains a DTU from each inbound interface according to the priority.

[0189] The obtained DTU carries the subcommand. The DTU processing unit obtains the subcommand from the DTU and processes the subcommand according to the content of the subcommand (262). Optionally, the DTU processing unit of each task processing unit implements the processing of a specific stage of the subcommand. The processing of the subcommand by multiple task processing units can be the same or different. For example, two task processing units process the same stage of the subcommand, so that the two task processing units process the two subcommands in parallel. As another example, the two task processing units process different stages of the subcommand, so that the two task processing units process the same subcommand in sequence.

[0190] The subcommand processed by the DTU processing unit is still carried by the DTU. The DTU processing unit sends the DTU carrying the subcommand it has processed through the outbound interface (264). The channel coupled to the outbound interface is coupled to other task processing units. For example, the DTU processing unit selects one of the outbound interfaces to send the DTU based on the processing that the subcommand carried by the DTU will undergo next. Optionally, the multiple outbound interfaces of the task processing unit each have a priority, and the DTU processing unit sends the DTU through each outbound interface according to the priority.

[0191] Figure 2D A block diagram of a channel according to an embodiment of the present application is shown.

[0192] The channel includes a DTU list and multiple functions (270, 272, 274) for operating the DTU list. The DTU list can accommodate multiple DTUs. A task processing unit coupled to the channel calls the Push function (270) (via an outbound interface) to add a DTU to the DTU list, and calls the Pop function (274) (via an inbound interface) to retrieve a DTU from the DTU list.

[0193] It may take a long time from the time a DTU is added to the DTU list to the time the DTU is taken out from the DTU list. For example, if the DTU list is implemented as a queue, the DTU is added to the end of the queue and will not be taken out from the queue until it becomes the head of the queue. However, some subcommands represented by DTUs are expected to be processed with low latency. Therefore, optionally, the channel also includes a Push function (272). The Push function (272) is different from the Push function (270). The task processing unit coupled to the channel calls the Push function (272) to provide the DTU to the channel, and in response, the direct forwarding unit of the channel obtains the DTU from the Push function (272), and also calls the function indicated by the destination index, and provides the obtained DTU to the function indicated by the destination index to complete the delivery of the DTU. Thus, the DTU provided to the channel by calling the Push function (272) of the channel is provided to the function indicated by the destination index and is immediately processed by the function, reducing the time the DTU stays in the channel. The function indicated by the destination index is the function of the task processing unit that receives the DTU from the channel. Thus, the Push function (272), the direct forwarding unit and the destination index constitute a path for fast processing of DTUs of the channel.

[0194] The channel's DTU list, multiple functions that manipulate the DTU list, and the direct forwarding unit are reusable components provided by the template. When a channel is instantiated, storage space is provided for the DTU list to accommodate DTUs. Optionally, a destination index is also set to indicate to the channel's direct forwarding unit the function that receives the DTU.

[0195] Optionally, the channel further includes a monitoring unit that monitors operations on the DTU list (eg, adding and / or removing) and / or monitors direct forwarding operations on the DTU.

[0196] According to an optional embodiment, one or more resource managers monitor the operation of adding a DTU to the DTU list through the Push function (270) through a monitoring unit, so that the resource manager can timely know that resources related to the DTU are used, or allocate required resources to the DTU.

[0197] As an example, the resource manager registers monitoring functions with the monitoring unit. In response to the Push function (270) being called, one or more registered monitoring functions are called. The DTU added to the channel by the Push function (270) or the parameters carried by it are used as parameters of the monitoring function.

[0198] As an example, a DTU added to a channel and waiting to be processed by another task processing unit requires certain resources, and the allocation of these resources takes time. In response to the DTU being added to the channel, the monitoring function requests these resources from the corresponding resource manager, thereby appropriately advancing the resource request operation. When the task processing unit obtains the DTU from the channel, the resources have already been allocated to it, reducing the latency of processing the DTU (hiding the resource allocation time).

[0199] As another example, the resource manager needs to monitor the status of a certain resource. For example, a storage medium resource for storing data has, in addition to the "idle" and "used" states, the data stored in the storage medium in the "used" state may become invalid due to an update and be in the "invalid" state. The resource manager maintains the state of the storage medium. The transition from the "used" state to the "idle" state is triggered by a resource release operation, while the transition from the "idle" state to the "used" state is triggered by a resource allocation operation. According to an embodiment of the present application, the resource manager learns about the transition from the "used" state to the "invalid" state by monitoring the operation of the channel's Push function (270) or the operation of the DTU list. For example, the monitoring function obtains the logical address and physical address corresponding to the DTU that carries the write subcommand, and records the state of the storage medium corresponding to the physical address as "invalid". Therefore, the task processing unit or other parties do not need to notify the resource manager of this state change in other ways.

[0200] Figure 3A A schematic diagram of a downlink data path according to an embodiment of the present application is shown.

[0201] According to an embodiment of the present application, the data path includes a downlink data path and an uplink data path. The downlink data path is used to process subcommands of IO commands, and the uplink data path is used to collect and deliver processing results of the subcommands.

[0202] The downlink data path includes task processing units (310, 312, 314, 316) and channels (320, 322, 324) connecting the task processing units and transmitting DTUs between the data processing units.

[0203] A channel connects two or more data processing units. A channel transmits DTUs in one direction. Thus, the multiple task processing units connected by the channel are in a producer-consumer relationship with DTUs. Figure 3A, the task processing unit 310 provides DTUs to the task processing unit 314 through the channel 320 and is a producer, and the task processing unit 314 is a consumer of the DTUs produced by the task processing unit 310. The task processing unit 312 also provides DTUs to the task processing unit 314 through the channel 320. According to an embodiment of the present application, a channel can be coupled to one or more task processing units that are DTU producers (for example, task processing units 310 and 312 relative to the channel 320), but is only coupled to one task processing unit that is a DTU consumer (for example, task processing unit 316 relative to the channel 320). The task processing unit can send DTUs to multiple channels and can also receive DTUs from multiple channels. For example, the task processing unit 312 sends DTUs to two channels (320 and 324), and the task processing unit receives DTUs from two channels (322 and 324).

[0204] In an optional embodiment, the scheduler schedules a task processing unit (TPU) coupled to a channel as a consumer for execution, or places the TPU in a schedulable state, in response to a channel having DTUs to be processed. After being scheduled for execution, the TPU obtains and processes DTUs from the channel to which it is coupled.

[0205] A downstream data path can be constructed. To construct the downstream data path, one or more task processing units and one or more channels are created. The created channels are bound to the created task processing units, and the task processing units are instructed to obtain DTUs from or deliver DTUs through the channels.

[0206] The downlink data path is constructed when the task processing system is initialized. Optionally, the downlink data path is constructed during the operation of the task processing system, or an already constructed downlink data path is modified.

[0207] Figure 3B A flowchart for building a downstream data path is shown.

[0208] One or more task processing units (340) and one or more channels (350) are created for constructing a downlink data path. For example, Figure 3A The downstream data path shown creates task processing units (310, 312, 314, and 316) and channels (320, 322, and 324).

[0209] According to the specified coupling relationship, the created channel is bound to the inbound interface / outbound interface (360) of the task processing unit. Still as an example, to build Figure 3AIn the illustrated downlink data channel, channel 320 is bound to the outbound interface of task processing unit 310 and the outbound interface of task processing unit 312. Channel 320 is also bound to the inbound interface of task processing unit 314. Channel 322 is bound to the outbound interface of task processing unit 314 and the inbound interface of task processing unit 316. Channel 324 is bound to the outbound interface of task processing unit 312 and the inbound interface of task processing unit 316.

[0210] Figure 3C A schematic diagram of a downlink data path according to another embodiment of the present application is shown.

[0211] The cache management unit 380 , the address mapping unit 382 , and the array assembly unit 384 are task processing units that implement different processing functions for sub-commands. Figure 3C The downstream data path 300 shown includes a plurality of channels (370, 372 and 374), a plurality of task processing units (cache management unit 380, address mapping unit 382 and data assembly unit 384) and a plurality of resource managers (390, 392 and 394). Figure 3C The downstream data path shown is used to implement the functions of the storage device.

[0212] The storage device also includes a command transmission unit 302 and a sub-command processing unit 304. Optionally, the command transmission unit 302 exchanges IO commands with the host according to a specified storage protocol. The command transmission unit splits the IO command into one or more sub-commands, uses an allocated DTU to carry the sub-commands, and delivers the DTU to the downstream data path 300. The downstream data path 300 processes the sub-commands in one or more stages and finally delivers the DTU to the sub-command processing unit 304. The sub-command processing unit 304 converts the sub-commands carried by the DTU into commands for accessing the storage medium. As an example, the sub-command processing unit 304 is a media interface controller. The sub-command processing unit 304 also queries the storage medium to obtain the result of processing the sub-command, and the upstream data path through which the data passes delivers the processing result of the sub-command to the command transmission unit 302. If necessary, the command transmission unit 302 will collect the processing results of all sub-commands split from the same IO command and indicate to the host that the IO command processing is complete.

[0213] As an example, the command transmission unit 302 adds a DTU to the channel 370, and the DTU carrying the subcommand is provided to the cache management unit 380 through the channel 370. The cache management unit 380 allocates a cache for the subcommand and moves the data accessed by the subcommand to the allocated cache. The cache management unit 380 is associated with the resource manager 390. The resource manager 390 manages cache resources, for example, manages the allocation and release of cache resources. In response to the subcommand carried by the DTU obtained from the channel 370, the cache management unit 380 requests the resource manager 390 to allocate a cache. The cache allocated for the subcommand is also recorded in the DTU carrying the subcommand. In response to moving the data accessed by the subcommand to the cache, the cache management unit 380 completes the processing of the subcommand and sends the DTU carrying the subcommand to the channel 372.

[0214] Optionally, the command transmission unit 302 processes IO commands that comply with multiple storage protocols, including, for example, SAS / SATA protocol, OpenChannel protocol, Key-Value storage protocol and / or NVMe protocol.

[0215] The address mapping unit 380 obtains the DTU from the channel 372 and obtains the subcommand carried by the DTU. The address mapping unit 380 assigns a physical address to the subcommand and establishes a mapping between the logical address to be accessed by the subcommand and the physical address. The address mapping unit is associated with the resource manager 392. The resource manager 392 manages the address mapping table, which records the mapping relationship between all logical addresses and physical addresses of the storage device. In response to the DTU, the address mapping unit 382 requests the resource manager 392 to allocate it an entry associated with the logical address accessed by the subcommand carried by the DTU, and the entry records the association relationship between the logical address and the physical address. The entry assigned to the subcommand is also recorded in the DTU carrying the subcommand. In response to obtaining the physical address accessed by the subcommand, the cache management unit 382 completes the processing of the subcommand and sends the DTU carrying the subcommand to the channel 374.

[0216] Data assembly unit 384 obtains a DTU from channel 374 and the subcommand carried by the DTU. Data assembly unit 384 assembles the data to be accessed by the subcommand to generate a command to write the data to the storage medium. Data assembly unit 384 is associated with resource manager 394. Resource manager 394 manages an accelerator for XOR calculations (referred to as an "XOR unit"). In response to a DTU, data assembly unit 384 requests resource manager 394 to allocate an XOR unit to it.

[0217] The data assembly unit 384 operates the subcommand processing unit 304 to write the assembled data to the storage medium. Optionally, the data assembly unit 384 also releases one or more resources allocated to the unchanged DTU to the resource manager (390, 392 and / or 394) based on the record in the DTU.

[0218] Figure 4A A schematic diagram of a downlink data path according to another embodiment of the present application is shown.

[0219] The cache management unit 410 , the address mapping unit 412 , the array assembly unit 414 , the log unit 416 , and the garbage collection unit 418 are task processing units with different functions. Figure 4A The downstream data path shown includes multiple channels (420, 421, 422, 424, 426 and 428) and multiple task processing units (cache management unit 410, address mapping unit 412, data assembly unit 414, log unit 416 and garbage collection unit 418). Figure 4A The downstream data path is used to implement the functions of the storage device. The storage device also includes a command transmission unit 402 and a sub-command processing unit 404.

[0220] For example, command transmission unit 402 adds a DTU to channel 420. The DTU carrying the subcommand is provided to cache management unit 410 via channel 420. The DTU processed by cache management unit 410 is added to channel 422. Address mapping unit 412 obtains the DTU from channel 422 and adds the processed DTU to channel 424. Data assembly unit 414 obtains the DTU from channel 424 and accesses the storage medium through subcommand processing unit 404 based on the subcommand carried by the DTU.

[0221] Data assembly unit 414 also generates a DTU and adds it to channel 426. Log unit 416 obtains the DTU from channel 416, generates a log to be recorded based on the DTU, and adds the processed DTU to channel 428. Data assembly unit 414 also obtains the DTU from channel 428 and writes the log to the storage medium according to the subcommand carried by the DTU.

[0222] The garbage collection unit 418 generates a DTU of a subcommand indicating a garbage collection operation and adds the DTU to the channel 421. The cache management unit also obtains the DTU from the channel 421 and processes the subcommand therein.

[0223] Figure 4B A schematic diagram of a downlink data path according to yet another embodiment of the present application is shown.

[0224] Figure 4BThe downstream data path shown includes multiple channels (420, 421, 422, 424, 426, 428, 431, 430, 432 and 434) and multiple task processing units (cache management unit 410, cache management unit 411, address mapping unit 412, address mapping unit 413, data assembly unit 414, log unit 416 and garbage collection unit 418).

[0225] same Figure 4A Compared with the downlink data path shown, Figure 4B The downlink data path shown includes two cache management units and two address mapping units. The cache management unit 411 works in parallel with the cache management unit 410. The address mapping unit 413 works in parallel with the address mapping unit 412. Figure 4B The illustrated downlink data path is capable of processing multiple sub-commands provided by the command transmission unit 402 in parallel, thereby enhancing the sub-command processing capability.

[0226] For example, command transmission unit 402 adds a DTU to channel 420. The DTU carrying the subcommand is provided to cache management unit 410 via channel 420. The DTU processed by cache management unit 410 is added to channel 422. Address mapping unit 412 obtains the DTU from channel 422 and adds the processed DTU to channel 424. Data assembly unit 414 obtains the DTU from channel 424 and accesses the storage medium through subcommand processing unit 404 based on the subcommand carried by the DTU.

[0227] Data assembly unit 414 also generates a DTU and adds it to channel 426. Log unit 416 obtains the DTU from channel 416, generates a log to be recorded based on the DTU, and adds the processed DTU to channel 428. Data assembly unit 414 also obtains the DTU from channel 428 and writes the log to the storage medium according to the subcommand carried by the DTU.

[0228] The garbage collection unit 418 generates a DTU of a subcommand indicating a garbage collection operation and adds the DTU to the channel 421. The cache management unit also obtains the DTU from the channel 421 and processes the subcommand therein.

[0229] According to the embodiment of the present application, it is convenient to enhance the processing capability of the task processing system. Figure 4BBy providing a plurality of parallel task processing units and channels coupled thereto for the downstream data path, the task processing capability is enhanced. Since the task processing units are schedulable, when, for example, the number of processor cores or the number of threads of the control component of the storage device increases, the task processing units added on the downstream data path are able to utilize the increased processor cores or threads, so that the increased processor cores or threads are conveniently and fully utilized to process more sub-commands in parallel. In some cases, due to the imbalance of the various stages of sub-command processing, it is difficult to find the most appropriate division and optimal resource allocation for each stage of processing. For example, the workload of the cache management and address mapping stages is heavier than that of the log management. According to the embodiments of the present application, the adjustment of the downstream data path becomes simple. By adjusting the downstream data path and testing the settings of different numbers of task processing units and / or channels, the optimal or better downstream data path structure can be easily found.

[0230] A DTU carries one or more subcommands, and the downlink data path allocates one or more resources to process the DTU. After processing the subcommands carried by the DTU, the various resources allocated to the DTU are released, and the various processing results corresponding to the various subcommands are delivered. Even subcommands of the same type can have various states, such as success / failure. Therefore, each DTU has different resource release methods and / or processing result identification and delivery methods. Therefore, different uplink data paths are required to correspond to different processing methods.

[0231] According to an embodiment of the present application, during the process of processing a DTU on a downlink data path, an uplink data path is constructed for each DTU, and after the subcommand carried by the DTU is processed, the DTU is processed through the constructed uplink data path.

[0232] Figure 5A A schematic diagram of an uplink data path according to an embodiment of the present application is shown.

[0233] See Figure 5A , the downlink data path includes, for example, a plurality of task processing units (510, 520 and 530), and the task processing unit further includes one or more callback functions (512, 522 and 532). Figure 5A In the example shown in FIG, task processing unit 510 includes callback function 512, task processing unit 520 includes callback function 522, and task processing unit 530 includes callback function 532. The DTU processed by task processing unit 510 is provided to task processing unit 520 via a channel (simplified by an arrow), and the DTU processed by the task processing unit is provided to task processing unit 530 via a channel.

[0234] When processing a DTU, the task processing unit of the downlink data path records the indexes of one or more of its own callback functions in the processed DTU. Once the subcommand carried by the DTU is processed, the task processing unit retrieves one or more callback function indexes from the DTU and calls these callback functions to complete the uplink data path processing of the DTU. These callback functions thus constitute the uplink data path of the DTU or part of it.

[0235] exist Figure 5A In the example shown in FIG5 , task processing unit 530 is the last task processing unit in the downlink data path. It submits the subcommand carried by DTU 542 to a subcommand processing unit (not shown). The subcommand processing unit buffers DTU 542, processes the subcommand indicated by DTU 542, and provides the subcommand processing result to monitoring unit 550.

[0236] The monitoring unit 550 monitors and identifies whether the subcommand has been processed. In response to the completion of the subcommand processing, the monitoring unit 520 obtains the DTU 542 indicating the processing result of the subcommand. For example, the monitoring unit 550 receives the subcommand processing completion indication sent by the subcommand processing unit and determines that the subcommand processing is completed. For another example, the monitoring unit 550 polls the subcommand processing unit and polls for the subcommand completion indication, then determines that the subcommand processing is completed. In response, the monitoring unit 550 obtains the DTU 542 that carries the processed subcommand, obtains one or more callback function indexes (for example, callback functions 512, 522 and 532) from the DTU 542, and calls these callback functions indicated by the function indexes in the specified order. For example, callback function 532 is used to release resources allocated by task processing unit 530 for DTU 542, callback function 522 is used to release resources allocated by task processing unit 520 for DTU 542, and callback function 512 is used to release resources allocated by task processing unit 510 for DTU 542. Callback function 512 also provides DTU 542 to a command transmission unit (not shown). Callback function 512 is the last callback function called in the uplink data path. The command transmission unit obtains the processing result of the subcommand according to the instruction of DTU 542. The command transmission unit also releases DTU 542 so that it can be used to carry other subcommands and provide them to the downlink data path.

[0237] Optionally, the command transmission unit further merges the processing results of multiple subcommands. These merged subcommands are derived from the same command. In response to the completion of processing of multiple subcommands generated by the same command, the command transmission unit returns the processing result of the command to the command issuer.

[0238] Thus Figure 5AIn the example, logically, callback function 537, callback function 527 and callback function 517 process DTU 547 in sequence (indicated by dotted arrows), and the monitoring unit 550 and the callback functions (512, 522 and 532) constitute the uplink data path of DTU542.

[0239] Therefore, according to an embodiment of the present application, one or more callback function indexes are recorded in the DTU, and the monitoring unit 550 calls the corresponding callback function in a specified order according to the callback function index in the DTU to be processed, thereby achieving the construction of an uplink data path dedicated to each DTU, and processing each DTU using the constructed uplink data path, thereby providing different processing methods for each DTU in the uplink data path.

[0240] Figure 5B A schematic diagram of an uplink data path according to another embodiment of the present application is shown.

[0241] exist Figure 5B In the example, the downlink data path includes three task processing units, namely a cache management unit 515, an address mapping unit 525 and a data assembly unit 535 (see also Figure 4A and Figure 4B The downlink data path also includes a resource manager for managing cache resources, a resource manager for managing mapping table resources, and a resource manager for managing accelerator resources (the resource managers are not shown, only the managed resources are shown).

[0242] The cache management unit 515 obtains cache resources from the cache and allocates them to the DTU 547. The address mapping unit 525 allocates mapping table resources (e.g., locks entries in the mapping table) to the DTU 547 for recording the address of the storage medium carrying the write data. The data assembly unit 535 allocates accelerator resources (for calculating checksum data for the write data) to the DTU 547 and submits the subcommand carried by the DTU 547 to the subcommand processing unit (e.g., the media interface controller) (not shown).

[0243] For example, when processing DTU 547, cache management unit 515 records the index of callback function 517 in processed DTU 547, address mapping unit 525 records the index of callback function 527 in DTU 547, and data assembly unit 535 records the index of callback function 537 in DTU 547. Callback function 517 is used, for example, to release cache resources allocated to DTU 547. Callback function 527 is used, for example, to write the storage medium address allocated to DTU 547 into a mapping table entry and unlock the mapping table entry. Callback function 537 is used, for example, to record the release of an accelerator allocated to DTU 547.

[0244] The monitoring unit 555 polls the subcommand processing unit and learns that the subcommand corresponding to the DTU 547 has been processed. The monitoring unit 555 obtains the indexes of the callback functions (517, 527 and 537) recorded in the DTU 547 and calls these callback functions.

[0245] For example, callback functions (517, 527, and 537) use a DTU or DTU record variable as a parameter to process the DTU. Still for example, monitoring unit 555 calls callback function 537, callback function 527, and callback function 517 in the order in which they are called. The order in which the callback functions are called is, for example, the reverse order of the order in which they were added to DTU 547. Thus, each task processing unit adds the callback function index to DTU 547 by operating on the stack, and monitoring unit 555 also retrieves the callback function index from DTU 547 by operating on the stack and calls the corresponding callback function.

[0246] Figure 5C A flowchart of constructing an uplink data path according to an embodiment of the present application is shown.

[0247] In a task processing unit of a downlink data path, one or more callback function indexes are written into a DTU (570), and the DTU is provided to another task processing unit of the downlink data path. The other task processing unit also writes one or more callback function indexes into the DTU (572). The one or more callback function indexes are written into the DTU by one or more task processing units, and the callback functions indicated by these callback function indexes constitute the uplink data path for processing the DTU.

[0248] After the subcommand carried by the DTU is processed by the subcommand processing unit, all callback function indexes recorded in the DTU are obtained, and the callback functions indicated by these callback function indexes are called in sequence (574) to process the DTU through the uplink data path.

[0249] Optionally, the task processing unit selects a callback function index to be recorded in the DTU based on its processing of the subcommand carried by the DTU or the resources allocated to it. The callback function corresponding to the callback function index is pre-installed in the task processing unit. For example, the index corresponding to the callback function that will release the allocated resources or the index corresponding to the callback function that will handle the subcommand execution failure scenario is selected.

[0250] Optionally, a task processing unit adds one or more callback function indexes to the DTU. Still optionally, one or more task processing units do not add any callback function indexes to the DTUs they process. Thus, the number of task processing units in the downlink data path is greater than, equal to, or less than the number of task processing units in the uplink data path. For example, there are 5 task processing units in the downlink data path, but in the process of processing the DTU by these 5 task processing units, only the cache management unit and the address mapping unit each write a callback function index to the DTU when processing the sub-command. At this time, the DTU has a total of two callback function indexes. Therefore, the uplink data path for this DTU only includes two callback functions.

[0251] For example, after the buffer management unit 515 writes the index of callback function 517 to DTU 547, callback function 517 of the buffer management unit 515 becomes part of the upstream data path 505. That is, the buffer management unit 515 is a component of both the downstream and upstream data paths. When callback function 517 is called using its index, the execution of callback function 517 releases the buffer resources allocated by the resource manager when DTU 547 was requested.

[0252] In another example, when processing a subcommand, the cache management unit 515 does not write the index of the callback function 517 to the DTU 547. However, when processing the DTU 547, the address mapping unit 525 writes the index of the callback function 527 to the DTU 547. The callback function 527 is used to release the cache resources allocated by the cache management unit 525 to the DTU 547. After processing the DTU 547, the callback function 527 index recorded by the DTU 547 is called to execute the callback function 527, and the cache resources are released. Optionally, the identification information of the allocated cache resources is also recorded in the DTU 547, and this identification information is used to indicate the specific cache resource when the cache resources are released.

[0253] In some embodiments, the downlink data path includes multiple task processing units, and each of the multiple task processing units writes the index of the callback function in the DTU during the process of processing the sub-command carried by the DTU. The callback functions indicated by the callback function index written by each task processing unit in the DTU are the same or different. In one example, the cache management unit 515 requests the allocation of cache resources when processing the DTU, while the address mapping conversion unit 525 and the data assembly unit 535 do not request cache resources when processing the DTU, so that the callback function index written by the cache management unit 515 to the DTU is different from the callback function index written by the address mapping conversion unit 525 and the data assembly unit 535 to the DTU. Optionally, the callback function index written by the address mapping conversion unit 525 and the data assembly unit 535 to the DTU is the same.

[0254] The callback function of the uplink data path also returns the processing result of the sub-command to the command transmission unit.

[0255] Optionally, the one or more callback function indexes in DTU 547 are ordered, and the callback functions indicated by these callback function indexes are called in sequence. The one or more callback functions in DTU 547 called in sequence constitute the uplink data path. For example, the order in which the one or more callback functions indicated by the callback function indexes in DTU 547 are called is the reverse order in which these callback function indexes are written to the DTU in constructing the uplink data path.

[0256] Figure 5D A schematic diagram of the DTU is shown.

[0257] As shown in Figure 5, the DTU records a callback function index, which indicates a callback function list including callback function index A, callback function index B, and callback function index C. For example, callback function index A is written by the cache management unit 515, callback function index B is written by the address mapping unit 525, and callback function index C is written by the data assembly unit 535. Callback function index A, callback function index B, and callback function index C in the callback function list are in order. Figure 5D In the callback function list, the left side is the callback function index that was written to the DTU earlier than the right side. Optionally, in the uplink data path, the three callback functions are called in sequence by callback function index C, callback function index B, and callback function index A in the reverse order of the order in which the callback function indexes were written to the DTU.

[0258] In some embodiments, after the monitoring unit obtains the DTU, it calls one or more callback functions using the callback function index in the callback function list. For example, the monitoring unit obtains the last callback function index in the callback function list as callback function index C, and calls callback function C1 using callback function index C to execute callback function C1. After executing callback function C1, the monitoring unit continues to call callback function B1 using callback function index B. After executing callback function B1, the monitoring unit 220 continues to call callback function A1 using callback function index A. As an example, callback function A1 is the last callback function in the uplink data path, and it also returns the DTU to the command transmission unit, and the DTU carries the processing result of the sub-command.

[0259] Figure 6A A schematic diagram of resource management according to an embodiment of the present application is shown.

[0260] The task processing unit obtains the DTU from the channel and processes it. In the process of processing the DTU, it requests resources from the resource manager for processing the sub-commands carried by the DTU. The task processing unit records the identifier of the allocated resource in the DTU to indicate that the DTU currently occupies the resource. The task processing unit also records the callback function index in the DTU. When the callback function indicated by the callback function index is executed, the resource will be released. The task processing unit provides the processed DTU to other task processing units or to the sub-command processing unit through the channel.

[0261] Figure 6B A schematic diagram of resource management according to another embodiment of the present application is shown.

[0262] The downlink data path includes two task processing units (610, 612) and two resource managers (620, 622). Figure 6B 6, DTU 640, DTU 642, and DTU 644 illustrate different stages of the same DTU. DTU 640 is shown as DTU 642 after being processed by task processing unit 610, and DTU 642 is shown as DTU 644 after being processed by task processing unit 612.

[0263] When task processing unit 610 processes DTU 640, it requests resource manager 620 to allocate resource A. For example, resource A represents a cache resource. Task processing unit 610 provides DTU 642 to task processing unit 612 and records the allocated resource A and the index of callback function A1 in DTU 642. When callback function A1 is executed, resource A is released to the resource manager.

[0264] When processing DTU 642, task processing unit 612 requests the allocation of resource B from resource manager 622. For example, resource B represents an accelerator resource. Task processing unit 612 generates DTU 644 and records the allocated resource B and the index of callback function B1 in DTU 644. When callback function B1 is executed, resource B is released to the resource manager. Therefore, the allocated resource A and the index of callback function A1 recorded in DTU 644 are added by task processing unit 610, while the allocated resource B and the index of callback function B1 are added by task processing unit 612.

[0265] Figure 6C A schematic diagram of resource management according to another embodiment of the present application is shown.

[0266] The downlink data path includes three task processing units (650, 652 and 654) and two resource managers (660, 662). Figure 6C In the figure, DTU 670, DTU 672, and DTU 674 represent different stages of the same DTU. DTU 670 and DTU 680 represent different DTUs. DTU 680 and DTU 682 represent different stages of the same DTU. DTU 670 is shown as DTU 672 after being processed by task processing unit 650, while DTU 672 is shown as DTU 674 after being processed by task processing unit 652. DTU 680 is shown as DTU 682 after being processed by task processing unit 654.

[0267] When processing DTU 670, task processing unit 650 requests resource manager 660 to allocate resource A. For example, resource A represents a cache resource. Task processing unit 650 provides DTU 672 to task processing unit 652 and records the allocated resource A in DTU 672. Task processing unit 650 also records a callback function index in DTU 672. However, for example, when the callback function indicated by the callback function index is executed, resource A is not released.

[0268] When processing DTU 680, task processing unit 654 requests resource manager 660 to allocate resource A'. Resource A' and resource A are similar resources (e.g., cache resources), but they represent different instances of that resource type. Task processing unit 654 records the allocated resource A and the callback function index in DTU 682. When the callback function indicated by the callback function index is executed, resource A' is not released.

[0269] The resource manager manages the allocation of resources. For example, the resource manager 660 ensures that an instance of a resource (e.g., resource A) is not allocated to both DTU 672 and DTU 682. For example, the resource manager 660 maintains a lock for each resource instance to ensure that a resource instance is only used by a DTU. A resource manager may include multiple task processing units with the same functionality and / or using the same resources, which request resources through the same resource manager.

[0270] Still see Figure 6C The callback function added by task processing unit 650 to DTU 672 is not used to release resource A requested by task processing unit 650 for DTU 672. This means that the allocation and release of the same resource do not need to be handled by the same task processing unit (but can be handled by another task processing unit), thereby bringing flexibility to task processing. It is understandable that it is also feasible for the same task processing unit to be responsible for releasing its allocated resources.

[0271] When processing DTU 672, task processing unit 652 requests resource manager 622 to allocate resource B. Task processing unit 652 generates DTU 674 and records the allocated resource B and the index of callback function B1 in DTU 644. When callback function B1 is executed, task processing unit 652 releases resource B to the resource manager. Task processing unit 652 also records the index of callback function A1 in DTU 674. When callback function A1 is executed, task processing unit 652 releases resource A to the resource manager.

[0272] Figure 7 A block diagram of a storage device constructed using a task processing system according to an embodiment of the present application is shown.

[0273] The task processing system according to the embodiment of the present application is used to construct a storage device and is implemented by, for example, a control component of the storage device.

[0274] The task processing system includes a command transmission unit, a data path and a sub-command processing unit. The sub-command processing unit is coupled to a storage medium.

[0275] The command transmission unit exchanges IO commands with the host according to the specified storage protocol. The command transmission unit splits the IO command into one or more sub-commands, allocates DTUs to carry the sub-commands, and delivers the DTUs to the data path.

[0276] The data path includes a downstream data path and an upstream data path. The downstream data path processes the sub-commands in one or more stages and finally delivers the DTU to the sub-command processing unit. The sub-command processing unit converts the sub-commands carried by the DTU into commands for accessing the storage medium. As an example, the sub-command processing unit is a medium interface controller. The sub-command processing unit also queries the storage medium to obtain the processing results of the command to access the storage medium. The upstream data path delivers the processing results of the sub-commands to the command transmission unit. As an example, the upstream data path polls the sub-command processing unit to obtain the processing results of the sub-commands. If necessary, the command transmission unit will collect one or more sub-commands split from the same IO command, and provide the processing results of the IO command to the host after all sub-commands split from the same IO command are processed.

[0277] According to an embodiment of the present application, it is convenient to support virtualization in storage devices. For example, the NVMe protocol defines a namespace (NS). The namespace presents a virtual storage device or a logical storage device to a host accessing the storage device. Thus, by providing multiple namespaces on a single control component, each namespace provides a virtualized storage device to the host. As another example, a single control component of a storage device simultaneously provides multiple virtual storage devices accessed by different storage protocols, for example, a storage device that supports the NVMe protocol, the OpenChannel protocol, and / or the SATA protocol.

[0278] Resources are also allocated to each virtual storage device. For example, it is advantageous for each virtual storage device to share cache resources, storage medium resources, and accelerator resources, while it is advantageous for each virtual storage device to exclusively use mapping table resources.

[0279] According to the embodiments of the present application, the realization of the above-mentioned multiple requirements is facilitated.

[0280] Figure 8A A block diagram of a storage device constructed using a task processing system according to another embodiment of the present application is shown.

[0281] according to Figure 8A In an embodiment, the storage device presents multiple namespaces (respectively denoted as NS0, NS1, NS2, and NS3) of the NVMe protocol to the host. The host is able to access the virtual storage device provided by each namespace according to the NVMe protocol.

[0282] The task processing system according to the embodiment of the present application is used to construct Figure 8A The storage device shown is implemented by, for example, a control component of the storage device.

[0283] An example task processing system includes a command transmission unit, multiple data paths (810, 812, 814, and 816), and a sub-command processing unit. The sub-command processing unit is coupled to a storage medium. Each of the multiple data paths (810, 812, 814, and 816) is configured to provide one of the namespaces. For example, data path 810 provides namespace NS0, data path 812 provides namespace NS1, data path 814 provides namespace NS2, and data path 816 provides namespace NS3.

[0284] The command transmission unit splits the IO command provided by the host into sub-commands and, based on the namespace accessed by the IO command, provides the sub-commands to the data path corresponding to the namespace. For example, if an IO command accesses namespace NS2, the command transmission unit will provide all sub-commands split from the IO command to data path 814, which will process all IO commands accessing namespace NS2.

[0285] Therefore, according to the embodiment of the present application, by duplicating the data path, the storage device can conveniently provide the function of multiple namespaces.

[0286] Optionally, each namespace is provided with its own exclusive mapping table resources, as well as shared other resources (storage medium resources, accelerator resources, etc.). Thus, the task processing system provides, for example, four resource managers for managing mapping table resources, each of which is coupled to one of the data paths and only manages the mapping table resources corresponding to the namespace associated with the data path it is coupled to, thereby achieving effective isolation of mapping table resources between the namespaces. The task processing system also provides each data path with its own dedicated resource manager for managing other types of resources. Taking the storage medium resource manager for managing storage media as an example, each storage medium resource manager coupled to each data path manages, for example, all storage media of the storage device, so that each data path can use any available storage medium of the storage device to carry the data written by the sub-command, thereby improving the utilization rate of the storage medium resources and helping to achieve global wear leveling of the storage device.

[0287] It is understood that, in embodiments according to the present application, data paths, resource managers, and the various managed resources can have various corresponding relationships. For example, each data path can be provided with exclusive storage media resources to mitigate the mutual impact between data paths. Importantly, according to the task processing system of the present application, data paths can be easily replicated, resource managers can be easily coupled to data paths, and storage device resources can be conveniently managed by resource managers. This accelerates the development of new functions for storage devices.

[0288] Figure 8B A block diagram of a storage device constructed using a task processing system according to another embodiment of the present application is shown.

[0289] according to Figure 8B In an embodiment, a storage device exposes multiple device functions to a host, such as an NVMe storage device, an Open Channel (OC) storage device, an accelerator with specified functions, an MCTP (Management Component Transport Protocol) endpoint, and an NVMe device's AdminQueue. The host can access the functions provided by each device according to different protocols.

[0290] The task processing system according to the embodiment of the present application is used to construct Figure 8B The storage device shown is implemented by, for example, a control component of the storage device.

[0291] The example task processing system includes a command transmission unit, a plurality of data paths (820, 822, 824, and 826), and a plurality of sub-command processing units (380, 386, and 839). The sub-command processing unit 830 is coupled to a storage medium. The sub-command processing unit 893 is coupled to an accelerator (e.g., an accelerator that performs encryption / decryption calculations according to the AES / SM4 standard).

[0292] For example, data path 820 provides NVMe storage device functionality and processes NVMe protocol I / O commands. Data path 822 provides OC storage device functionality and processes OC protocol I / O commands. Data path 824 processes MCTP protocol management commands or NVMe protocol management commands. Data path 826 processes access requests to the accelerator.

[0293] The command transmission unit forwards the command to the corresponding data path according to the protocol used by the command. Optionally, for IO commands, the first task processing unit of the data path 820 and / or the data path 822 implements the splitting of the IO command into sub-commands. The IO command is to access the storage settings of the storage device. The data path 820 and the data path 822 are served by a single sub-command processing unit 830, so that the NVMe storage device provided by the data path 820 and the OC storage device provided by the data path 822 can use all the storage media of the storage device, thereby improving the utilization of the storage media.

[0294] Still optionally, the command transmission unit splits the IO command into sub-commands, allocates DTUs to the sub-commands, and provides them to the data path corresponding to the protocol according to the protocol. The command transmission unit also allocates DTUs for management commands and commands for accessing the accelerator. The DTUs are used to carry various commands so that they can be processed by one or more task processing units in the data path. For example, the command transmission unit does not need to split the management commands and / or commands for accessing the accelerator into sub-commands, and the management commands and / or commands for accessing the accelerator are carried by the DTUs.

[0295] Management commands (e.g., those following the MCTP or NVMe protocols) that query or set device status are processed by data path 824 and sub-command processing unit 836. When a management command queries, for example, the amount of free space on a storage device, sub-command processing unit 836 retrieves the storage media usage status from memory without requiring dedicated hardware. When a management command queries, for example, device temperature, sub-command processing unit 836 couples to, for example, a temperature sensor (not shown) to obtain temperature information.

[0296] The accelerator coupled to subcommand processing unit 839 is, for example, an accelerator that performs encryption / decryption calculations according to the AES / SM4 standard. Optionally, the resource managers of datapath 820 and datapath 822 encapsulate the accelerator as a resource for use by the task processing units of data processing units 820 / 830. Datapath 826 and subcommand processing unit 839 then present the accelerator as a device providing related services, allowing the host to directly use the accelerator.

[0297] Therefore, according to the embodiments of the present application, by creating multiple data paths, the storage device can conveniently provide multiple virtual device functions.

[0298] Although the present application has been described with reference to examples, this is for illustrative purposes only and is not intended to limit the present application, and changes, additions and / or deletions to the embodiments may be made without departing from the scope of the present application.

[0299] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A storage device, characterized in that: The device comprises at least one memory chip and at least one data path, wherein each data path corresponds to one or more memory chips; In response to receiving the command, the storage device accesses the storage chip corresponding to the at least one data path through one of the at least one data path and completes the operation indicated by the command, the operation including a read operation, a write operation, and an erase operation; wherein, The at least one data path includes at least one type of data path, and the at least one type of data path has at least one identical or different task processing unit, and the at least one task processing unit is used to process the corresponding task in the command processing process; wherein each data path includes a first task processing unit, a second task processing unit and a third task processing unit, wherein the first task processing unit processes the cache task and the second task processing unit processes the address conversion task.

2. The storage device according to claim 1, wherein in, The at least one data path includes at least one of a first type path, a second type path, and a third type path; the first type path, the second type path, and the third type path are respectively used to provide different namespaces or to process different commands.

3. The storage device according to claim 2, wherein: The at least one data path further includes a fourth type of path that processes management commands.

4. The storage device according to claim 1, wherein: The second type path and the first type path include a third task processing unit, which processes a data assembly task.

5. The storage device according to any one of claims 2 to 4, wherein: The memory chip corresponding to the third type of path is a RAM chip; the memory chip corresponding to the first type of path or the second type of path is an NVM chip.

6. The storage device according to any one of claims 1 to 4, wherein: The storage device further includes a command transmission unit; in response to receiving a command, the command transmission unit splits the command into at least one sub-command, and determines the type of data path to which the sub-commands split from the command are provided based on identification information carried by the command.

7. The storage device according to claim 6, wherein: The command transmission unit sends the at least one sub-command to the first data path to access the first storage chip through the first data path; wherein the identification information indicates that the object of the operation is the first storage chip, and the first data path is a data path corresponding to the first storage chip.

8. The storage device according to claim 7, wherein: The command transmission unit determines the first storage chip to be accessed according to the identification information; and determines the first data path according to the corresponding relationship between the storage chip and the data path.

9. The storage device according to claim 8, wherein: The storage device includes a plurality of command transmission units and a command distribution unit, each command transmission unit corresponding to a data path; in response to receiving a command, the command distribution unit determines a first command transmission unit based on identification information carried in the command, the first command transmission unit corresponding to a first data path, the identification information indicating that an operation object is the first storage chip, and the first data path is a data path corresponding to the first storage chip; The first command transmission unit splits a command into at least one sub-command and sends the at least one sub-command to the first data path to access the first storage chip through the first data path.

Citation Information

Patent Citations

  • A high speed memory chip having multiple independent access channels

    CN109086228A