Method, device, electronic device and storage medium for processing memory read tasks

By introducing read-out status and priority linked list mechanisms in memory, dynamically adjusting the read-out status and task queue of the plane unit, the problem of low memory reading task scheduling efficiency in the prior art is solved, and more efficient task processing is achieved.

CN118656032BActive Publication Date: 2024-11-26ARTMEM TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411133024.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-26
Estimated Expiration
2044-08-19

AI Technical Summary

Technical Problem

Existing memory read task scheduling methods are less efficient when handling multiple read tasks because when one plane unit is busy, the NAND FLASH controller does not handle tasks of other plane units, resulting in an increase in waiting time.

Method used

By introducing read-preview status and priority linked list mechanisms in memory, the read-preview status and task queue of the plane units are dynamically adjusted, and the plan units with higher priority are given priority, reducing latency, and improving overall processing efficiency.

Benefits of technology

It effectively reduces the waiting time between plane units, improves the efficiency of memory processing reading tasks, and maintains the stability and efficient operation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656032B_ABST
    Figure CN118656032B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for processing memory read tasks, and relates to the field of data processing technology, wherein the processing method includes: obtaining read task information from a preset task pool; determining the corresponding plane unit according to the read task information; adding the read task information to the task queue corresponding to the plane unit according to the pre-reading state of the plane unit and a preset priority list, or controlling the plane unit to enter pre-reading and change the corresponding pre-reading state according to the read task information, and updating the priority list; continuously processing data for the plane unit with the highest priority according to the priority order of the priority list and updating the priority list until the plane unit corresponding to the read task information completes the data output based on the read task information. The present application can reduce the waiting time of the plane unit during processing and improve the efficiency of memory processing read tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for processing a memory read task. Background Art

[0002] In modern computer systems, memory access is an indispensable part of data processing and computing tasks. With the explosive growth of data volume and the complexity of computing tasks, the scheduling and execution of memory read tasks face unprecedented challenges. Traditional memory read task scheduling methods often use a simple queue mechanism, that is, processing tasks one by one in the order they arrive.

[0003] Most of the NAND FLASH (nano flash memory) controllers currently on the market support hardware automatic scheduling between different CEs (ChipEnable, chip enable), that is, when a CE is in a busy state, the NAND FLASH controller will take the tasks of other CEs that are ready from the task pool and execute them first. This scheduling belongs to the CE level scheduling and does not support hardware automatic scheduling at the PLANE (plane unit) level. At present, if multiple read tasks are processed, the tasks are only pushed into the NAND FLASH controller in chronological order. If the random read hits n pages (blocks) of the same PLANE continuously, when these n pages have not been processed, the NAND FLASH controller will not process the tasks of other PLANEs, that is, if one of the PLANEs enters a busy state, it needs to wait for the PLANE to complete the entire process of pre-reading and data output before processing the tasks of other PLANEs, which results in the low efficiency of the existing memory when processing read tasks. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method, device, electronic device and storage medium for processing a memory read task, which can reduce the waiting time of a plane unit during processing and improve the efficiency of processing a memory read task.

[0005] In a first aspect, the present application provides a method for processing a memory read task, comprising:

[0006] Get read task information from the preset task pool;

[0007] Determine a corresponding plane unit according to the read task information;

[0008] According to the pre-reading state of the plane unit and the preset priority chain list, the read task information is added to the task queue corresponding to the plane unit, or according to the read task information, the plane unit is controlled to enter pre-reading and change the corresponding pre-reading state, and the priority chain list is updated;

[0009] Continue to process data for the plane unit with the highest priority and update the priority list according to the priority order of the priority list until the plane unit corresponding to the read task information completes data output based on the read task information.

[0010] According to the processing method of the memory read task of the embodiment of the first aspect of the present application, there are at least the following beneficial effects: the system first obtains the read task information from the preset task pool, and according to the read task information, the system determines the corresponding plane unit, which is the basic unit responsible for data storage and reading in the memory. The system checks the pre-reading state of the target plane unit. If the plane unit is already in a busy state, the system will not immediately block and wait for the plane unit to complete the current operation. According to the pre-reading state of the plane unit and the preset priority list, the system decides whether to add the read task information to the task queue corresponding to the plane unit, or to control the plane unit to enter the pre-reading state. If the control plane unit enters the pre-reading, the system updates the pre-reading state of the plane unit, reduces the priority of the corresponding plane unit, and updates the priority list, so that the system processes the data output of other plane units in order of priority. After each data processing of a plane unit, the corresponding priority list is updated. When it is the turn of the plane unit corresponding to the read task information again, the plane unit is controlled to complete the data output based on the read task information. It staggers the pre-reading time of the plane unit corresponding to the read task information, and does not blindly wait for the plane unit in pre-reading. When the plane unit is pre-reading, it adjusts its priority and processes other plane units with higher priorities, reducing the waiting time between each plane unit. Through intelligent task scheduling and priority management, it maintains the stability of the overall operation and improves the efficiency of the memory in processing read tasks.

[0011] According to some embodiments of the first aspect of the present application, the adding of the read task information to a task queue corresponding to the plane unit according to the pre-reading state of the plane unit and a preset priority linked list, or controlling the plane unit to enter pre-reading and changing the corresponding pre-reading state according to the read task information, includes:

[0012] When the pre-reading state of the plane unit is idle, controlling the plane unit to enter pre-reading according to the read task information, and changing the pre-reading state of the plane unit to busy;

[0013] When the pre-reading state of the plane unit is busy, the read task information is added to the task queue corresponding to the plane unit according to the preset priority list, or the data after the last pre-reading is completed is output and the plane unit is controlled to enter pre-reading again according to the new read task information.

[0014] According to some embodiments of the first aspect of the present application, the adding of the read task information to the task queue corresponding to the plane unit according to a preset priority linked list, or outputting the data after the last pre-reading is completed and controlling the plane unit to enter pre-reading again according to the new read task information, includes:

[0015] According to the priority linked list, when the priority of the plane unit corresponding to the read task information is not the highest, adding the read task information to the task queue corresponding to the plane unit, and keeping the pre-reading state as busy;

[0016] According to the priority linked list, when the priority of the plane unit corresponding to the read task information is the highest, the data after the last pre-reading is completed is output and the plane unit is controlled to enter pre-reading again according to the new read task information, and the pre-reading state is kept busy.

[0017] According to some embodiments of the first aspect of the present application, adding the read task information to a task queue corresponding to the plane unit includes:

[0018] When the total number of tasks in the task queue corresponding to the plane unit is less than a preset first threshold, adding the read task information to the task queue corresponding to the plane unit;

[0019] When the total number of tasks in the task queue corresponding to the plane unit is greater than or equal to the first threshold, the scheduling plane unit with the highest priority and whose task queue has task information to be processed is determined according to the priority linked list, and the read task information is added to the task queue information corresponding to the scheduling plane unit.

[0020] According to some embodiments of the first aspect of the present application, after the step of adding the read task information to the task queue information corresponding to the scheduling plane unit, the method further includes:

[0021] When the pre-reading state of the scheduling plane unit is idle, controlling the scheduling plane unit to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and changing the pre-reading state of the scheduling plane unit to busy;

[0022] When the pre-reading state of the scheduling plane unit is busy, the data after the last pre-reading is completed is output, and the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and the pre-reading state of the scheduling plane unit is kept busy.

[0023] According to some embodiments of the first aspect of the present application, the continuously performing data processing on the plane unit with the highest priority and updating the priority list according to the priority order of the priority list includes:

[0024] Determine the plane unit with the highest priority according to the priority order of the priority linked list;

[0025] If the chip enable corresponding to the plane unit with the highest priority at present is different from that of the plane unit processed last time, and the ready state of the plane unit with the highest priority at present is not sent, control the current plane unit to output data, and change the output state to sent;

[0026] If the chip enable corresponding to the plane unit with the highest priority currently is different from that of the plane unit processed last time, and the ready state of the plane unit with the highest priority currently is sent and the pre-read state is idle, the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the plane unit, and the pre-reading state of the plane unit is changed to busy.

[0027] According to some embodiments of the first aspect of the present application, the method for processing a memory read task provided by the present application further includes:

[0028] Creating a pre-reading state table and a ready state table; wherein the pre-reading state table and the ready state table are used to record the pre-reading state and the ready state of all plane units respectively;

[0029] The pre-reading state and the ready state corresponding to the plane unit are determined according to the pre-reading state table, the ready state table and the serial numbers corresponding to the plane units.

[0030] In a second aspect, the present application further provides a memory read task processing device, comprising:

[0031] The acquisition module is used to obtain read task information from the preset task pool;

[0032] A determination module, used to determine a corresponding plane unit according to the read task information;

[0033] A pre-reading processing module, used to add the read task information to the task queue corresponding to the plane unit according to the pre-reading state of the plane unit and a preset priority chain list, or control the plane unit to enter pre-reading and change the corresponding pre-reading state according to the read task information, and update the priority chain list;

[0034] The data reading module is used to continuously process data for the plane unit with the highest priority according to the priority order of the priority chain table and update the priority chain table until the plane unit corresponding to the read task information completes data output based on the read task information.

[0035] In a third aspect, the present application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for processing a memory read task as described in any one of the embodiments of the first aspect is implemented.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, and when the computer program is executed by a processor, the method for processing a memory read task as described in any one of the embodiments in the first aspect is implemented.

[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0039] Figure 1 A flowchart of a method for processing a memory read task provided by an embodiment of the present application;

[0040] Figure 2 for Figure 1 A flowchart of an embodiment of step S130 is shown in FIG.

[0041] Figure 3 for Figure 2 A flowchart of an embodiment of step S220 is shown in FIG.

[0042] Figure 4 for Figure 1 A flowchart of another embodiment of step S130 is shown in FIG.

[0043] Figure 5 for Figure 4 A flowchart of an embodiment after step S420 is shown in FIG.

[0044] Figure 6 for Figure 1 A flowchart of an embodiment of step S140 is shown in FIG.

[0045] Figure 7 A flowchart of a method for processing a memory read task provided in another embodiment of the present application. DETAILED DESCRIPTION

[0046] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0047] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0048] In the description of this application, if there is a description of first or second, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0049] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.

[0050] In modern computer systems, memory access is an indispensable part of data processing and computing tasks. With the explosive growth of data volume and the complexity of computing tasks, the scheduling and execution of memory read tasks face unprecedented challenges. Traditional memory read task scheduling methods often use a simple queue mechanism, that is, processing tasks one by one in the order they arrive.

[0051] Most of the NAND FLASH (nano flash memory) controllers currently on the market support hardware automatic scheduling between different CEs (ChipEnable, chip enable), that is, when a CE is in a busy state, the NAND FLASH controller will take the tasks of other CEs that are ready from the task pool and execute them first. This scheduling belongs to the CE level scheduling and does not support hardware automatic scheduling at the PLANE (plane unit) level. At present, if multiple read tasks are processed, the tasks are only pushed into the NAND FLASH controller in chronological order. If the random read hits n pages (blocks) of the same PLANE continuously, when these n pages have not been processed, the NAND FLASH controller will not process the tasks of other PLANEs, that is, if one of the PLANEs enters a busy state, it needs to wait for the PLANE to complete the entire process of pre-reading and data output before processing the tasks of other PLANEs, which results in the low efficiency of the existing memory when processing read tasks.

[0052] Among them, there can be multiple CEs (chip enables) in a flash memory package, a CE can contain multiple LUNs (logical unit numbers), a LUN contains multiple PLANEs (plane units), a PLANE contains multiple blocks, a block contains multiple pages, a page contains multiple wordlines, and a wordline contains multiple cells (storage units). Cell is the smallest storage unit of NAND FLASH. A complete read operation consists of pre-read and data out. After the pre-read command is sent, NAND FLASH will enter the busy state. You must wait for NANDFLASH to return to the ready state before sending the data out command for data transmission. Single read can only operate one page at a time; traditional functions to improve read performance include multi-plane read, which can simultaneously operate the same page on different PLANEs in the same LUN. If a LUN contains x PLANEs, multi-plane read can save up to (x-1) waiting response time compared to single read. However, in random read scenarios, the probability of continuously hitting the same page in different planes is very low, so multi-plane read does not have much performance improvement compared to single read in random read scenarios.

[0053] Based on this, the present application provides a method, device, electronic device and storage medium for processing a memory read task to solve the technical problems raised above. The technical solutions provided by the present application are described in detail one by one below.

[0054] First, refer to Figure 1 , the present application provides a method for processing a memory read task, comprising:

[0055] Step S110: Obtaining read task information from a preset task pool;

[0056] Step S120: determining the corresponding plane unit according to the read task information;

[0057] Step S130: according to the pre-reading state of the plane unit and the preset priority list, the read task information is added to the task queue corresponding to the plane unit, or the plane unit is controlled to enter pre-reading and change the corresponding pre-reading state according to the read task information, and the priority list is updated;

[0058] Step S140: Continue to process data for the plane unit with the highest priority according to the priority order of the priority chain table and update the priority chain table until the plane unit corresponding to the read task information completes data output based on the read task information.

[0059] In step S110 to step S140, the system first obtains the read task information from the preset task pool. According to the read task information, the system determines the corresponding plane unit, which is the basic unit in the memory responsible for data storage and reading. The system checks the pre-reading state of the target plane unit. If the plane unit is already in a busy state, the system will not immediately block and wait for the plane unit to complete the current operation. According to the pre-reading state of the plane unit and the preset priority list, the system decides whether to add the read task information to the task queue corresponding to the plane unit or control the plane unit to enter the pre-reading state. If the control plane unit enters the pre-reading, the system updates the pre-reading state of the plane unit, reduces the priority of the corresponding plane unit, and updates the priority list, so that the system processes the data output of other plane units in order of priority. After each data processing of a plane unit, the corresponding priority list is updated. When it is the turn of the plane unit corresponding to the read task information again, the plane unit is controlled to complete the data output based on the read task information. It staggers the pre-reading time of the plane unit corresponding to the read task information, and does not blindly wait for the plane unit in pre-reading. When the plane unit is pre-reading, it adjusts its priority and processes other plane units with higher priorities, reducing the waiting time between each plane unit. Through intelligent task scheduling and priority management, it maintains the stability of the overall operation and improves the efficiency of the memory in processing read tasks.

[0060] It should be noted that the update priority list mentioned in step S130 and step S140 can be specifically: after the control plane unit enters the pre-reading state, the priority of the plane unit is adjusted to the lowest, and the plane units with lower priorities than the plane unit are all raised by one level. For example, the memory includes PLANE0, PLANE1, PLANE2, PLANE3 and PLANE4, and the priority order of the corresponding plane units in the priority list is PLANE0, PLANE1, PLANE2, PLANE3 and PLANE4 from high to low. When the control plane unit PLANE1 enters the pre-reading, its pre-reading state is changed to busy, and the priority of PLANE1 is adjusted to the lowest, and the priorities of PLANE2, PLANE3 and PLANE4 are raised by one level, that is, the priority order of the plane units in the updated priority list is PLANE0, PLANE2, PLANE3, PLANE4 and PLANE1 from high to low. This priority list adjustment method can adjust the priority of the plane unit that has just entered pre-reading to the lowest level, so that the system gives priority to data processing on other plane units, reducing the waiting time between each plane unit. Through intelligent task scheduling and priority management, the overall operation stability is maintained and the efficiency of memory processing read tasks is improved.

[0061] Reference Figure 2 It is understandable that step S130 may include but is not limited to the following steps:

[0062] Step S210: when the pre-reading state of the plane unit is idle, the plane unit is controlled to enter pre-reading according to the read task information, and the pre-reading state of the plane unit is changed to busy;

[0063] Step S220: When the pre-reading state of the plane unit is busy, the read task information is added to the task queue corresponding to the plane unit according to the preset priority list, or the data after the last pre-reading is completed is output and the plane unit is controlled to enter pre-reading again according to the new read task information.

[0064] In step S210 to step S220, when the pre-reading state of the plane unit is idle, pre-reading is immediately started according to the read task information, thereby avoiding idle resources and improving the use efficiency of the plane unit. The pre-reading state is changed to busy in the control plane, and then the priority list is updated, so that the system gives priority to data processing for other plane units, and does not blindly wait for the plane unit in pre-reading, thereby reducing the waiting time between each plane unit. In addition, if the pre-reading state of the plane unit is busy, it is determined whether the task being processed can be outputted according to the preset priority list, so as to decide whether to add the read task information to the task queue corresponding to the plane unit, or to output the data after the last pre-reading is completed and control the plane unit to enter pre-reading again according to the new read task information.

[0065] Reference Figure 3 It is understandable that step S220 may include but is not limited to the following steps:

[0066] Step S310: according to the priority linked list, when the priority of the plane unit corresponding to the read task information is not the highest, the read task information is added to the task queue corresponding to the plane unit, and the pre-reading state is kept busy;

[0067] Step S320: According to the priority linked list, when the priority of the plane unit corresponding to the read task information is the highest, the data after the last pre-reading is completed is output and the plane unit is controlled to enter pre-reading again according to the new read task information, and the pre-reading state is kept busy.

[0068] In step S310 to step S320, when the priority of the plane unit corresponding to the read task information is not the highest, that is, the task currently processed by the plane unit cannot be completed at present, the read task information is added to the task queue of the corresponding plane unit, so that the plane unit can immediately process the read task information obtained from the task pool after processing the current task. In addition, if the priority of the plane unit corresponding to the read task information is the highest, the data after the last pre-reading is completed is output and the plane unit is controlled to enter the pre-reading again according to the new read task information. The use of the priority linked list and the task queue makes the behavior of the system more predictable, avoiding resource contention and performance degradation caused by processing multiple high-load tasks at the same time.

[0069] Reference Figure 4 It can be understood that the step of adding the read task information to the task queue corresponding to the plane unit in step S130 may include but is not limited to the following steps:

[0070] Step S410: when the total number of tasks in the task queue corresponding to the plane unit is less than a preset first threshold, adding the read task information to the task queue corresponding to the plane unit;

[0071] Step S420: When the total number of tasks in the task queue corresponding to the plane unit is greater than or equal to the first threshold, determine the scheduling plane unit with the highest priority and whose task queue has pending task information according to the priority linked list, and add the read task information to the task queue information corresponding to the scheduling plane unit.

[0072] In step S420, when the total number of tasks in the task queue corresponding to the plane unit is greater than or equal to the first threshold, it means that the current plane unit is currently under a high load, and it is necessary to select other plane units with the highest priority as scheduling plane units to share resource utilization. The scheduling plane unit with pending task information in the task queue is selected to avoid unnecessary waiting and conflicts. If the task queue of a PLANE is empty, that is, the PLANE currently has no tasks being processed or waiting to be processed, then scheduling a new task to the PLANE may result in a waste of resources, because the system needs to wait for the PLANE to enter the ready state before starting to execute the task. If there are already tasks to be taken in the task queue of a PLANE, then the new task can be processed together with these tasks, thereby improving the parallel processing capability and efficiency of the system.

[0073] Reference Figure 5 It is understandable that after step S420, the following steps are also included but not limited to:

[0074] Step S510: when the pre-reading state of the scheduling plane unit is idle, the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and the pre-reading state of the scheduling plane unit is changed to busy;

[0075] Step S520: when the pre-reading state of the scheduling plane unit is busy, the data after the last pre-reading is completed is output, and the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and the pre-reading state of the scheduling plane unit is kept busy.

[0076] In step S510 to step S520, when the pre-reading state of the scheduling plane unit is idle, it can immediately take out the task from the task queue and start pre-reading, which reduces the idle time of resources and improves the continuity and efficiency of task processing. Even if the scheduling plane unit is currently busy, it can immediately get the next task from the task queue and continue pre-reading after completing the current pre-reading task, thereby maintaining the continuity of data reading. Through the management of the task queue and the reasonable scheduling of the plane unit, when the scheduling plane unit is busy, it will not idle and wait for new tasks, but continue to take out tasks from the task queue and execute them, thereby maximizing the efficiency of resource use. Through the dynamic management of the task queue and the pre-reading state, the system can flexibly adjust the order and priority of task execution as needed, which helps the system remain efficient and stable when facing different workloads and data access patterns.

[0077] Reference Figure 6 It is understandable that, in step S140, the following steps may also be included but not limited to:

[0078] Step S610: Determine the plane unit with the highest priority according to the priority order of the priority linked list;

[0079] Step S620: If the chip enable corresponding to the plane unit with the highest priority is different from that of the plane unit processed last time, and the ready state of the plane unit with the highest priority is not sent, control the current plane unit to output data, and change the output state to sent;

[0080] Step S630: If the chip enable corresponding to the plane unit with the highest priority currently is different from that of the plane unit processed last time, and the ready state of the plane unit with the highest priority currently is sent and the pre-read state is idle, the plane unit is scheduled to enter pre-reading according to the task queue control corresponding to the plane unit, and the pre-reading state of the plane unit is changed to busy.

[0081] In step S610 to step S630, different CEs (chip enables) may be connected to different physical chips or different internal channels. If two operations involve different CEs, they may be executed in parallel, thereby improving overall performance. By determining whether the PLANE of the current operation has switched CEs, the system can decide whether the operations can be processed in parallel or whether the order of operations needs to be adjusted to optimize performance. Depending on the switching of CEs, the system may adjust the resource allocation strategy. For example, if the system finds that a certain CE is lightly loaded, it may assign more tasks to the CE to balance the load. In addition, according to the ready state, for the PLANE that is ready but not sent, send the data output command of the previous page and process the next task in the task queue of the PLANE.

[0082] Reference Figure 7 It is understandable that the processing method of the memory read task provided by the present application also includes but is not limited to the following steps:

[0083] Step S710: creating a pre-reading status table and a ready status table; wherein the pre-reading status table and the ready status table are used to record the pre-reading status and the ready status of all plane units respectively.

[0084] Step S720: Determine the pre-reading state and the ready state corresponding to the plane unit according to the pre-reading state table, the ready state table and the numbers corresponding to the plane units.

[0085] In step S710 to step S720, a pre-reading status table bitmapA and a ready status table bitmapB are created. Taking the pre-reading status table bitmapA as an example, the data recorded in bitmapA is 01100, which means that the pre-reading status of PLANE0, PLANE3 and PLANE4 is idle, and the pre-reading status of PLANE1 and PLANE2 is busy.

[0086] The following is an introduction to the overall execution process of this application:

[0087] This solution implements a method to maximize the advantages of AIPR function in NAND FLASH controller that supports CE-level scheduling. Assuming that there are M CEs and each CE has N PLANEs, this solution will divide the NAND FLASH resources into (M×N) AIPR task queues. The software will number all PLANE resources from 0 to (M×N-1). And all PLANEs will be prioritized, and the priority will be managed using a linked list data structure. PLANE0 has the highest initial priority, and then decreases in sequence. When a PLANE has sent a pre-read command, its priority will be reduced to the lowest, and the priorities of other PLANEs with lower priorities than this PLANE will be increased by one level, and the priorities of other PLANEs with higher priorities than this PLANE will remain unchanged.

[0088] BitmapA is set to record whether each PLANE has sent a pre-read command and is in a busy state, and bitmapB is set to record whether each PLANE has sent a read plane status command. Each PLANE occupies 1 bit. A complete read operation consists of two sets of commands: pre-read and data out. In this solution, there is a task pool, and the task items in the task pool are issued by the upper-layer application. The following software processing takes the continuous acquisition of multiple AIPR read tasks from the task pool as an example. When the software gets a read task, the processing flow is as follows:

[0089] ① Check the bit value of PLANE (denoted as PLANE X) in bitmapA. If the value is 0, continue; if the value is 1, jump to ④.

[0090] ② Directly send the pre-read command for the page.

[0091] ③Set the bit to 1, indicating that the PLANE has sent a pre-read command and is in busy state, then jump to ⑦.

[0092] ④ Determine whether the real-time priority of PLANE X is the highest. If not, continue; if it is the highest, send the data out of the previous page of PLANE X, and then send the pre-read of the current page, keep the bit value of PLANE X in bitmapA as 1, and then jump to ⑦.

[0093] ⑤Put the read task into the AIPR task queue of PLANE X.

[0094] ⑥ Does the total number of pending read tasks in all AIPR task queues reach the threshold? If not, continue; if it has reached the threshold, find the highest priority in the current real-time priority and the PLANE (denoted as PLANE Y) with pending tasks in the AIPR task queue, and determine whether the bit value corresponding to PLANE Y in bitmapA is 1? If it is 1, data out the previous page, and then take a page from the read task cache queue to send a pre-read; if it is 0, directly take a page from the AIPR task queue to send a pre-read. The corresponding bit value of PLANE Y in bitmapA remains 1, and then continue.

[0095] ⑦ Determine whether the current operation's PLANE has switched CE compared to the last operation's PLANE. If not, jump to ⑨; if it has, continue.

[0096] ⑧ Traverse each PLANE in order according to the real-time priority linked list. Determine whether the PLANE has sent the read plane status command according to bitmapB. If not, send the read plane status command of the PLANE and set the corresponding bit value to 1, and then continue to traverse the subsequent PLANEs until the end; if it has been sent, determine whether the current PLANE is ready according to the status return value of NAND? If the status is ready, send the previous data out of the PLANE, and process the next task in the AIPR task queue of the PLANE, and then continue to traverse the subsequent PLANEs until the end; if the status is busy, send the read plane status command of the PLANE again, and then continue to traverse the subsequent PLANEs until the end.

[0097] ⑨After the current read task is processed, the software continues to take the next read task from the task pool.

[0098] In this scheme, when PLANE X in the current CE is in the busy state, this scheme will give priority to processing the read tasks of other PLANEs in the ready state, rather than pushing the tasks into the NAND FLASH controller in chronological order. If the next two operations are PLANE X and PLANE Y, the next read task of PLANE X will be pushed in chronological order, and the pre-read of the same PLANE must wait for the data out of the previous page before it can be sent. However, this scheme will first put the next read task of PLANE X into the AIPR task queue of PLANE X, and give priority to sending the pre-read of PLANEY, so that the response waiting time of PLANE X and PLANE Y overlaps as much as possible.

[0099] In a second aspect, the present application further provides a memory read task processing device, comprising:

[0100] The acquisition module is used to obtain read task information from the preset task pool;

[0101] A determination module, used to determine a corresponding plane unit according to the read task information;

[0102] A pre-reading processing module, used to add the read task information to the task queue corresponding to the plane unit according to the pre-reading state of the plane unit and a preset priority chain list, or control the plane unit to enter pre-reading and change the corresponding pre-reading state according to the read task information, and update the priority chain list;

[0103] The data reading module is used to continuously process data for the plane unit with the highest priority according to the priority order of the priority chain table and update the priority chain table until the plane unit corresponding to the read task information completes data output based on the read task information.

[0104] In a third aspect, the present application also provides an electronic device, comprising: at least one memory, at least one processor and at least one program, the program is stored in the memory, and the processor executes one or more programs to implement the processing method of the above-mentioned memory reading task.

[0105] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and signals, such as program instructions / signals corresponding to the processing module in the embodiment of the present application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions and signals stored in the memory, that is, the processing method of the memory read task in the above method embodiment is realized.

[0106] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store relevant data of the processing method of the above-mentioned memory read task, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processing module via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0107] One or more signals are stored in a memory, and when executed by one or more processors, the processing method for the memory read task in any of the above method embodiments is executed.

[0108] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is executed by one or more processors, enabling the one or more processors to execute the processing method of the memory read task in the above method embodiment.

[0109] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0110] Through the description of the above embodiments, it can be understood by those skilled in the art that all or some steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable signals, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally embodies computer readable signals, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0111] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0112] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0113] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0116] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present application.

Claims

1. A method for processing a memory read task, It is characterized in that include: Get read task information from the preset task pool; Determine a corresponding plane unit according to the read task information; According to the pre-reading state of the plane unit and the preset priority chain list, the read task information is added to the task queue corresponding to the plane unit, or according to the read task information, the plane unit is controlled to enter pre-reading and change the corresponding pre-reading state, and the priority chain list is updated; Continuously performing data processing on the plane unit with the highest priority and updating the priority chain list according to the priority order of the priority chain list until the plane unit corresponding to the read task information completes data output based on the read task information; The adding of the read task information to the task queue corresponding to the plane unit includes: When the total number of tasks in the task queue corresponding to the plane unit is less than a preset first threshold, adding the read task information to the task queue corresponding to the plane unit; When the total number of tasks in the task queue corresponding to the plane unit is greater than or equal to the first threshold, determine, according to the priority linked list, a scheduling plane unit with the highest priority and whose task queue has pending task information, and add the read task information to the task queue information corresponding to the scheduling plane unit; Wherein, after the step of adding the read task information to the task queue information corresponding to the scheduling plane unit, the method further includes: When the pre-reading state of the scheduling plane unit is idle, controlling the scheduling plane unit to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and changing the pre-reading state of the scheduling plane unit to busy; When the pre-reading state of the scheduling plane unit is busy, the data after the last pre-reading is completed is output, and the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and the pre-reading state of the scheduling plane unit is kept busy.

2. The method for processing a memory read task according to claim 1, It is characterized in that The adding of the read task information to a task queue corresponding to the plane unit according to the pre-reading state of the plane unit and a preset priority linked list, or controlling the plane unit to enter pre-reading and changing the corresponding pre-reading state according to the read task information, comprises: When the pre-reading state of the plane unit is idle, controlling the plane unit to enter pre-reading according to the read task information, and changing the pre-reading state of the plane unit to busy; When the pre-reading state of the plane unit is busy, the read task information is added to the task queue corresponding to the plane unit according to the preset priority list, or the data after the last pre-reading is completed is output and the plane unit is controlled to enter pre-reading again according to the new read task information.

3. The method for processing a memory read task according to claim 2, It is characterized in that The step of adding the read task information to the task queue corresponding to the plane unit according to the preset priority linked list, or outputting the data after the last pre-reading is completed and controlling the plane unit to enter pre-reading again according to the new read task information, comprises: According to the priority linked list, when the priority of the plane unit corresponding to the read task information is not the highest, adding the read task information to the task queue corresponding to the plane unit, and keeping the pre-reading state as busy; According to the priority linked list, when the priority of the plane unit corresponding to the read task information is the highest, the data after the last pre-reading is completed is output and the plane unit is controlled to enter pre-reading again according to the new read task information, and the pre-reading state is kept busy.

4. The method for processing a memory read task according to claim 1, It is characterized in that The continuously performing data processing on the plane unit with the highest priority and updating the priority list according to the priority order of the priority list includes: Determine the plane unit with the highest priority according to the priority order of the priority linked list; If the chip enable corresponding to the plane unit with the highest priority at present is different from that of the plane unit processed last time, and the ready state of the plane unit with the highest priority at present is not sent, control the current plane unit to output data, and change the output state to sent; If the chip enable corresponding to the plane unit with the highest priority currently is different from that of the plane unit processed last time, and the ready state of the plane unit with the highest priority currently is sent and the pre-read state is idle, the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the plane unit, and the pre-reading state of the plane unit is changed to busy.

5. The method for processing a memory read task according to claim 1, It is characterized in that Also includes: Creating a pre-reading state table and a ready state table; wherein the pre-reading state table and the ready state table are used to record the pre-reading state and the ready state of all plane units respectively; The pre-reading state and the ready state corresponding to the plane unit are determined according to the pre-reading state table, the ready state table and the serial numbers corresponding to the plane units.

6. A memory read task processing device, It is characterized in that include: The acquisition module is used to obtain read task information from the preset task pool; A determination module, used to determine a corresponding plane unit according to the read task information; A pre-reading processing module, used to add the read task information to the task queue corresponding to the plane unit according to the pre-reading state of the plane unit and a preset priority chain list, or control the plane unit to enter pre-reading and change the corresponding pre-reading state according to the read task information, and update the priority chain list; A data reading module, used for continuously processing data for the plane unit with the highest priority according to the priority order of the priority chain table and updating the priority chain table until the plane unit corresponding to the read task information completes data output based on the read task information; The adding of the read task information to the task queue corresponding to the plane unit includes: When the total number of tasks in the task queue corresponding to the plane unit is less than a preset first threshold, adding the read task information to the task queue corresponding to the plane unit; When the total number of tasks in the task queue corresponding to the plane unit is greater than or equal to the first threshold, determine, according to the priority linked list, a scheduling plane unit with the highest priority and whose task queue has pending task information, and add the read task information to the task queue information corresponding to the scheduling plane unit; Wherein, after the step of adding the read task information to the task queue information corresponding to the scheduling plane unit, the method further includes: When the pre-reading state of the scheduling plane unit is idle, controlling the scheduling plane unit to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and changing the pre-reading state of the scheduling plane unit to busy; When the pre-reading state of the scheduling plane unit is busy, the data after the last pre-reading is completed is output, and the scheduling plane unit is controlled to enter pre-reading according to the task queue corresponding to the scheduling plane unit, and the pre-reading state of the scheduling plane unit is kept busy.

7. An electronic device, It is characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method for processing a memory read task as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method for processing a memory read task according to any one of claims 1 to 5 is implemented.