Method and device for providing QoS in concurrent task processing system

By identifying the busy state of nodes in the task processing system and sending current limit notifications, the processing speed is slowed down, and the problem of difficult improvement of QoS indicators in large-scale concurrent task scheduling systems is solved, and more uniform task processing load and higher service quality are achieved. .

CN111381941BActive Publication Date: 2025-02-11MEMBLAZE TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811611942.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-27
Publication Date
2025-02-11
Estimated Expiration
2038-12-27

AI Technical Summary

Technical Problem

In a task processing system that handles large-scale concurrent tasks, it is difficult for QoS indicators to reach a high level, resulting in tasks not being processed in time due to interference from multiple factors, seriously affecting service quality.

Method used

By identifying that the node is in a busy state of work, the current limit notification is sent to the adjacent nodes, and the processing speed of the task is slowed down in response to receiving the current limit notification. Specific methods include passing current limit notifications between non-adjacent nodes on the data path, slowing down processing by increasing latency or adding tasks to temporary tables.

Benefits of technology

By slowing down the processing speed of tasks by the previous nodes, evenly distribute task processing load, reducing single-node congestion, and improving the overall processing efficiency of the data path, thereby improving the service quality of the task processing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111381941B_ABST
    Figure CN111381941B_ABST
Patent Text Reader

Abstract

A method and device for providing QoS in a concurrent task processing system are provided. The provided task scheduling method includes: identifying that a first node is in a busy working state; sending a current limiting notification to a second node; and in response to receiving the current limiting notification, the second node slows down the processing speed of the task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to task scheduling, and in particular, to providing QoS (Quality of Service) in a task processing system that processes large-scale concurrent tasks. Background Art

[0002] In some applications, processors handle large-scale concurrent tasks, such as embedded processors used in network devices and storage devices, which handle multiple concurrent network packets or IO commands.

[0003] In desktop CPUs and server CPUs, the operating system runs and schedules multiple processes and / or threads running on the CPU to handle tasks. Users do not need to intervene too much in the switching between processes / threads. The operating system selects the appropriate process / thread for scheduling to fully utilize the CPU computing power.

[0004] However, in large-scale concurrent task scheduling systems, QoS indicators are often difficult to achieve a high level. In pursuit of concurrency, some tasks cannot be processed in time due to interference from multiple factors, which seriously affects QoS indicators. Summary of the invention

[0005] It is necessary to improve the QoS of large-scale concurrent task scheduling systems.

[0006] According to the first aspect of the present application, a first task scheduling method according to the first aspect of the present application is provided, including: identifying that the first node is in a busy working state; sending a current limiting notification to the second node; in response to receiving the current limiting notification, the second node slows down the processing speed of the task.

[0007] According to the first task scheduling method of the first aspect of the present application, a second task scheduling method according to the first aspect of the present application is provided, wherein the first node and the second node are not adjacent on the data path, and the second node does not send tasks to the first node.

[0008] According to the first or second task scheduling method of the first aspect of the present application, a third task scheduling method according to the first aspect of the present application is provided, wherein the first node recognizes that it is in a busy working state and sends a current limiting notification to the second node.

[0009] According to one of the first to third task scheduling methods of the first aspect of the present application, a fourth task scheduling method according to the first aspect of the present application is provided, wherein the first node identifies that it is in a busy state based on the fact that its subsequent nodes are unable to receive tasks or that it itself has performed an operation that is relatively time-consuming among multiple operations.

[0010] According to the fourth task scheduling method of the first aspect of the present application, a fifth task scheduling method according to the first aspect of the present application is provided, wherein a relatively time-consuming operation among the multiple operations is an operation of issuing an erase command to the non-volatile memory.

[0011] According to one of the first to fifth task scheduling methods of the first aspect of the present application, a sixth task scheduling method according to the first aspect of the present application is provided, wherein the second node slows down the processing speed of the task by adding a delay in the gap between processing tasks.

[0012] According to one of the first to sixth task scheduling methods of the first aspect of the present application, a seventh task scheduling method according to the first aspect of the present application is provided, wherein the second node slows down the processing speed of the task by increasing the delay in the gap between obtaining tasks from the inbound queue and / or adding tasks to the outbound queue.

[0013] According to one of the first to seventh task scheduling methods of the first aspect of the present application, an eighth task scheduling method according to the first aspect of the present application is provided, wherein the second node slows down the processing speed of the task by adding the task to a temporary storage table.

[0014] According to one of the first to eighth task scheduling methods of the first aspect of the present application, a ninth task scheduling method according to the first aspect of the present application is provided, further comprising: the second node adds the task to a temporary storage table in response to its subsequent node being unable to receive the task.

[0015] According to the eighth or ninth task scheduling method of the first aspect of the present application, a tenth task scheduling method according to the first aspect of the present application is provided, wherein the tasks in the temporary storage table have a timestamp, which indicates the time when the task is first processed by the task processing system; or the tasks in the temporary storage table are sorted according to the time when they are first processed by the task processing system.

[0016] According to the tenth task scheduling method of the first aspect of the present application, an eleventh task scheduling method according to the first aspect of the present application is provided, which also includes: the second node takes out the task with the earliest time when it was first processed by the task processing system from the temporary storage table and processes the task.

[0017] According to one of the first to eleventh task scheduling methods of the first aspect of the present application, a twelfth task scheduling method according to the first aspect of the present application is provided, which also includes: in response to the first node being in a busy working state, sending a current limiting notification to a third node, wherein the first node and the third node are not adjacent to each other on the data path.

[0018] According to one of the first to twelfth task scheduling methods of the first aspect of the present application, a thirteenth task scheduling method according to the first aspect of the present application is provided, wherein the second node is the frontmost node on the data path.

[0019] According to one of the first to eleventh task scheduling methods of the first aspect of the present application, a fourteenth task scheduling method according to the first aspect of the present application is provided, which also includes: in response to the first node being in a busy state, the first node indicates to the coordination node that it is in a busy state; in response to identifying that the first node is in a busy state, the coordination node sends a current limiting notification to the second node.

[0020] According to one of the first to eleventh task scheduling methods of the first aspect of the present application, or the fourteenth task scheduling method, a fifteenth task scheduling method according to the first aspect of the present application is provided, which also includes: the coordinating node sends a current limiting notification to the third node based on the working status of the first node, wherein the third node and the first node belong to different data paths.

[0021] According to the fifteenth task scheduling method of the first aspect of the present application, a sixteenth task scheduling method according to the first aspect of the present application is provided, wherein the first node belongs to a data path for processing host IO commands, and the third node belongs to a data path for processing garbage collection IO commands, and the third node is the first-level node of the data path for processing garbage collection IO commands.

[0022] According to one of the fourteenth to sixteenth task scheduling methods of the first aspect of the present application, a seventeenth task scheduling method according to the first aspect of the present application is provided, wherein the coordinating node obtains the working status of one or more nodes and sends a current limiting notification to one, multiple or all nodes.

[0023] According to one of the fourteenth to seventeenth task scheduling methods of the first aspect of the present application, an eighteenth task scheduling method according to the first aspect of the present application is provided, wherein the coordination node is provided by a processor different from the processor providing the first node or the second node.

[0024] According to one of the first to eighteenth task scheduling methods of the first aspect of the present application, a nineteenth task scheduling method according to the first aspect of the present application is provided, wherein the first node is a final node of the data path.

[0025] According to the fourteenth task scheduling method of the first aspect of the present application, a twentieth task scheduling method according to the first aspect of the present application is provided, wherein the first node and the second node belong to different data paths.

[0026] According to the twentieth task scheduling method of the first aspect of the present application, a twenty-first task scheduling method according to the first aspect of the present application is provided, which also includes: the coordinating node sends a current limiting notification to the third node in response to identifying that the first node is in a busy working state, wherein the third node belongs to the same data path as the first node.

[0027] According to the twenty-first task scheduling method of the first aspect of the present application, a twenty-second task scheduling method according to the first aspect of the present application is provided, wherein the current limiting notification sent by the coordination node to the third node and the current limiting notification sent to the two nodes make the performance of processing tasks on the first data path and the second data path respectively have a specified ratio or ratio range; wherein the first node belongs to the first data path, and the second node belongs to the second data path.

[0028] According to one of the first to twenty-second task scheduling methods of the first aspect of the present application, a twenty-third task scheduling method according to the first aspect of the present application is provided, wherein the node is a processor or a task processing unit.

[0029] According to the second aspect of the present application, a first task scheduling device, an information processing device, a storage device or a computer according to the second aspect of the present application is provided, comprising a memory, a processor and a program stored in the memory and executable on the processor, characterized in that when the processor executes the program, it implements one of the task scheduling methods according to the first aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1A is a schematic diagram of task scheduling according to an embodiment of the present application;

[0032] Figure 1B is a block diagram of a task processing system according to an embodiment of the present application;

[0033] Figure 1C is a schematic diagram of a data path of a task processing system according to an embodiment of the present application;

[0034] Figure 2 is a schematic diagram of a data path of a task processing system according to another embodiment of the present application; and

[0035] Figure 3 is a schematic diagram of a data path of a task processing system according to yet another embodiment of the present application. DETAILED DESCRIPTION

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

[0037] Figure 1A It is a schematic diagram of task scheduling according to an embodiment of the present application.

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

[0039] The solid arrows indicate the time sequence of processing multiple tasks, and the dotted arrows indicate the logical sequence of task processing. For example, taking Task 1 as an example, its subtask 1-1 (Task 1-1) should be processed first, and then its subtask 1-2 (Task 1-2) should be processed. Figure 1A ,After processing task 1-1, task 1-2 cannot be processed immediately (because the required resources are not ready), so task 2-1 is scheduled for execution,and task 3-1. It is then recognized that the resources required for task 1-2 are ready, and task 1-2 is scheduled for execution after task 3-1 is processed.

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

[0041] The code segments processing each task communicate with each other through signals, queues, shared memory, etc. For example, the task in the earlier logical order generates data as a producer, and the task in the later logical order receives the data generated by the producer as a consumer.

[0042] Figure 1B is a block diagram of a task processing system according to an embodiment of the present application.

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

[0044] The code segment of the software running on the CPU is called a task processing unit. The task processing system includes multiple task processing units. Each task processing unit processes the same or different tasks. For example, task processing unit 0 processes the first subtask of the task (such as task 1-1, task 2-1 and task 3-1), while task processing unit 1, task processing unit 2 and task processing unit 3 process the second subtask of the task (such as task 1-2, task 2-2 and task 3-2).

[0045] The software also includes a task management unit for scheduling one of the task processing units to run on the hardware.

[0046] Figure 1C It is a schematic diagram of a data path of a task processing system according to an embodiment of the present application.

[0047] Taking a storage device that processes IO commands as an example of a task processing system, the processing process of IO commands is divided into, for example, two stages. Node 160 processes the first stage of the IO command, and based on the processing result of the first stage, node 165 processes the second stage of the IO command. Node 160 obtains the IO command to be processed from the inbound queue 180, and fills the processing result of the first stage of the IO command into the outbound queue 185 for delivery to node 165. Node 165 obtains the IO command from the queue 185 (or its own inbound queue coupled to the queue 185) and continues to process the second stage of the IO command. Thus, the queue 180, the node 160, the queue 185 and the node 165 constitute a data path for processing IO commands. Multiple stages on the data path process the IO commands in sequence.

[0048] Optionally, nodes communicate with each other through queues, shared memory, interrupts, signals, and other methods.

[0049] A node is, for example, a processor or a task processing unit.

[0050] As an example, node 165 provides a "back pressure" mechanism to node 160 through queue 185 to coordinate the inconsistency in the IO command processing speed between node 160 and node 165. Due to the complexity of the task, it is difficult to ensure that the time required for the first stage and the second stage of the IO command processing process is the same, so there may be a difference between the speed at which node 160 processes the first stage of the IO command and the speed at which node 165 processes the second stage of the IO command. For example, the speed at which node 165 processes the second stage of the IO command is lower than the speed at which node 160 processes the first stage of the IO command, so that as time goes by, the IO commands to be processed are gradually accumulated in queue 185. Node 165 takes out IO commands from queue 185 according to its own processing capacity, and when queue 185 is filled with IO commands to be processed, node 160 will find that queue 185 is full, and it is temporarily unable to add the first stage processing results of IO commands to queue 185.

[0051] Optionally, the node also includes a temporary storage queue. For example, in response to identifying that the queue 185 is full, the node 160 adds the first stage processing result of the IO command to the temporary storage queue, and after a free entry appears in the queue 185, the first stage processing result of the IO command taken out from the temporary storage queue is added to the queue 185. Still optionally, in response to identifying that the queue 185 is full, the node 160 also suspends obtaining IO commands from the queue 180.

[0052] In this way, the processing speed of each node is adaptively coordinated on the data path.

[0053] Figure 2 is a schematic diagram of a data path of a task processing system according to yet another embodiment of the present application.

[0054] The data path of the task processing system includes node 260, node 264 and node 268. Node 260, node 264 and node 268 are in order, for example, node 260 processes the first stage of the IO command, node 264 processes the second stage of the IO command, and node 268 processes the third stage of the IO command. The subsequent node needs to use the processing result of the previous node to continue processing the IO command. The IO command processing results of each node are transmitted between nodes through queues (for example, queue 280, queue 284 and queue 288). For the purpose of simplicity, in some cases, the processing results of IO commands transmitted between nodes are referred to as IO commands.

[0055] It is understandable that other methods other than queues may be used to transmit IO commands between nodes. The data path of the task processing system may have other numbers of nodes.

[0056] As an example, the previous node 260 adds its own processing result of the IO command to the queue 284, and the subsequent node 264 takes out the processing result of the IO command of the previous node from the queue 284 and continues to process. In response to the queue 284 being full, the previous node 260 temporarily stops adding its own processing result of the IO command to the queue 284, but optionally adds its own processing result of the IO command to the temporary storage table 240. For the purpose of simplicity, the processing result or intermediate result of the IO command added to the temporary storage table is also referred to as an IO command.

[0057] According to an embodiment of the present application, the temporary storage table 240 includes a plurality of entries, each of which records the processing result or intermediate processing result of the node on the IO command. The entries of the temporary storage table 240 are sorted by timestamps. The timestamp comes from, for example, the time when the IO command is started to be processed by the task processing system. For example, the front node of the data path of the task processing system corresponds to the IO command to be processed, and the current time or sequence number is marked as the timestamp for the IO command.

[0058] Figure 2 Although only the temporary storage table 240 of the node 260 is shown, it can be understood that each node may include one or more temporary storage tables to store the IO commands processed by each node.

[0059] According to an embodiment of the present application, as an example, node 260 recognizes that queue 284 is full, or the number of free entries in queue 284 is less than a threshold, and adds the IO command processed by itself to temporary storage table 240. As another example, when the IO command cannot be processed due to insufficient resources required to process the IO command, node 260 also adds the IO command to temporary storage table 240 or other temporary storage tables. In response to queue 284 becoming available, or the resources required to process the IO command being ready, node 260 takes out the IO command from temporary storage table 240 in the time order indicated by the timestamp and continues to process. Preferably, the IO command with an earlier timestamp is taken out first for processing to avoid the time process of the IO command being processed in the task processing system. In other words, when node 260 obtains the IO command from temporary storage table 240, the timestamp of the IO command determines the priority of the IO command to be processed. IO commands with earlier timestamps are processed earlier.

[0060] It is understandable that each IO command in the temporary storage table 240 has a timestamp, so that the entries in the temporary storage table may not be sorted, but when an IO command is taken out from the temporary storage table, the IO command with the earliest timestamp is searched and processed.

[0061] According to an embodiment of the present application, node 268 also provides a current limiting notification to node 260. Node 268 and node 260 are non-adjacent nodes on the data path, so node 260 cannot perceive the working (busy) state of node 268 through its outbound queue. Since node 260 and node 268 are not adjacent on the data path, node 260 will not directly send IO commands to node 268. Node 268 sends a current limiting notification to node 260 that is not adjacent to it through the current limiting notification.

[0062] As an example, node 268 sends a current limiting notification when it identifies a busy state. For example, in response to its outbound queue 288 being full or the number of free entries in the outbound queue 288 being less than a threshold, node 268 identifies a busy state. As another example, node 268 identifies a busy state based on processing a relatively time-consuming operation. As an example, an erase command to a non-volatile memory processed by node 268 is a relatively time-consuming operation relative to a programming command or a read command; a programming command to a non-volatile memory processed by node 268 is a relatively time-consuming operation relative to a read command.

[0063] Still by way of example, the node 268 identifies a busy state based on processing a second type of task that is different from the first type of task. For example, the first type of task is processing IO commands from the host, while the second type of task is processing garbage collection commands.

[0064] Optionally or further, after the subsequent node 268 on the data path recognizes the busy state, it sends a current limiting notification to the front-end node of the data path. Still optionally, the subsequent node 268 sends a current limiting notification to one, multiple or all front-end nodes of the data path.

[0065] By sending a current limiting notification to the front-stage node, the busy state can be notified to the front-stage node of the data path more quickly, thereby reducing the workload of the back-stage node and the entire data path.

[0066] In response to receiving the current limiting notification, as an example, node 260 slows down the processing speed of the IO command. For example, node 260 slows down the processing speed of the IO command by increasing a delay that can be specified or adjusted during the processing of the IO command, and by increasing the delay, the time to process each IO command is increased, thereby slowing down the processing speed of the IO command. As another example, node 260 slows down the processing speed of the IO command by increasing the delay during taking the IO command from the inbound queue 280 and / or adding the IO command to the outbound queue 284. As another example, node 260 slows down the processing speed of the IO command by adding one or more IO commands to the temporary storage table 240.

[0067] Since when one or more nodes are in a busy state, the IO commands received by the node are most likely not processed immediately (for example, added to the temporary storage table 240), so these IO commands will experience a long waiting time in the busy node, and the waiting time starts from the time when the IO command is provided to the node. In response to the current limiting notification, the front-stage node 260 slows down the processing speed of the IO command, so that the IO command sent to the node in the busy state is evenly sent to the node in the busy state within, for example, a time period T. As a comparison, taking N commands sent to a node in a busy state as an example, if the front-stage node does not slow down the processing speed of the IO command, these N commands are sent to the node in the busy state at the time of the start of the time period T, so that within the time period T, the waiting time of each of these N commands is close to T, and its average waiting time is also close to T. If the front-stage node slows down the processing speed of the IO command, these N commands arrive at the node in the busy state in, for example, an even distribution within the time period T, so that its average waiting time is T / 2. In this way, the average processing delay of the node in the busy state to the IO command is reduced. It is helpful to improve the quality of service (QoS) of the task processing system in processing IO commands. As an example, the quality of service is evaluated by the maximum processing delay of a specified percentage of IO commands, for example, 99.999% of IO commands will be processed within 100 microseconds.

[0068] By slowing down the processing speed of IO commands at the previous node, each node on the data path can process IO commands more evenly, reducing the congestion of a single node. It also encourages busy nodes to release the resources occupied by pending IO commands as soon as possible, which is beneficial to the processing of subsequent IO commands, thereby reducing congestion.

[0069] Furthermore, when nodes at all levels retrieve IO commands from the temporary storage table 240, they retrieve IO commands that were processed earlier in order of their timestamps and process them first, which also helps to further improve the service quality of the data processing system in processing IO commands.

[0070] Still further, after the subsequent node 268 on the data path recognizes that it has exited the busy state, it sends a notification to cancel the current limit to the front-end node of the data path. Still optionally, the subsequent node 268 sends a notification to cancel the current limit to one, multiple or all front-end nodes of the data path. In response to receiving the notification to cancel the current limit, each node cancels one or more measures taken to slow down the processing speed of the IO command, or gradually reduces the delay during the processing of the IO command.

[0071] Still optionally, the subsequent node 268 also provides a current limiting notification to the previous node 264 adjacent to it on the data path, so that the previous node 264 implements current limiting earlier, without having to wait until the outbound queue of node 264 is filled before realizing that the subsequent node 268 is busy.

[0072] Figure 3 is a schematic diagram of a data path of a task processing system according to yet another embodiment of the present application.

[0073] The task processing system includes multiple data paths. The data path for processing host IO commands includes nodes 340 , 344 , and 348 , and the data path for processing garbage collection IO commands includes nodes 360 , 364 , and 368 .

[0074] Node 340, node 344 and node 348 are in order. For example, node 340 processes the first stage of the IO command, node 344 processes the second stage of the IO command, and node 348 processes the third stage of the IO command. The subsequent node needs to use the processing result of the previous node to continue processing the IO command. The IO command processing results of each node are transmitted between nodes through, for example, queues. For the purpose of simplicity, in some cases, the processing results of the IO command transmitted between nodes are referred to as IO commands. Node 360, node 364 and node 368 are also in order.

[0075] It is understandable that the data path of the task processing system may have other numbers of nodes and other data paths.

[0076] According to this application Figure 3 In the illustrated embodiment, the task processing system further includes a coordination node 370. Figure 3 , a separate coordination node 370 is shown, and optionally, other nodes (340, 344, 348, 360, 364 and 368) of the data processing system can all serve as coordination nodes. Still optionally, nodes belonging to different data paths, such as node 340 and node 360, can be provided by the same or different processors, for example, respectively provided by code segments of two processing tasks running on the same processor.

[0077] Optionally, each node is further coupled to one or more temporary storage tables, and entries in the temporary storage tables are sorted by timestamps, or when an entry is retrieved from the temporary storage table, the entry with the earliest timestamp may be retrieved.

[0078] Using a separate coordination node 370 is beneficial to reduce interference with the data path. For example, if the node is provided by a code segment for processing a task, using a separate coordination node 370 can reduce the probability of other nodes being swapped out of the processor's cache, thereby improving operating efficiency.

[0079] The coordination node distributes the current limiting information in the data processing system, thereby reducing the impact of the distribution of the current limiting information on the data path.

[0080] See also Figure 3 , the subsequent node 348 of the data path processing the host IO command is coupled to the coordination node 370, and provides its own working status to the coordination node 370, for example, indicating that it is in a busy state to the coordination node 370. In response to receiving the working status of the subsequent node 348, the coordination node 370 provides a current limiting notification to the previous node 340 and / or the previous node 344 belonging to the same data path as the subsequent node 348. In response to receiving the current limiting notification, as an example, the node 340 and / or the node 344 slows down the processing speed of the IO command.

[0081] The subsequent node 368 that processes the garbage collection IO command is coupled to the coordination node 370, and provides its own working status to the coordination node 370, for example, indicating to the coordination node 370 that it is in a busy state. In response to receiving the working status of the subsequent node 368, the coordination node 370 provides a current limiting notification to the previous node 360 ​​and / or the previous node 364 that belong to the same data path as the subsequent node 368. In response to receiving the current limiting notification, for example, the node 360 ​​and / or the node 364 slows down the processing speed of the garbage collection IO command. Optionally or further, the coordination node 370 provides a current limiting notification to the previous node 340 and / or the previous node 344 that belong to a different data path from the subsequent node 368 in response to receiving the working status of the subsequent node 368. Optionally or further, the coordination node 370 provides a current limiting notification to the previous node 360 ​​and / or the previous node 364 that belong to a different data path from the subsequent node 348 in response to receiving the working status of the subsequent node 348.

[0082] In one example, the data path for processing host IO commands has a higher priority. Therefore, the coordination node 370 provides a current limiting notification to the previous node 360 ​​and / or node 364 of the data path for processing garbage collection IO commands according to the working state of the subsequent node 348 from the data path for processing host IO commands, but does not provide a current limiting notification to the previous node 340 and / or node 344 of the data path for processing host IO commands according to the working state of the subsequent node 368 from the data path for processing garbage collection IO commands.

[0083] By providing current limiting notifications and limiting the speed at which nodes process IO commands, the coordination node 370 also controls the bandwidth provided to host IO commands and the bandwidth provided to garbage collection IO commands. For example, the bandwidth provided to host IO commands and the bandwidth provided to garbage collection IO commands meet a specified ratio, or the bandwidth provided to garbage collection IO commands does not exceed a specified value.

[0084] Optionally or further, one, multiple or all nodes of the task processing system provide their own working status to the coordination node, and the coordination node provides a current limiting notification to one, multiple or all nodes of the task processing system in response to receiving the working status of the node.

[0085] As an example, the current limiting notification indicates, for example, turning on current limiting or canceling current limiting. As another example, the current limiting notification indicates the degree of current limiting by a numerical value. The current limiting notification can be, for example, variable, and the coordination node 370 determines the numerical value indicated by the limiting notification provided to one, multiple or all nodes.

[0086] Optionally or further, the current limiting notification includes multiple parameters for instructing the node to control different aspects of the IO command processing process. For example, the limiting notification includes two parameters, indicating the time interval for obtaining IO commands from the inbound queue and the delay time interval for adding IO commands to the outbound queue.

[0087] In addition to being applied to storage devices, the embodiments of the present application are also applicable to task scheduling in other electronic devices such as computers, servers, and network devices.

[0088] An embodiment of the present application also provides a program including program code. When the program is loaded into an electronic device and executed on the electronic device, the program code enables the electronic device to execute the method described above.

[0089] It should be understood that each block of the block diagram and the flow chart and the combination of blocks of the block diagram and the flow chart can be implemented by various devices including program instructions, respectively. These program instructions can be loaded onto a general-purpose computer, a special-purpose computer or other programmable data control device to produce a machine, so that the instructions executed on the computer or other programmable data control device create a device for implementing the functions specified in one or more flow chart blocks.

[0090] Thus, the blocks of the block diagrams and flow charts support a combination of means for performing a specified function, a combination of operations for performing a specified function, and a combination of program instruction means for performing a specified function. It should also be understood that each block of the block diagrams and flow charts and the combination of blocks of the block diagrams and flow charts can be implemented by a hardware-based special-purpose computer system that performs the specified function or operation, or by a combination of special-purpose hardware and computer instructions.

[0091] At least a portion of the above-mentioned different blocks, operations, and techniques may be performed by using hardware, a control device executing firmware instructions, a control device executing software instructions, or any combination thereof. When a control device executing firmware and software instructions is used, the software or firmware instructions may be stored in any computer-readable storage medium, such as a disk, an optical disk, or other storage medium, in RAM or ROM or Flash memory, a control device, a hard disk, an optical disk, a disk, etc. Similarly, the software and firmware instructions may be transmitted to a user or a system by any known or desired transmission method. The software or firmware instructions may include machine-readable instructions that, when executed by a control device, cause the control device to perform different actions.

[0092] When implemented in hardware, the hardware may include one or more discrete components, an integrated circuit, an application specific integrated circuit (ASIC), and the like.

[0093] It should be understood that the present application can be implemented in pure software, pure hardware, firmware, and various combinations thereof. The hardware may be, for example, a control device, a dedicated integrated circuit, a large-scale integrated circuit, and the like.

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

[0095] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A task scheduling method, characterized in that: include: Identifying that the first node is in a busy state; wherein the first node identifies the busy state based on the fact that the first node performs a relatively time-consuming operation among multiple operations, or based on the fact that its subsequent node cannot receive a task, wherein the relatively time-consuming operation among the multiple operations is an operation of issuing an erase command to a non-volatile memory; The first node recognizes that it is in a busy working state, and sends a current limiting notification to a second node which is not adjacent to it; In response to receiving the current limiting notification, the second node slows down the processing speed of the task; The first node and the second node are not adjacent to each other on the data path, and the second node does not send tasks to the first node; the second node is a previous node of the first node; By coupling the first node to the coordinating node, the first node provides its own work busy status to the coordinating node; In response to obtaining the working busy status of one or more first nodes, the coordination node sends a current limiting notification to one, multiple or all second nodes.

2. The method according to claim 1, characterized in that in The second node slows down the processing of tasks by adding delays between processing tasks.

3. The method according to claim 1, characterized in that The second node slows down the processing speed of the tasks by increasing a delay in the interval between obtaining the tasks from the inbound queue and / or adding the tasks to the outbound queue.

4. The method according to claim 1, characterized in that: The second node slows down the processing of the task by adding the task to a staging table.

5. The method according to claim 1, characterized in that Also includes: The second node adds the task to the temporary storage table in response to the subsequent node being unable to receive the task.

6. The method according to claim 5, characterized in that The tasks in the temporary storage table have a timestamp, which indicates the time when the task is first processed by the task processing system; or The tasks in the temporary table are sorted by the time when they were first started to be processed by the task processing system.

7. The method according to claim 4, characterized in that Also includes: The second node takes out the task with the earliest time when the task processing system first starts processing it from the temporary storage table and processes the task.

8. The method according to claim 7, characterized in that Also includes: In response to the first node being in a busy working state, sending a current limiting notification to a third node, wherein the first node and the third node are not adjacent to each other on a data path; The third node is a predecessor node of the first node.

9. The method according to claim 8, characterized in that The second node is the frontmost node on the data path.

10. The method according to claim 7, characterized in that Also includes: The coordinating node sends a current limiting notification to a third node according to a busy state of the first node, wherein the third node and the first node belong to different data paths; The first node belongs to a data path for processing host IO commands, and the third node belongs to a data path for processing garbage collection IO commands, and the third node is a head node of the data path for processing garbage collection IO commands.

11. The method according to claim 1, characterized in that The coordination node is provided by a processor different from a processor providing the first node or the second node.

12. The method according to claim 11, characterized in that The first node is the final node of the data path.

13. The method according to claim 7, characterized in that The first node and the second node belong to different data paths.

14. The method according to claim 13, characterized in that Also includes: In response to identifying that the first node is in a busy working state, the coordinating node sends a current limiting notification to a third node, wherein the third node and the first node belong to the same data path.

15. The method according to claim 14, characterized in that in, The coordination node sends a flow limiting notification to the third node and sends a flow limiting notification to the second node, so that the bandwidth of the respective processing tasks on the first data path and the second data path have a specified ratio or ratio range; in The first node belongs to a first data path, and the second node belongs to a second data path.

16. The method according to claim 15, characterized in that in, The first node, the second node or the third node is a processor or a task processing unit.

17. A task scheduling device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Multi-hardware thread processor and business processing method thereof

    CN101661386A

  • Resource processing method and device

    CN106937380A