Command distribution method based on routing map table and control component

By generating a routing mapping table, the processor load is dynamically adjusted based on the processor's current command characteristics and features, solving the load balancing problem among multiple processing units in the storage device and improving command processing efficiency and speed.

CN122285273APending Publication Date: 2026-06-26BEIJING STARBLAZE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING STARBLAZE TECH CO LTD
Filing Date
2020-07-13
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, load balancing among multiple processing units in storage devices is difficult to achieve. Software implementation is slow, and hardware implementation cannot be flexibly adjusted, resulting in limited command processing speed.

Method used

By generating a routing mapping table, the processor load is dynamically adjusted based on the current command characteristics and features of the processor. Command distribution is optimized by employing minimum load strategies that distinguish between command types, minimum load strategies that do not distinguish between command types, low quota strategies, and round-robin strategies.

Benefits of technology

It achieves load balancing among multiple processing units, improves the efficiency and speed of command processing, dynamically adjusts processor load, and enhances the performance of storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122285273A_ABST
    Figure CN122285273A_ABST
Patent Text Reader

Abstract

This application provides a command distribution method and control unit based on a routing table. The command distribution method includes retrieving a first command from multiple command distribution queues using a polling or weighted polling method. The command type of the first command includes management commands, read commands, and write commands. Based on the routing table, a first processor is determined to handle the first command. The first command is then sent to the first processor. The routing table is used to characterize the processor load. The load is characterized as a correspondence between the processor and the number of commands currently being processed, or a total load value. The total load value is the sum of the products of the load value for each command type and the number of commands, a load value calculated based on utilization, or a load value calculated based on power consumption. The correspondence between the processor and the number of commands currently being processed includes a correspondence between the processor and the total number of commands currently being processed, or a correspondence between processors categorized by command type and the number of commands currently being processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to storage technology, and in particular to a command distribution method and control unit based on a routing mapping table. Background Technology

[0002] Figure 1 A block diagram of a storage device in the prior art is shown. Storage device 100 is coupled to a host to provide storage capabilities to the host. The host and storage device 100 can be coupled in various ways, including but not limited to connections via 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, and wireless communication networks. The host can be an information processing device capable of communicating with the storage device via the above methods, such as a personal computer, tablet computer, server, laptop computer, network switch, router, cellular phone, or personal digital assistant. Storage device 100 includes interface 110, control unit 120, one or more NVM chips 130, and DRAM (Dynamic Random Access Memory) 140.

[0003] NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), and RRAM (Resistive Random Access Memory) are common types of NVM.

[0004] Interface 110 is compatible with exchanging data with the host via methods such as SATA, IDE, USB, PCIe, NVMe, SAS, Ethernet, and Fibre Channel.

[0005] Control unit 120 is used to control data transfer between interface 110, NVM chip 130, and DRAM 140. It is also used for memory management, mapping host logical addresses to NVM chip physical addresses, erase leveling, bad block management, etc. Control unit 120 can be implemented in various ways, including software, hardware, firmware, or combinations thereof. For example, control unit 120 can be in the form of an FPGA (Field-programmable gate array), ASIC (Application Specific Integrated Circuit), or a combination thereof. Control unit 120 may also include a processor or controller, in which software executes to manipulate the hardware of control unit 120 to process I / O (Input / Output) commands. Control unit 120 can also be coupled to DRAM 140 and can access data in DRAM 140. FTL tables and / or cached I / O command data are stored in DRAM.

[0006] The control unit 120 includes a flash interface controller (or media interface, media interface controller, flash channel controller), which is coupled to the NVM chip 130 and issues commands to the NVM chip 130 in accordance with the interface protocol of the NVM chip 130 to operate the NVM chip 130, and receives the command execution results output from the NVM chip 130. Known NVM chip interface protocols include "Toggle", "ONFI", etc.

[0007] A memory target is one or more logic units (LUNs) within a NAND flash memory package that share a chip enable (CE) signal. A NAND flash memory package includes one or more dies. Typically, a logic unit corresponds to a single die. A logic unit may include multiple planes. Multiple planes within a logic unit can be accessed in parallel, while multiple logic units within a NAND flash memory chip can execute commands and report status independently of each other. The meanings of target, logic unit (LUN), and plane are provided in the "Open NAND Flash Interface Specification (Revision 3.0)," available at http: / / www.micron.com / ~ / media / Documents / Products / Other%20Documents / ONFI3_0Gold.ashx, which is part of the prior art.

[0008] Figure 2A detailed block diagram of the control components of the storage device is shown.

[0009] The host accesses the storage device using I / O commands that conform to the storage protocol. The control unit generates one or more media interface commands based on the I / O commands from the host and provides them to the media interface controller. The media interface controller generates storage media access commands (e.g., programming commands, read commands, erase commands) that conform to the NVM chip's interface protocol based on the media interface commands. The control unit also tracks the completion of all media interface commands generated from a single I / O command and indicates the processing results of the I / O commands to the host.

[0010] See Figure 2 The control components include, for example, a host interface, a host command processing unit, a storage command processing unit, a media interface controller, and a storage media management unit. The host interface receives I / O commands from the host and generates storage commands, which are then provided to the storage command processing unit. A storage command may access a storage space of the same size, such as 4KB. The data unit recorded in the NVM chip corresponding to the data accessed by a storage command is called a data frame. A physical page records one or more data frames. For example, if the size of a physical page is 17664 bytes and the size of a data frame is 4KB, then one physical page can store four data frames.

[0011] The storage media management unit (SMMU) maintains a logical address to physical address translation for each storage command. For example, the SMMU includes an FTL table. For a read command, the SMMU outputs the physical address corresponding to the logical address accessed by the storage command; for a write command, the SMMU allocates an available physical address and records the mapping between the accessed logical address and the allocated physical address. The SMMU also maintains functions required for managing the NVM chip, such as garbage collection and wear leveling.

[0012] The storage command processing unit, based on the physical address provided by the storage media management unit, operates the media interface controller to issue storage media access commands to the NVM chip. For clarity, commands sent from the host to the storage device are called I / O commands, commands sent from the host command processing unit to the storage command processing unit are called storage commands, commands sent from the storage command processing unit to the media interface controller are called media interface commands, and commands sent from the media interface controller to the NVM chip are called storage media access commands. Storage media access commands conform to the NVM chip's interface protocol.

[0013] The host interface also receives commands from the host, such as Admin commands. Admin commands are defined by storage protocols such as NVMe. Similar to I / O commands, Admin commands are also processed by the storage command processing unit. The host issues commands without considering whether the control unit has already processed previously issued commands; the control unit can process multiple I / O commands and / or Admin commands concurrently. The storage command processing unit includes one or more processing units that process storage commands (including Admin commands). A processing unit is a processor and its running firmware or logic circuitry used to process storage commands. If there is only one processing unit, all storage commands are processed by that single unit. If the control unit has two or more processing units, the issue arises of how to load balance these multiple processing units. In existing technologies, the processing unit for processing storage commands is typically allocated based on the address accessed by the storage command and / or the physical address in the NVM chip. For example, if an NVM chip has 64 LUNs and a storage command processing unit has 2 processing units, then one processing unit is responsible for accessing all storage commands of the 32 LUNs with the first 32 physical addresses out of the 64 LUNs, and the other processor is responsible for accessing all storage commands of the 32 LUNs with the last 32 physical addresses. Summary of the Invention

[0014] Ideally, data is evenly distributed across all LUNs in the storage device for NVM chips. If each piece of data has an equal probability of being read, then allocating processing units according to their physical addresses to handle storage commands can ensure that the number of commands processed by each unit is consistent, achieving load balancing. However, in actual operation, storage devices typically cannot meet this ideal condition, significantly reducing the effectiveness of load balancing among processing units. Furthermore, the allocation of commands to multiple processing units by the control unit is generally implemented in software or hardware. Software implementation is slow, leading to longer latency and impacting command processing speed. Hardware implementation essentially involves pre-setting the allocation method, which cannot be flexibly adjusted during actual operation, making it difficult to dynamically adjust the load among multiple processing units in real time.

[0015] To address the aforementioned technical problems, according to a first aspect of this application, a method for obtaining a first routing mapping table according to the first aspect of this application is provided, characterized by comprising: obtaining feature information of commands currently being processed by each of a plurality of processors and / or characteristic information of each processor, wherein the feature information of the commands includes the number of commands and / or the command type, the characteristic information of the processors includes utilization and / or power consumption, and the command type includes management commands, read commands, and write commands; and generating the routing mapping table characterizing the load of the processors.

[0016] According to the first routing table acquisition method of the first aspect of this application, a second routing table acquisition method according to the first aspect of this application is provided, wherein the load status is characterized as the correspondence between the processor and the number of commands currently being processed or the total load value; wherein the total load value is the sum of the products of the load value of each command type and the number of commands, the load value calculated based on utilization, or the load value calculated based on power consumption; the correspondence between the processor and the number of commands currently being processed includes the correspondence between the processor and the total number of commands currently being processed, or the correspondence between the processor classified according to command type and the number of commands currently being processed.

[0017] According to the first or second routing table acquisition method of the first aspect of this application, a third routing table acquisition method according to the first aspect of this application is provided, the method further comprising: acquiring first information, the first information indicating a change in the number of commands processed by at least one of a plurality of processors, the first information carrying the changed command type and / or the changed number of commands, and an identifier of the processor whose number of commands has changed; and updating the routing table in response to acquiring the first information.

[0018] According to the third routing table acquisition method of the first aspect of this application, a fourth routing table acquisition method according to the first aspect of this application is provided, wherein updating the routing table includes: modifying the total number of commands corresponding to at least one processor; or, modifying the number of commands of each command type corresponding to at least one processor; or, modifying the total load value corresponding to at least one processor.

[0019] According to the fourth routing table acquisition method of the first aspect of this application, a fifth routing table acquisition method according to the first aspect of this application is provided, wherein modifying the number of commands for each command type corresponding to at least one processor includes: increasing the number of management commands corresponding to at least one processor, increasing the number of read commands corresponding to at least one processor, and increasing the number of write commands corresponding to at least one processor; or, increasing the number of management commands corresponding to at least one processor, decreasing the number of read commands corresponding to at least one processor, and increasing the number of write commands corresponding to at least one processor; or, increasing the number of management commands corresponding to at least one processor, increasing the number of read commands corresponding to at least one processor, and decreasing the number of write commands corresponding to at least one processor; or, decreasing the number of management commands corresponding to at least one processor, increasing the number of read commands corresponding to at least one processor, and increasing the number of write commands corresponding to at least one processor; or, decreasing the number of management commands corresponding to at least one processor, decreasing the number of read commands corresponding to at least one processor, and increasing the number of write commands corresponding to at least one processor; or, decreasing the number of management commands corresponding to at least one processor, increasing the number of read commands corresponding to at least one processor, and decreasing the number of write commands corresponding to at least one processor; or, decreasing the number of management commands corresponding to at least one processor, increasing the number of read commands corresponding to at least one processor, and decreasing the number of write commands corresponding to at least one processor; or, decreasing the number of management commands corresponding to at least one processor, decreasing the number of read commands corresponding to at least one processor, and decreasing the number of write commands corresponding to at least one processor.

[0020] Based on the second routing table acquisition method of the first aspect of this application, a sixth routing table acquisition method of the first aspect of this application is provided, wherein the total load value is expressed as: ; Where M is the load value corresponding to a management command, N is the load value corresponding to a read command, K is the load value corresponding to a write command, A is the number of management commands, B is the number of read commands, C is the number of write commands, F is the total load value of the processor, A, B and C are all natural numbers, and M, N and K are all positive integers.

[0021] According to one of the second to sixth routing table acquisition methods of the first aspect of this application, a seventh routing table acquisition method according to the first aspect of this application is provided. When the total load value is a load value calculated based on utilization or a load value calculated based on power consumption, the step of generating the routing table characterizing the processor load includes: directly generating the routing table based on utilization or power consumption; or generating the routing table based on the product of utilization or power consumption and a preset value.

[0022] According to the seventh routing table acquisition method of the first aspect of this application, an eighth routing table acquisition method according to the first aspect of this application is provided, wherein modifying the total load value corresponding to at least one processor includes: calculating a correction value of the total load value of at least one processor based on the changed command type and / or the changed command number; and using the sum of the correction value of the processor and the current total load value of the processor as the modified total load value.

[0023] According to a second aspect of this application, a first command distribution method according to the second aspect of this application is provided, comprising: obtaining a first command, wherein the first command includes a management command, a read command, and a write command; Based on the routing table, determine the first processor to process the first command, where the first processor is one of a plurality of processors; and send the first command to the first processor.

[0024] According to the first command distribution method of the second aspect of this application, a second command distribution method according to the second aspect of this application is provided, wherein determining a first processor for processing the first command according to a routing mapping table includes: determining a first strategy for command distribution, the first strategy including a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a round-robin strategy; and determining the first processor according to the first strategy and the routing mapping table.

[0025] According to the second command distribution method of the second aspect of this application, a third command distribution method according to the second aspect of this application is provided, wherein determining the first strategy for command distribution includes: selecting a first strategy from at least one preset strategy; or, when no strategy is selected from at least one preset strategy, determining a default strategy as the first strategy, wherein the at least one preset strategy includes the default strategy; wherein the preset strategy includes at least a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a round-robin strategy.

[0026] According to the third command distribution method of the second aspect of this application, a fourth command distribution method according to the second aspect of this application is provided, wherein the default strategy is a minimum load strategy that distinguishes command types.

[0027] According to one of the second to fourth command distribution methods of the second aspect of this application, a fifth command distribution method according to the second aspect of this application is provided, wherein determining the first strategy for command distribution includes: selecting a first strategy corresponding to the current work scenario based on the current work scenario; or, in response to the quota corresponding to the same command type being exhausted or falling below a threshold, selecting a low quota strategy as the first strategy.

[0028] According to the fifth command distribution method of the second aspect of this application, a sixth command distribution method according to the second aspect of this application is provided, in response to sending the first command to the first processor, reducing the quota corresponding to the type of the first command; and periodically increasing the quota corresponding to each command type.

[0029] According to one of the second to sixth command distribution methods of the second aspect of this application, a seventh command distribution method according to the second aspect of this application is provided, wherein when the first strategy is a minimum load strategy that does not distinguish between command types, the processor with the smallest total load value or the smallest total number of commands among multiple processors is determined as the first processor.

[0030] According to one of the second to seventh command distribution methods of the second aspect of this application, an eighth command distribution method according to the second aspect of this application is provided. When the first strategy is a minimum load strategy that distinguishes command types, the multiple processors include at least one processor that processes management commands, at least one processor that processes read commands, and at least one processor that processes write commands. The step of determining the first processor according to the first strategy and the routing mapping table includes: if the first command is a management command, determining the processor with the smallest total load value or the smallest total number of commands among the at least one processors that processes management commands as the first processor; if the first command is a read command, determining the processor with the smallest total load value or the smallest total number of commands among the at least one processors that processes read commands as the first processor; and / or if the first command is a write command, determining the processor with the smallest total load value or the smallest total number of commands among the at least one processors that processes write commands as the first processor.

[0031] According to the eighth command distribution method of the second aspect of this application, a ninth command distribution method according to the second aspect of this application is provided. When the first strategy is a minimum load strategy that distinguishes command types, the step of determining the first processor according to the first strategy and the routing mapping table includes: if the first command is a management command, and the total load value or the total number of commands of any processor processing the management command exceeds a threshold, determining the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor; if the first command is a read command, and the total load value or the total number of commands of any processor processing the write command exceeds a threshold, determining the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor; and / or if the first command is a write command, and the total load value or the total number of commands of any processor processing the write command exceeds a threshold, determining the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor.

[0032] According to one of the second to ninth command distribution methods of the second aspect of this application, a tenth command distribution method according to the second aspect of this application is provided, wherein when the first strategy is a polling strategy, a processor is selected as the first processor sequentially or randomly from a plurality of processors.

[0033] According to one of the second to tenth command distribution methods of the second aspect of this application, an eleventh command distribution method according to the second aspect of this application is provided, wherein when the first strategy is a low quota strategy, the processor with the largest current total load value or the largest total number of commands among multiple processors is determined as the first processor.

[0034] According to one of the second to eleventh command distribution methods of the second aspect of this application, a twelfth command distribution method according to the second aspect of this application is provided, wherein the first strategy further includes a minimum load strategy for a specified command type; in response to the first strategy being a minimum load strategy for a specified command type: if the type of the first command is the same as the type specified by the first strategy, the processor with the smallest total load value or the smallest total number of commands among the multiple processors is determined as the first processor; if the type of the first command is different from the type specified by the first strategy, a processor is selected sequentially or randomly from the multiple processors as the first processor.

[0035] According to one of the first to twelfth command distribution methods of the second aspect of this application, a thirteenth command distribution method according to the second aspect of this application is provided, wherein sending the first command to the first processor includes: generating a first routing packet, the first routing packet carrying a first routing identifier and the first command, the first routing identifier pointing to the first processor; and sending the first routing packet to a routing network module, so that the routing network module sends the first command to the first processor according to the first routing identifier.

[0036] According to the thirteenth command distribution method of the second aspect of this application, a fourteenth command distribution method according to the second aspect of this application is provided, wherein the first route identifier is the identifier of the first processor, or the identifier of the interface between the first processor and the routing network module.

[0037] According to one of the first to fourteenth command distribution methods of the second aspect of this application, a fifteenth command distribution method according to the second aspect of this application is provided. After determining the first processor to process the first command, the method further includes: generating second information, the second information indicating that the number of commands processed by the first processor has increased, the second information carrying the increased number of commands and / or command types, and an identifier of the first processor; and outputting the second information.

[0038] According to a third aspect of this application, a first routing mapping table management module according to the third aspect of this application is provided, comprising: an acquisition unit for acquiring feature information of commands currently being processed by each of a plurality of processors and / or characteristic information of each processor, wherein the feature information of the commands includes the number of commands and / or the command type, the characteristic information of the processors includes utilization and / or power consumption, and the command type includes management commands, read commands, and write commands; and a generation unit for generating the routing mapping table characterizing the load of the processors.

[0039] According to a fourth aspect of this application, a first command management module according to the fourth aspect of this application is provided, comprising: an acquisition unit for acquiring a first command, the first command including a management command, a read command, and a write command; a determination unit for determining a first processor for processing the first command according to a routing mapping table, the first processor being one of a plurality of processors; and a sending unit for sending the first command to the first processor.

[0040] According to a fifth aspect of this application, a first control component according to the fifth aspect of this application is provided, including a routing mapping table management module as described in the third aspect above, a command management module as described in the fourth aspect above, and a routing network module.

[0041] According to a sixth aspect of this application, a first information processing apparatus according to the sixth aspect of this application is provided, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method according to any one of the first and / or second aspects described above.

[0042] According to a seventh aspect of this application, a first control component according to the seventh aspect of this application is provided, including a routing table, a routing table manager, a command manager, and a plurality of processors; wherein the command manager is coupled to the routing table manager, the routing table, and the plurality of processors, and the routing table manager is coupled to the routing table and the plurality of processors; the routing table manager generates and modifies the routing table; the command manager obtains a first command sent by a host, determines a first processor to process the first command based on the routing table, and sends the first command to the first processor, wherein the first processor is one of the plurality of processors.

[0043] According to the first control component of the seventh aspect of this application, a second control component according to the seventh aspect of this application is provided, wherein a routing mapping manager obtains characteristic information of commands currently being processed by each of a plurality of processors and / or characteristic information of each processor, wherein the characteristic information of the commands includes the number of commands and / or the command type, the characteristic information of the processors includes utilization and / or power consumption, and the command type includes management commands, read commands, and write commands; the routing mapping manager generates the routing mapping table characterizing the load status of the processors based on the characteristic information of the commands and / or the characteristic information of each processor.

[0044] According to the second control component of the seventh aspect of this application, a third control component according to the seventh aspect of this application is provided, wherein, in response to receiving a first command sent by the host, a command manager parses the first command to determine the command type of the first command; the command manager obtains the load status of multiple processors in the routing mapping table; and the command manager determines the first processor based on the load status.

[0045] According to the third control component of the seventh aspect of this application, a fourth control component according to the seventh aspect of this application is provided, wherein the command manager determines a first strategy for command distribution, the first strategy including a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a round-robin strategy; the command manager determines the first processor according to the first strategy and a routing mapping table.

[0046] According to the fourth control component of the seventh aspect of this application, a fifth control component according to the seventh aspect of this application is provided, wherein the command manager selects a first strategy from at least one preset strategy; or, when no strategy is selected from at least one preset strategy, the command manager determines the default strategy as the first strategy, wherein the at least one preset strategy includes the default strategy; wherein the preset strategy includes at least a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a polling strategy.

[0047] According to the fifth control component of the seventh aspect of this application, a sixth control component according to the seventh aspect of this application is provided, wherein the default strategy is a minimum load strategy that distinguishes command types.

[0048] According to one of the fourth to sixth control components of the seventh aspect of this application, a seventh control component according to the seventh aspect of this application is provided, wherein the command manager selects a first strategy from at least one preset strategy, including: selecting a first strategy corresponding to the current work scenario based on the current work scenario; or selecting a low quota strategy as the first strategy in response to the quota corresponding to the same command type being exhausted or falling below a threshold.

[0049] According to one of the fourth to seventh control components of the seventh aspect of this application, an eighth control component according to the seventh aspect of this application is provided, wherein when the first strategy is a minimum load strategy that does not distinguish between command types, the command manager determines the processor with the smallest total load value or the smallest total number of commands among multiple processors as the first processor.

[0050] According to one of the fourth to eighth control components of the seventh aspect of this application, a ninth control component according to the seventh aspect of this application is provided, wherein when the first strategy is a minimum load strategy that distinguishes command types, the plurality of processors include at least one processor that processes management commands, at least one processor that processes read commands, and at least one processor that processes write commands; if the first command is a management command, the command manager determines the processor with the smallest total load value or the smallest total number of commands among the at least one processor that processes management commands as the first processor; if the first command is a read command, the command manager determines the processor with the smallest total load value or the smallest total number of commands among the at least one processor that processes read commands as the first processor; and / or, if the first command is a write command, the command manager determines the processor with the smallest total load value or the smallest total number of commands among the at least one processor that processes write commands as the first processor.

[0051] According to the ninth control component of the seventh aspect of this application, a tenth control component according to the seventh aspect of this application is provided. When the first strategy is a minimum load strategy that distinguishes command types, the command manager determines the first processor according to the first strategy and a routing mapping table, including: if the first command is a management command, and the total load value or the total number of commands of any processor processing the management command exceeds a threshold, determining the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor; if the first command is a read command, and the total load value or the total number of commands of any processor processing the write command exceeds a threshold, determining the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor; and / or, if the first command is a write command, and the total load value or the total number of commands of any processor processing the write command exceeds a threshold, determining the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor.

[0052] According to one of the fourth to tenth control components of the seventh aspect of this application, an eleventh control component according to the seventh aspect of this application is provided, wherein when the first strategy is a polling strategy, the next processor is determined from a plurality of processors sequentially or randomly as the first processor.

[0053] According to one of the fourth to sixth control components of the seventh aspect of this application, a twelfth control component according to the seventh aspect of this application is provided, wherein when the first policy is a low quota policy, the command manager determines the processor with the largest current total load value or the largest total number of commands among multiple processors as the first processor.

[0054] According to one of the second to tenth control components of the seventh aspect of this application, a thirteenth control component according to the seventh aspect of this application is provided, wherein the first strategy further includes a minimum load strategy for a specified command type; in response to the first strategy being a minimum load strategy for a specified command type; if the type of the first command is the same as the type specified by the first strategy, the command manager determines the processor with the smallest total load value or the smallest total number of commands among the plurality of processors as the first processor; if the type of the first command is different from the type specified by the first strategy, the command manager sequentially or randomly selects a processor from the plurality of processors as the first processor.

[0055] According to one of the first to thirteenth control components of the seventh aspect of this application, a fourteenth control component according to the seventh aspect of this application is provided, the control component further comprising a routing network, a command manager coupled to a plurality of processors through the routing network; after the command manager determines the first processor, it generates a first routing packet, the first routing packet carrying a first routing identifier and a first command, the first routing identifier pointing to the first processor; the command manager sends the first routing packet to the routing network; in response to receiving the first routing packet, the routing network obtains the first routing identifier and sends the first command to the first processor according to the first routing identifier.

[0056] According to the fourteenth control component of the seventh aspect of this application, a fifteenth control component according to the seventh aspect of this application is provided, wherein the first route identifier is an identifier of the first processor, or an identifier of the interface between the first processor and the routing network.

[0057] According to one of the first to fifteenth control components of the seventh aspect of this application, a sixteenth control component according to the seventh aspect of this application is provided, wherein after the command manager determines the first processor, it generates and sends second information to the route mapping manager, the second information indicating that the number of commands processed by the first processor has increased, the second information carrying the increased number of commands and / or command types, and the identifier of the first processor.

[0058] According to the sixteenth control component of the seventh aspect of this application, a seventeenth control component according to the seventh aspect of this application is provided, wherein, in response to receiving the second information, the route mapping manager updates the route mapping table according to the second information.

[0059] According to one of the first to seventeenth control components of the seventh aspect of this application, an eighteenth control component according to the seventh aspect of this application is provided, wherein the route mapping manager obtains command completion information of multiple processors; and in response to obtaining the command completion information, the route mapping manager updates the route mapping table.

[0060] According to the eighteenth control component of the seventh aspect of this application, a nineteenth control component according to the seventh aspect of this application is provided, wherein multiple processors send command completion information to a route mapping manager, or the route mapping manager intercepts completion information output by multiple processors.

[0061] According to one of the seventeenth to nineteenth control components of the seventh aspect of this application, a twentieth control component according to the seventh aspect of this application is provided, wherein the route mapping manager modifies the total number of commands corresponding to at least one processor; or, the route mapping manager modifies the number of commands of each command type corresponding to at least one processor; or, the route mapping manager modifies the total load value corresponding to at least one processor.

[0062] According to the twentieth control component of the seventh aspect of this application, a twenty-first control component according to the seventh aspect of this application is provided, wherein the routing mapping manager increases the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the routing mapping manager increases the number of management commands corresponding to at least one processor, decreases the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the routing mapping manager increases the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and decreases the number of write commands corresponding to at least one processor; or, the routing mapping manager increases the number of management commands corresponding to at least one processor and decreases the number of read commands corresponding to at least one processor. And reduce the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, reduces the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and reduces the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, reduces the number of read commands corresponding to at least one processor, and reduces the number of write commands corresponding to at least one processor.

[0063] According to the twentieth control component of the seventh aspect of this application, a twenty-second control component according to the seventh aspect of this application is provided, wherein the total load value is expressed as follows: ; Where M is the load value corresponding to a management command, N is the load value corresponding to a read command, K is the load value corresponding to a write command, A is the number of management commands, B is the number of read commands, C is the number of write commands, F is the total load value of the processor, A, B and C are all natural numbers, and M, N and K are all positive integers.

[0064] According to one of the first to twenty-two control components of the seventh aspect of this application, a twenty-third control component according to the seventh aspect of this application is provided, wherein when the total load value is a load value calculated based on utilization or a load value calculated based on power consumption, the routing mapping manager directly generates the routing mapping table based on utilization or power consumption; or, the routing mapping manager generates the routing mapping table based on the product of utilization or power consumption and a preset value.

[0065] According to the twenty-third control component of the seventh aspect of this application, a twenty-fourth control component according to the seventh aspect of this application is provided, wherein the route mapping manager calculates a correction value of the total load value of at least one processor based on the changed command type and / or the changed command number; the route mapping manager sums the correction value of the processor with the current total load value of the processor as the modified total load value.

[0066] According to the second control component of the seventh aspect of this application, a twenty-fifth control component according to the seventh aspect of this application is provided, wherein the load condition is characterized as the correspondence between the processor and the number of commands currently being processed or the total load value; wherein the total load value is the sum of the products of the load value of each command type and the number of commands, the load value calculated based on utilization, or the load value calculated based on power consumption; the correspondence between the processor and the number of commands currently being processed includes the correspondence between the processor and the total number of commands currently being processed or the correspondence between the processor classified according to command type and the number of commands currently being processed.

[0067] According to the twenty-fifth control component of the seventh aspect of this application, a twenty-sixth control component according to the seventh aspect of this application is provided, wherein a command manager obtains load value configuration information indicating a command type; in response to obtaining the load value configuration information indicating a command type, the command manager sends an adjustment command type load value configuration instruction to a route mapping manager; and in response to obtaining the adjustment command type load value configuration instruction, the route mapping manager saves the load value of the command type and updates the route mapping table according to the load value of the command type.

[0068] According to the fifth control component of the seventh aspect of this application, a twenty-seventh control component according to the seventh aspect of this application is provided, wherein the command manager obtains first policy configuration information, the first policy configuration information indicating a second policy, the second policy including a minimum load policy that distinguishes command types, a minimum load policy that does not distinguish command types, a low quota policy, and a round-robin policy; in response to obtaining the first policy configuration information, the command manager determines whether the second policy is the default policy; if not, it determines that the second policy is the first policy.

[0069] According to the fifth control component of the seventh aspect of this application, a twenty-eighth control component according to the seventh aspect of this application is provided, wherein the command manager obtains second policy configuration information, the second policy configuration information indicating a default policy; and in response to the second policy configuration information, the command manager modifies the default policy.

[0070] According to one of the first to twenty-eighth control components of the seventh aspect of this application, a twenty-ninth control component according to the seventh aspect of this application is provided, wherein before the control component is powered down, the routing mapping manager writes the routing mapping table into the NVM chip coupled to the control component. Attached Figure Description

[0071] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0072] Figure 1 A block diagram of a storage device in the prior art; Figure 2 This is a schematic diagram of a control component in the prior art; Figure 3 A schematic diagram of a control component provided in an embodiment of this application; Figure 4 A flowchart illustrating the routing mapping table acquisition method provided in this application embodiment; Figure 5 A flowchart of command distribution provided for embodiments of this application; Figure 6 A schematic diagram of yet another control component provided in an embodiment of this application; Figure 7 This is a schematic diagram of another control component provided in an embodiment of this application. Detailed Implementation

[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0074] Figure 3 A schematic diagram of a control component provided according to an embodiment of this application is shown.

[0075] Figure 3 In this configuration, the control unit 30 includes a host command processing unit 35 and a storage command processing unit. The storage command processing unit includes a routing table 31, a routing map manager 32, a command manager 33, and one or more processing units 34. The command manager 33 is coupled to the routing map manager 32, the routing table 31, and the processing units 34. Each processing unit 34 includes, for example, N processors, namely processor 1, processor 2, processor 3, ..., processor N, where N is an integer greater than or equal to 2. The routing map manager 32 is coupled to the routing table 31 and the processing units 34. The command manager 33 obtains storage commands through the host command processing unit interface 35; these commands may be, for example, Admin (management) commands, read commands, or write commands. The routing map manager 32 generates and updates the routing table 31. Based on the routing table 31, the command manager 33 determines the processing unit 34 to process the obtained storage command. For example, it may select one of multiple processing units to process the storage command. For instance, if the command manager 33 determines that processor 2 is the processing unit for processing a read command, it will also provide the read command to processor 2. The route mapping manager 32 obtains the characteristic information of the commands currently being processed by one or more processing units 34 and / or the characteristic information of each processor, and updates the route mapping table 31 based on the obtained information.

[0076] Figure 4 This paper demonstrates a method for obtaining a routing map table according to an embodiment of this application. The method is described below using control component 30 as an example.

[0077] Execute step S410 to obtain the characteristic information of the command currently being processed by one or more processors and / or the characteristic information of one or more processors.

[0078] The route mapping manager 32 acquires characteristic information and / or processor feature information of the commands currently being processed by multiple processors 34. The command characteristic information includes the number of commands and / or command type. For example, the route mapping manager 32 acquires that processor 1 is currently processing 5 commands and processor 2 is currently processing 3 commands. Alternatively, the route mapping manager 32 acquires that the 5 commands currently being processed by processor 1 include 1 management command, 2 read commands, and 2 write commands, while the 3 commands currently being processed by processor 2 include 1 read command and 2 write commands. Specifically, when the control unit 30 is first powered on or in an idle state, the route mapping manager 32 acquires that the number of commands currently being processed by the multiple processors 34 is 0.

[0079] Processor characteristic information includes, for example, utilization and / or power consumption. For instance, the route mapping manager 32 obtains that the current utilization of processor 1 is 90%, the utilization of processor 2 is 15%, and the utilization of processor 3 is 24%. As another example, the route mapping manager 32 obtains that the power consumption of processor 1 is 0.5W and the power consumption of processor 2 is 0.2W.

[0080] Step S420 is executed to generate a routing map table characterizing the processor's load. The routing map manager 32 generates the routing map table characterizing the processor's load based on command characteristic information and / or processor characteristic information. For example, the routing map manager 32 generates routing map table 31 based solely on command characteristic information or solely on processor characteristic information. Alternatively, the routing map manager 32 generates routing map table 31 by combining command characteristic information and processor characteristic information.

[0081] The following example, using multiple processors (34 including 3 processors), illustrates the possible forms of the routing mapping table.

[0082] Table 1

[0083] Table 2

[0084] Table 3

[0085] Table 4

[0086] Routing table 31 reflects the processor load. Load is characterized, for example, by the correspondence between processors and the number of commands currently being processed, or by the total load value. The correspondence between processors and the number of commands currently being processed includes the correspondence between processors and the total number of commands currently being processed, or the correspondence between processors categorized by command type and the number of commands currently being processed. For example, Table 1 shows the correspondence between processors and the total number of commands currently being processed: processor 1 corresponds to 5 commands, processor 2 corresponds to 3 commands, and processor 3 corresponds to 1 command. Table 2 shows the correspondence between processors and the number of commands currently being processed when categorized by command type; for example, processor 1 corresponds to 0 management commands, 4 read commands, and 2 write commands.

[0087] The total load value is the sum of the products of the load value for each command type and the number of commands, the load value calculated based on utilization, or the load value calculated based on power consumption. When the total load value is the load value calculated based on utilization or power consumption, the route mapping manager 32 directly generates a route mapping table based on utilization or power consumption; alternatively, the route mapping manager 32 generates a route mapping table based on the product of utilization or power consumption and a preset value. Optionally, the total load value is expressed as: ; Where M is the load value corresponding to a management command, N is the load value corresponding to a read command, K is the load value corresponding to a write command, A is the number of management commands, B is the number of read commands, C is the number of write commands, and F is the total load value of the processor. A, B, and C are all natural numbers, and M, N, and K are all positive integers. For example, if the load value corresponding to each management command is 2, the load value corresponding to each read command is 8, and the load value corresponding to each write command is 10, and processor 1 has 2 management commands, 4 read commands, and 1 write command, then the total load value of processor 1 is... For example, in Table 3, the total load value of the three processors can be calculated using the above formula.

[0088] The total load value can also be calculated from utilization or power. In this embodiment, utilization is CPU utilization, and power is the current power of each processor. For ease of characterization, when calculating the total load value using utilization or power, the total load value is expressed as a percentage. For example, referring to Table 4, if the CPU utilization of processor 1 is 90%, the total load value is directly obtained as 90%. Similarly, still referring to Table 4, if the maximum power of processor 3 is 3W and the current power of processor 3 is 0.9W, then the current total load value of processor 3 is 0.9 / 3 = 30%. Optionally, utilization and / or power can be obtained at specified time intervals, such as obtaining the utilization rate every 2 seconds.

[0089] In some embodiments, the routing table 31 also records quota and / or processor preference information. The quota is the remaining allocable amount of data for a processor to handle commands. For example, in Table 5, each processor initially has a quota of 100. After allocating commands to the processor, processor 1 has a remaining quota of 50. Further optionally, each different type of command has a different quota. For example, each read command has a quota of 5, each management command has a quota of 1, and each write command has a quota of 6. Then, processor 2 initially has a quota of 100. If processor 2 currently has 5 write commands, 5 management commands, and 5 read commands, then processor 2's current quota is... .

[0090] Table 5

[0091] Table 6 shows the routing map 31 containing processor preference information. Processor preference refers to the types of commands a processor prefers to process. In some cases, it is advantageous for a processor to focus on processing one or a few command types. For example, to process one command type, the processor needs to run a specific code segment, while to process more commands, it needs to run more code segments. Processor caches are typically limited; if all or most of the code segments the processor runs are contained in the cache, these code segments will run faster. Therefore, having the processor run code segments corresponding to one or a few command types, so that these code segments can be fully contained in the cache, will result in higher command processing speeds for the processor. In another example, multiple processors are asymmetric; for example, the latency of each processor accessing the FTL table varies, and the processing speed of read commands is more sensitive to the FTL table access latency. Therefore, using a processor closer to the FTL table to process read commands will result in faster processing speeds.

[0092] To illustrate further, if processor 1 prefers to process read commands, then upon receiving a read command, it will be prioritized for processing by processor 1. However, processor preference is not the same as priority, and having a processor preference does not mean that a processor cannot process other types of commands. For example, even if processor 3's processor preference is for write commands, but processor 3's current total load value is already 95, due to the high total load value, processing a write command by processor 3 would require a long wait time. Therefore, the write command will be assigned to processor 1 for processing.

[0093] Table 6

[0094] After executing step S420, step S430 is executed to obtain first information, which indicates a change in the number of commands for at least one of the multiple processors. The first information carries the changed command type and / or the changed command quantity, as well as the identifier of the processor whose command quantity has changed. In this embodiment, the change in the number of commands includes both an increase and a decrease in the number of commands. The route mapping manager 32 obtains the first information indicating an increase in the number of commands for at least one of the multiple processors from the command manager 33. The route mapping manager 32 also obtains the first information indicating a decrease in the number of commands for at least one of the multiple processors from the multiple processors 34. For example, if the route mapping manager 32 receives the first information sent by the command manager 33 indicating the addition of two write commands and one management command, along with the identifier of processor 2, then the route mapping manager 32 knows that processor 2 has added two write commands and one management command. The multiple processors 34 also send the first information to the route mapping manager 32 after completing one or more commands. For example, if processor 3 out of multiple processors 34 sends a first message to the route mapping manager 32, indicating that 3 read commands have been completed or reduced, then the route mapping manager 32 will know that processor 3 reduced 3 read commands.

[0095] Continuing with step S440, in response to obtaining the first information, the routing table is updated. In some embodiments, updating the routing table 31 by the routing manager 32 includes: modifying the total number of commands corresponding to at least one processor; or, modifying the number of commands for each command type corresponding to at least one processor; or, modifying the total load value corresponding to at least one processor. Referring again to Tables 1 to 6, the routing table 31 has different representations, so different modification methods are adaptively selected when updating the routing table 31. For example, if the routing table 31 adopts the form of Table 2, then updating the routing table 31 modifies the number of commands for the three command types corresponding to the three processors.

[0096] Further optionally, the change in the number of commands also includes increasing the number of commands for at least one processor and decreasing the number of commands for at least one processor. When the route mapping manager 32 modifies the route mapping table 31 in response to receiving the first information, it may do so in the following ways: increasing the number of management commands corresponding to at least one processor, increasing the number of read commands corresponding to at least one processor, and increasing the number of write commands corresponding to at least one processor; or, the route mapping manager increases the number of management commands corresponding to at least one processor, decreases the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the route mapping manager increases the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and decreases the number of write commands corresponding to at least one processor; or, the route mapping manager increases the number of management commands corresponding to at least one processor, decreases the number of read commands corresponding to at least one processor, and decreases the number of write commands corresponding to at least one processor. The number of write commands corresponding to one processor is reduced; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, reduces the number of read commands corresponding to at least one processor, and increases the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, increases the number of read commands corresponding to at least one processor, and reduces the number of write commands corresponding to at least one processor; or, the route mapping manager reduces the number of management commands corresponding to at least one processor, reduces the number of read commands corresponding to at least one processor, and reduces the number of write commands corresponding to at least one processor. For example, if the first information obtained by the route mapping manager 32 from the command manager 33 indicates that processor 1 adds 2 read commands, processor 2 adds 1 read command and 1 write command, and reduces 1 management command, then the route mapping manager 32 modifies the route mapping table 31 by adding 2 to the number of read commands corresponding to processor 1, adding 1 to the number of read commands corresponding to processor 2, and reducing 1 to the number of management commands corresponding to processor 2.

[0097] When modifying the routing mapping table 31 in the form of Table 3 or Table 4, the routing mapping manager 32 calculates a correction value for the total load of at least one processor based on the changed command type and / or the changed number of commands. The routing mapping manager 32 sums the processor's correction value with the processor's current total load value as the modified total load value. In this embodiment, the correction value can be positive or negative. For example, if processor 1's current total load value is 80, and processor 1 reduces 2 write commands and 1 management command, with each management command having a load value of 4 and each write command having a load value of 10, then the calculated correction value is -24, and the modified total load value is 56. As another example, if processor 2's current total load value is 25%, and processor 2 adds 2 write commands and 1 management command, with each management command having a load value of 5% and each write command having a load value of 8%, then the correction value is 21%, and the modified total load value is 46%.

[0098] In some embodiments, the command manager 33 obtains load value configuration information indicating the command type. In response to obtaining the load value configuration information indicating the command type, the command manager 33 sends an instruction to the route mapping manager 32 to adjust the load value configuration of the command type. In response to obtaining the instruction to adjust the load value configuration of the command type, the route mapping manager 32 saves the load value of the command type and updates the route mapping table 31 according to the load value of the command type.

[0099] In this embodiment, the load value of each type of command required to calculate the total load value can be configured or adjusted according to the load value configuration information, and the routing mapping table 31 is updated after the load value is adjusted. For example, the load value configuration information obtained by the command manager 33 indicates that the load value of each management command is 2, the load value of each read command is 8, and the load value of each write command is 9; the original load value of each management command was 3, the load value of each read command was 6, and the load value of each write command was 9. The current total load value of processor 1 is... The total load value after load adjustment is .

[0100] Figure 5 This is a flowchart illustrating the command distribution method provided in this embodiment. The following uses... Figure 3 The execution process of this method is described by taking the command distribution method executed by the control component 30 as an example.

[0101] Execute S510 to obtain a first command, which includes, for example, a management command, a read command, and a write command. The host command processing unit 35 obtains the command sent by the host, generates a first command based on the command sent by the host, and then sends the first command to the command manager 33.

[0102] Step S520 is executed, in which the first processor for processing the first command is determined according to the routing mapping table. The first processor is one of a plurality of processors.

[0103] Specifically, in response to receiving the first command sent by the host, the command manager 33 parses the first command to determine its command type. The command manager 33 obtains the load information of multiple processors 34 in the routing table 31. Based on the load information, the command manager determines the first processor. For example, if the routing table 31 is shown in Table 2, the command manager 33 determines that the first command is a write command, and processor 2 has the fewest commands, thus determining processor 2 as the first processor. Optionally, the command manager 33 does not need to determine the type of the first command and directly determines the first processor based on the load information. For example, if the routing table 31 is shown in Table 1, the command manager 33 checks the routing table 31 and finds that processor 3 currently has the fewest total commands, thus determining processor 3 as the first processor. As another example, if the routing table 31 is shown in Table 3, the command manager 33 determines processor 1 as the first processor.

[0104] In some embodiments, the command manager 33 determines a first command distribution strategy and then determines a first processor based on the first strategy and the routing mapping table 31. The first strategy includes, for example, a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a round-robin strategy. Optionally, if different processors handle different types of commands, and the number of processors handling a certain type is greater than or equal to one, then the minimum load strategy that distinguishes command types selects the processor with the lowest load among those processors handling that command type. For example, if three processors among the multiple processors 34 are handling write commands, with total load values ​​of 10, 36, and 50 respectively, then when a write command is received, the command manager 33 will select the processor with a total load value of 10 as the first processor.

[0105] The minimum load strategy, which does not distinguish between command types, only considers the processor with the smallest total load value or the smallest total number of commands as the first processor. For example, the command manager 33, when viewing the routing mapping table 31 as shown in Table 3, will always select processor 1 as the first processor, regardless of whether the first command received is a read command, a write command, or a management command. According to the low quota strategy, the processor with the largest current total load value or the largest total number of commands among multiple processors is selected as the first processor. The round-robin strategy selects the first processor in a round-robin manner, or randomly selects the first processor from multiple processors.

[0106] Optionally, the command manager 33 selects a first strategy from at least one preset strategy. If the command manager 33 does not select a strategy from at least one preset strategy, the default strategy is determined to be the first strategy, and the at least one preset strategy includes the default strategy. In this embodiment, the preset strategies include at least a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a round-robin strategy. The command manager 33 is configured with preset strategies and selects from the preset strategies when making a strategy selection. The default strategy is one of the preset strategies. Setting a default strategy helps reduce the number of times the command manager 33 selects the first strategy when only a specific strategy is used for a long time. Optionally, the default strategy is a minimum load strategy that distinguishes command types. In other embodiments, the default strategy is a minimum load strategy that does not distinguish command types, a low quota strategy, or a round-robin strategy.

[0107] Optionally, the command manager 33 selects a first strategy corresponding to the current working scenario. Generally, working scenarios can be divided into three categories: scenarios requiring fast read command response times, scenarios prioritizing management commands, and / or scenarios with balanced read / write operations. In scenarios requiring fast read command response times, read commands are processed first. In such scenarios, the command manager 33 selects the minimum load strategy that distinguishes command types as the first strategy, ensuring that read commands are always assigned to processors with lighter loads. In scenarios prioritizing management commands, although management commands are processed first, their processing speed is faster than both read and write commands. Therefore, in this scenario, the command manager 33 selects either the minimum load strategy that distinguishes command types or the minimum load strategy that does not distinguish command types as the first strategy. In scenarios with balanced read / write operations, the command manager 33 selects the first strategy based on the current load. If the load of each process remains balanced, then a round-robin strategy is selected as the first strategy.

[0108] In other embodiments, in response to the quota corresponding to the same command type being exhausted or falling below a threshold, the command manager 33 selects a low quota policy as the first policy. For example, when determining the first policy, after obtaining the routing mapping table 31, the command manager 33 learns that the quota of processor 2 is only 10, which is lower than the threshold of 15, so the command manager 33 selects the low quota policy as the first policy. Furthermore, the quota is restored at a specified rate. For example, if the initial quota of each processor is 500, and the quota of processor 3 is 0 after being exhausted, and the quota of processor 3 is restored at a rate of 500 per second, then the quota of processor 3 will be restored to 100 after 2 minutes and then the restoration will stop. It should be noted that the quota will start to be restored at the specified rate as soon as it is less than the initial quota.

[0109] Optionally, when the first strategy is the minimum load strategy that does not distinguish between command types, the command manager 33 determines the processor with the smallest total load value or the smallest total number of commands among multiple processors as the first processor.

[0110] Optionally, a first strategy can be selected based on the command type. For example, if the first command is a read command, the minimum load strategy that distinguishes command types is selected; if the first command is another command, the round-robin strategy is selected as the first strategy.

[0111] Optionally, a first strategy can be selected based on the command delivery queue from which the first command was submitted or the namespace accessed by the first command. For example, a quota can be provided for each namespace. If the quota for the namespace accessed by the first command is insufficient, a low-quota strategy is selected as the first strategy; otherwise, a minimum load strategy that differentiates between command types is selected. As another example, quotas can be provided for each combination of command type and each namespace.

[0112] Optionally, when the first strategy is a minimum load strategy that distinguishes command types, the multiple processors 34 include at least one processor for processing management commands, at least one processor for processing read commands, and at least one processor for processing write commands. For example, the multiple processors 34 include one processor for processing management commands, four processors for processing read commands, and two processors for processing write commands. Table 7 shows the total number of commands for each processor. Processor 1 is responsible for processing management commands, processors 2-5 are responsible for processing read commands, and processors 6 and 7 are responsible for processing write commands. If the first command is a management command, the command manager 33 determines processor 1 as the first processor. If the first command is a read command, the command manager 33 determines processor 3 as the first processor. If the first command is a write command, the command manager 33 determines processor 6 as the first processor. Similarly, if the total number of commands in Table 7 is replaced with a total load value, the command manager 33 determines the processor with the smallest total load value among the processors processing each command type as the first processor.

[0113] Table 7

[0114] Optionally, when the first strategy is a minimum load strategy that distinguishes command types, if the first command is a management command, and the total load value or total number of commands of any processor processing management commands exceeds a threshold, the processor with the smallest total load value or the smallest total number of commands among the multiple processors is determined as the first processor. If the first command is a read command, and the total load value or total number of commands of any processor processing write commands exceeds a threshold, the processor with the smallest total load value or the smallest total number of commands among the multiple processors is determined as the first processor. If the first command is a write command, and the total load value or total number of commands of any processor processing write commands exceeds a threshold, the processor with the smallest total load value or the smallest total number of commands among the multiple processors is determined as the first processor. Following the correspondence between processors and the total number of commands in Table 7, if the first command is a write command and the threshold is 8, then processor 3 is determined as the first processor.

[0115] In some embodiments, when the first strategy is a polling strategy, the command manager 33 sequentially or randomly selects the next processor from a plurality of processors as the first processor. For example, the command manager 33 determines the first processor in the order of processor 1, processor 3, and processor 2. When a read command is received, the processor that handles the read command is determined to be processor 2. Subsequently, when a write command is received, the processor that handles the write command is determined to be processor 1.

[0116] In some embodiments, when the first policy is a low quota policy, the command manager 33 determines the processor with the largest current total load value or the largest total number of commands among the multiple processors 34 as the first processor. Optionally, the routing mapping table 31 does not need to record the quota; the total load value or the total number of commands can also reflect the quota level, with the largest total load value indicating the lowest quota.

[0117] In some embodiments, the first strategy further includes a minimum load strategy specifying command types. In response to the first strategy being a minimum load strategy specifying command types, if the type of the first command is the same as the type specified by the first strategy, the command manager determines the processor with the smallest total load value or the smallest total number of commands among the multiple processors as the first processor; if the type of the first command is different from the type specified by the first strategy, the command manager selects a processor as the first processor sequentially or randomly from among the multiple processors. Taking the correspondence between processors and the total number of commands given in Table 7 as an example, if the first command obtained by the command manager 33 is a write command, the command manager 33 can select processor 6 as the first processor. However, since processors 6 and 7 are currently processing a large number of commands, the command manager 33 will select one processor from processors 1-5 as the first processor. For example, the command manager 33 may select processor 1 or processor 3 as the first processor.

[0118] Optionally, the command manager 33 obtains first policy configuration information, which indicates a second policy. The second policy includes a minimum load policy that distinguishes command types, a minimum load policy that does not distinguish command types, a low quota policy, and a round-robin policy. In response to obtaining the first policy configuration information, the command manager 33 determines whether the second policy is the default policy; if not, it determines that the second policy is the first policy. In this embodiment, the command manager 33 can also determine the first policy according to the indication. If the indicated second policy is the same as the default policy, then the command manager 33's default policy is the first policy. However, if the second policy and the default policy are different, the command manager 33 determines the second policy as the first policy according to the indication.

[0119] Optionally, the command manager 33 obtains second policy configuration information, which indicates the default policy. In response to the second policy configuration information, the command manager 33 modifies the default policy. For example, if the existing default policy of the command manager 33 is a round-robin policy, and the second policy configuration information obtained by the command manager 33 indicates that the default policy should be changed to a low-quota policy, the command manager 33 will then change the default policy to the low-quota policy. The default policy will then remain the low-quota policy until the next second policy configuration information is received.

[0120] Execute step S530, sending the first command to the first processor.

[0121] Figure 3 The command manager 33 is coupled to multiple processors 34, so that after determining the first processor, the command manager 33 directly sends the first command to the first processor. Optionally, the first processor obtains the first command according to the instructions of the command manager 33.

[0122] Figure 6 This is a schematic diagram of a control component according to another embodiment of this application. Similar to control component 30, control component 60 includes a routing map table 61, a routing map manager 62, a command manager 63, multiple processors 64, and a host interface 65. These devices perform similar functions to those of control component 30 and will not be described further here. Unlike control component 30, command manager 63 is coupled to host interface 65. Host interface 65 receives I / O commands (e.g., read commands, write commands, and / or management commands) from a host and provides the received I / O commands to command manager 63. Control component 60 also includes a routing network 66, through which command manager 63 is coupled to multiple processors 64.

[0123] Optionally, after determining the first processor, the command manager 63 generates a first routing packet. The first routing packet carries a first routing identifier and a first command, with the first routing identifier pointing to the first processor. The command manager 63 sends the first routing packet to the routing network 66. In response to receiving the first routing packet, the routing network 66 obtains the first routing identifier and sends the first command to the first processor based on the first routing identifier. Optionally, the first command is in the form of an I / O command, or the first command is in the form of one or more stored commands generated based on an I / O command.

[0124] Alternatively, the first route identifier can be the identifier of the first processor, or the identifier of the interface between the first processor and the routing network 66. For example, if the first processor is processor 4, and the first route identifier is the identifier of the interface between processor 4 and the routing network 66, then the routing network 66 sends the first command to processor 4 through the interface between processor 4 and itself.

[0125] Execute step S540 to generate and output second information, the second information indicating that the number of commands processed by the first processor has increased, the second information carrying the increased number of commands and / or command types, and the identifier of the first processor.

[0126] For example, after the command manager 63 determines the first processor, it generates and sends second information to the route mapping manager 62. This second information indicates an increase in the number of commands processed by the first processor. The second information carries the increased number of commands and / or command types, as well as the identifier of the first processor. In this embodiment, the second information sent by the command manager 63 to the route mapping manager 62 is part of the first information.

[0127] Furthermore, in response to receiving the second information, the route mapping manager 63 updates the route mapping table 61 according to the second information. Optionally, the route mapping manager 62 obtains command completion information from multiple processors 64. In response to obtaining the command completion information, the route mapping manager 62 updates the route mapping table 61. In this embodiment, the command completion information indicates not only that a command has been processed, but also that the number of commands currently being processed by the processor has decreased. The method by which the route mapping manager 63 updates the route mapping table 61 can be found in the method described above, and will not be repeated here.

[0128] Optionally, multiple processors 64 may send command completion information to the route mapping manager 62, or the route mapping manager 62 may intercept the completion information output by multiple processors 64.

[0129] Figure 7 A schematic diagram of a control component 70 according to another embodiment of this application is provided.

[0130] Control components 70 Figure 3The control unit 30 shown is similar. The difference is that control unit 70 also includes a command acquisition unit 376. The command acquisition unit 76 acquires IO commands from multiple command delivery queues. These command delivery queues are, for example, submission queues (SQs) defined by the NVMe protocol. For example, the multiple command delivery queues may include four queues. The command acquisition unit 76 acquires IO commands from the four queues using a polling method. Or, as... Figure 7 As shown, the command acquisition unit 76 acquires IO commands from four command issuance queues using a weighted round-robin (WRR) method. For example, command issuance queue 1 has a weight of 0, command issuance queue 2 has a weight of 10, command issuance queue 3 has a weight of 20, and command issuance queue 4 has a weight of 127. Therefore, the command acquisition unit 76 acquires 0 commands from command issuance queue 1, 10 commands from command issuance queue 2, 20 commands from command issuance queue 3, and 127 commands from command issuance queue 4 in the round-robin order.

[0131] Weight table 71 records the weights of each command queue. Command acquisition unit 76 selects the command distribution queue to be accessed according to the queue weights recorded in weight table 71 and a weighted round-robin strategy, and acquires IO commands from the selected command distribution queue.

[0132] Optionally, the Admin command can instruct an update to the weights of command delivery queues. In response to the Admin command, processor 74 updates weight table 71, for example. Still optionally, route map manager 72 updates weight table 71. For example, quotas are provided for each command delivery queue, and one or more command delivery queues can share quotas. For example, command delivery queues associated with the same namespace share quotas. In response to quota exhaustion or falling below a threshold, route map manager 72 lowers the weights of one or more corresponding command delivery queues to reduce or prevent command acquisition unit 76 from acquiring IO commands from such queues. In response to sufficient quota, route map manager 72 increases or restores the weights of one or more corresponding command delivery queues.

[0133] The host command processing unit 75 processes the I / O commands provided by the command acquisition unit 76. For example, it generates one or more storage commands as a first command based on the acquired I / O commands and provides them to the command manager 73. The command manager 73, according to the embodiments provided in this application, distributes the first command to one of the processors 74 based on the routing table 71.

[0134] In this application, the routing table 71 is a table in the lookup table circuit or memory maintained by the routing map manager 72. The routing map manager 72 may store the routing table 71 in the DRAM within the control unit 70 or in off-chip DRAM. Optionally, if the routing table 71 is stored in the DRAM inside the control unit 70, the routing map manager 72 writes the routing table 71 to the NVM chip coupled to the control unit 70 before the control unit is powered down.

[0135] Another embodiment of this application provides a routing table management module, including: an acquisition unit, which acquires feature information of commands currently being processed by each of a plurality of processors and / or characteristic information of each processor, wherein the feature information of the commands includes the number of commands and / or the command type, the characteristic information of the processors includes utilization and / or power consumption, and the command type includes management commands, read commands, and write commands; and a generation unit, which generates the routing table characterizing the load of the processors. The routing table management module in this embodiment can execute the routing table acquisition method in the above embodiments, and the execution method is similar to that in the previous embodiments, and will not be described again here.

[0136] Another embodiment of this application provides a command management module, including: an acquisition unit for acquiring a first command, the first command including a management command, a read command, and a write command; a determination unit for determining a first processor to process the first command according to a routing mapping table, the first processor being one of a plurality of processors; and a sending unit for sending the first command to the first processor. The routing mapping table management module in this embodiment can execute the command distribution method in the above embodiments, and the execution method is similar to that in the previous embodiments, and will not be described again here.

[0137] Another embodiment of this application provides a control component, including a routing mapping table management module as described in the above embodiments, a command management module as described in the above embodiments, and a routing network module.

[0138] Another embodiment of this application provides an information processing device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the above embodiments.

[0139] Although the examples referred to in the present application are described for illustrative purposes only and not for limiting the scope of the application, changes, additions and / or deletions to the implementation may be made without departing from the scope of the application.

[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A command distribution method, characterized in that, include: The first command is obtained from multiple command issuance queues using a polling or weighted polling method. The command types of the first command include management commands, read commands, and write commands. Parse the first command to determine its command type; The first processor for processing the first command is determined based on the routing table, where the first processor is one of a plurality of processors; the routing table is used to characterize the processor load. The load condition is characterized as the correspondence between the processor and the number of commands it is currently processing, or the total load value; the total load value is the sum of the products of the load value of each command type and the number of commands, the load value calculated based on utilization, or the load value calculated based on power consumption; the correspondence between the processor and the number of commands it is currently processing includes the correspondence between the processor and the total number of commands it is currently processing, or the correspondence between the processor classified by command type and the number of commands it is currently processing; Send the first command to the first processor.

2. The method as described in claim 1, characterized in that, Also includes: Update the routing table.

3. The method as described in claim 2, characterized in that, in, Obtain feature information of the command currently being processed by each of the multiple processors and / or characteristic information of each processor. The feature information of the command includes the number of commands and / or the command type, and the characteristic information of the processor includes utilization and / or power consumption. A routing map table is generated based on the characteristic information of the commands being processed and / or the characteristic information of each processor.

4. The method as described in claim 2 or 3, characterized in that, in, Obtain first information, the first information indicating that the number of commands processed by the first processor has increased, the first information carrying the increased command type and / or the increased command number, and the first processor identifier; In response to obtaining the first information, the routing mapping table is updated.

5. The method as described in claim 2 or 3, characterized in that, in, In response to obtaining load value configuration information indicating the command type, the load value configuration information indicating the load value corresponding to each command type; The routing table is updated according to the load value corresponding to each command type as indicated by the load value configuration information of the command type.

6. The method according to any one of claims 1-5, characterized in that, The step of determining the first processor for processing the first command based on the routing mapping table includes: The first processor is determined directly based on the processor load information recorded in the routing table; or A first strategy for command distribution is determined, which includes a minimum load strategy that distinguishes command types, a minimum load strategy that does not distinguish command types, a low quota strategy, and a round-robin strategy; the first processor is determined based on the first strategy and the routing mapping table.

7. The method as described in claim 6, characterized in that, The first strategy for determining command distribution includes: Choose a first strategy from at least one preset strategy; or, When no strategy is selected from at least one preset strategy, the default strategy is determined to be the first strategy, and the at least one preset strategy includes the default strategy; The preset strategies include at least the minimum load strategy that distinguishes command types, the minimum load strategy that does not distinguish command types, the low quota strategy, and the round-robin strategy.

8. The method as described in claim 6 or 7, characterized in that, The first strategy for determining command distribution includes: Based on the current work scenario, select the first strategy corresponding to the current work scenario; or... In response to the exhaustion or fall below the threshold of the quota corresponding to the same command type, the low quota strategy is selected as the first strategy; or Choose the first strategy based on the command type; or The first strategy is selected based on the command delivery queue or the namespace accessed by the first command.

9. The method as described in claim 6 or 7, characterized in that, in, Obtain first policy configuration information, which indicates second policy; the second policy includes minimum load policy that distinguishes command type, minimum load policy that does not distinguish command type, low quota policy, and round-robin policy. In response to obtaining the first policy configuration information, determine whether the second policy is the default policy; If the second strategy is not the default strategy, then the second strategy will be used as the first strategy. If the second strategy is the default strategy, then the default strategy will be used as the first strategy.

10. A control component, characterized in that, It includes a route mapping table, a route mapping manager, a command manager, and multiple processors; wherein, the command manager is coupled with the route mapping manager, the route mapping table, and the multiple processors, and the route mapping manager is coupled with the route mapping table and the multiple processors. The route mapping manager generates and updates the route mapping table; The command manager retrieves a first command from multiple command distribution queues using a polling or weighted polling method. The command type of the first command includes management commands, read commands, and write commands. The first command is parsed to determine its command type. Based on a routing table, a first processor is determined to handle the first command; the first processor is one of multiple processors. The first command is then sent to the first processor. The routing table is used to characterize the processor load; the load is characterized as the correspondence between the processor and the number of commands it is currently processing or the total load value; the total load value is the sum of the products of the load value and the number of commands for each command type, the load value calculated based on utilization, or the load value calculated based on power consumption; the correspondence between the processor and the number of commands it is currently processing includes the correspondence between the processor and the total number of commands it is currently processing or the correspondence between the processor classified by command type and the number of commands it is currently processing.