CN117420952A - AIPR command realization data structure and method based on software LUN management - Google Patents
AIPR command realization data structure and method based on software LUN management Download PDFInfo
- Publication number
- CN117420952A CN117420952A CN202311277115.0A CN202311277115A CN117420952A CN 117420952 A CN117420952 A CN 117420952A CN 202311277115 A CN202311277115 A CN 202311277115A CN 117420952 A CN117420952 A CN 117420952A
- Authority
- CN
- China
- Prior art keywords
- lun
- command
- aipr
- plane
- pln
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 21
- 230000009191 jumping Effects 0.000 claims description 18
- 230000008569 process Effects 0.000 claims description 16
- 239000002245 particle Substances 0.000 abstract description 5
- 239000007787 solid Substances 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 6
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 201000005973 campomelic dysplasia Diseases 0.000 description 2
- 201000006815 congenital muscular dystrophy Diseases 0.000 description 2
- 208000019484 coronary microvascular disease Diseases 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000008187 granular material Substances 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method for realizing Nand Flash asynchronous multi-Plane independent read (AIPR) command based on software management LUN scheme framework, which comprises the steps of performing multiple expansion on the number of LUN control blocks in each Channel context management block in the LUN management framework according to the number of planes of each LUN of Nand Flash particles, and changing the meaning of the number of the LUN control blocks into the number of planes control blocks; and adding an attribute member Plane state bitmap of an array type and a LUN AIPR mode mark into a Channel context management block data structure, and sequentially judging and processing an AIPR as a new reading command so as to solve the problem that the efficiency is affected by more using limiting conditions when the hardware Nand Flash controller does not support the AIPR function or supports the characteristic. The method can increase the concurrency of a Single Plane read command of a solid State Storage Device (SSD) (aiming at Nand Flash with an AIPR function), and thus improve the IOPS performance of a 4K random read command.
Description
Technical Field
The invention relates to the technical field of chips, in particular to an AIPR command realization data structure and method based on software LUN management.
Background
Nand Flash is a common nonvolatile memory device, has the advantages of high access speed, high storage density, low cost per unit capacity and the like, is widely used in solid State Storage Devices (SSDs), and is an important index reflecting the real-time response capability of SSDs along with the iterative updating of technology, the SSD users put higher and higher requirements on the read-write performance of SSDs, in particular to 4K random read rate. In order to improve the index, some Flash manufacturers push out Nand Flash grains supporting asynchronous multi-Plane independent read (AIPR) characteristics, so that a (Single Plane) read command is further subdivided by an original minimum parallel unit LUN, the effect that each Plane in the LUN executes different commands simultaneously is achieved, and the effect that other planes execute after one Plane command is completed is not needed, so that the command concurrency is greatly improved. But the existing Nand Flash controller hardware module does not necessarily support this new feature well.
Disclosure of Invention
The invention aims to provide a scheme for managing LUNs and planes based on software to solve the defects of controller hardware and realize the support of AIPR characteristics.
The invention aims to achieve the aim, and the aim is achieved by the following technical scheme:
the AIPR command based on software LUN management realizes a data structure, the number of LUN control blocks in each Channel context management block in the LUN management frame is subjected to multiple expansion according to the number of planes of each LUN of NandFlash particles, and the meaning of the control blocks is changed into Plane control blocks; adding a Plane state bitmap and a LUN AIPR mode mark of an attribute member of an array type into a Channel context management block data structure, wherein each LUN under the Channel corresponds to one Plane state bitmap and one LUN AIPR mode mark respectively; the Plane status bitmap reflects whether each Plane under the LUN has a command to execute, the LUN AIPR reflects whether the LUN is currently in an AIPR mode, the LUN only allows each Plane to independently execute the command under the AIPR mode, otherwise, only one Plane can execute the command.
The LUN management framework comprises LUN control blocks and Channel context management blocks, wherein the LUN control blocks are used for managing commands and states of each LUN, the Channel context management blocks are used for managing each Channel of the Nand Flash controller, and the LUN control blocks in different states are sequentially mounted in a state queue of the Channel context management blocks as nodes.
The LUN control block includes: numbering of the LUN, current state, read, write and erase command list waiting to be executed under the LUN, and corresponding command quantity attribute members; the state queue of the Channel context management block comprises: a command to execute LUN queue, a busy waiting queue, a read ready queue.
The invention also provides an AIPR command implementation method based on software LUN management, which is based on the data structure and comprises the following steps:
after the back end receives and analyzes the command message sent by the FTL, the Channel context management block and the Plane control block which are corresponding to the number of the LUN [ n ] PLN [ m ] are found according to the Nand Flash physical address in the message, the new command context is mounted in a read or write erase list waiting to be executed under the LUN of the Plane control block LUN [ n ] PLN [ m ] according to the specific command type, the judgment command on the Plane is executed, and the next command waiting to be executed of the LUN where the judgment command is located is taken to be processed.
Further, the new command message processing flow specifically includes:
(1) Judging whether the new command is the first command on LUN [ n ] PLN [ m ], if so, continuing the next judgment, and if not, jumping to the step 6;
(2) Checking whether PLN [ m ] is in an idle state before in a Plane state bitmap of LUN [ n ] in a Channel context management block, if so, continuing the next judgment, and if not, jumping to the step 6;
(3) Checking whether all planes of the LUN [ n ] are idle, if yes, jumping to the step 5, otherwise continuing the next judgment;
(4) Checking whether the LUN [ n ] in the Channel context management block is in an AIPR mode or not and whether the new command is of a command type supporting AIPR operation or not, if both conditions are true, performing the next operation, otherwise, jumping to the step 6;
(5) Updating a Plane state bitmap of the LUN [ n ], setting a Bit position corresponding to the PLN [ m ] to be non-idle, setting an AIPR mode mark of the LUN [ n ] according to whether a new command is a command type supporting AIPR operation, and mounting the Plane control block LUN [ n ] PLN [ m ] to a corresponding command waiting execution queue of a Channel context management block;
(6) And ending the new command message processing flow, and processing other business logic by the firmware program.
Further, the processing flow of the next step of the LUN to be executed command is specifically:
(1) The firmware program obtains the completion of the current command on the LUN [ n ] PLN [ m ] from the state information returned by the hardware of the Nand Flash controller, and the Bit position corresponding to the Plane state bitmap PLN [ m ] of the LUN [ n ] is idle;
(2) Checking whether all planes of the LUN [ n ] are idle, if yes, jumping to the step 4, otherwise continuing the next judgment;
(3) Checking whether a command supporting AIPR operation is still available on PLN [ m ] which just completes the command currently, wherein the PLN [ m ] does not traverse other idle planes of the LUN [ n ] any more, if any one Plane meeting the condition is found, the search is stopped if the PLN [ i ] is assumed, the Plane control block is mounted on a command queue to be executed of a Channel context management block, the corresponding Bit of the PLN [ i ] in a Plane state bitmap of the LUN [ n ] is set to be non-idle, if all idle planes of the LUN [ n ] do not currently have new AIPR commands to be done, the processing is not performed, and then the step 6 is skipped;
(4) Initializing a LUN [ n ] into a non-AIPR mode by default, traversing each Plane of the LUN [ n ] from the next Plane of the PLN [ m ], sequentially checking whether a command to be executed exists on a read or write wiping list to be executed of each PLN [ i ] from the PLN [0] if the PLN [ m ] is the last Plane of the LUN, and jumping to the 6 th step if no Plane of the command to be executed is found after the traversing cycle is finished; if a non-AIPR command is found on the PLN [ i ] in the searching process, the PLN [ i ] is mounted on a command queue to be executed corresponding to a Channel context management block, the Bit corresponding to the PLN [ i ] in the LUN [ n ] Plane state bitmap is set to be non-idle, traversal is stopped, and then the step 6 is skipped; if the AIPR type command to be executed is found to exist on PLN [ i ] in the traversal process, the following steps are continued.
(5) Marking the LUN [ n ] as an AIPR mode, mounting PLN [ i ] (control block) on a Channel context management block execution queue, setting the corresponding Bit of the PLN [ i ] in a LUN [ n ] Plane state bitmap to be non-idle, pointing to the next Plane of the LUN [ n ], repeating the steps until all planes of the LUN [ n ] are checked for one time, and continuing the next step;
(6) Judging whether at least one Plane will work next or not according to the updated Plane state bitmap of the LUN [ n ], if yes, when the firmware runs to the Plane management queue program section of each Channel, processing the corresponding command on each non-idle Plane of the LUN [ n ]; otherwise, LUN [ n ] enters an idle state;
(7) The process of selecting the LUN next to execute the command ends.
In addition, for an AIPR type command, an instruction sequence for separately checking a Plane state is transmitted to the Nand Flash controller when checking whether the CMD phase of the command is completed.
The invention has the advantages that: when the Nand Flash controller hardware module used by the SSD does not support the AIPR function or is imperfect in support, the software management Plane scheme can solve the problem. And the LUN and the Plane are managed in a software mode, and commands sent to Nand Flash particles are split into different sub-phases, so that the Time sequence parameters such as Busy waiting Time (Busy Time), state Polling Time (Polling Time) and the like of the commands can be flexibly and conveniently adjusted.
In the implementation of managing the Plane according to the LUN mode, most of the data structure and the processing process based on the software LUN management framework are not required to be modified, only partial data members and function methods are required to be added in the existing data structure, and the meaning of certain variables is changed (for example, the original control block for the LUN is changed into the control block for the Plane), so that the code multiplexing degree is higher, and compared with the management program structure according to the LUN mode, the change of the structure is small, and the maintenance is relatively convenient. After the AIPR function is realized by adopting a software management Plane mode, the 4K random reading performance of the SSD mainly depends on the calculation power of a CPU, and is less influenced by hardware such as a Nand Flash controller. The 4K random reading performance can be obviously improved by means of improving the execution efficiency of the firmware and the like, and the optimization cost is lower.
Drawings
Fig. 1 is a schematic diagram of a data structure of a software LUN state management framework based on the method.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The embodiment discloses an AIPR command realization data structure and method based on software LUN management, and based on software LUN management framework realization, the basic idea of software LUN management is to split commands such as read-write erase and the like sent to Nand Flash on a LUN into a plurality of sub-processes of commands, waiting, state inquiry, data transmission and the like in a software mode, so as to solve the problems that when the read-write erase flow is used as a whole command to be distributed to Nand Flash controller hardware, the LUN parallelism is insufficient or support is imperfect for certain characteristics (such as AIPR) due to the function limitation of the controller hardware.
Under this framework, please refer to fig. 1, the command and status of each LUN are managed by a LUN control block data structure (lun_ctrl) stored in the memory by the program, where the data structure includes the LUN number (nlun) and the current state (state), the read/write erase/data transfer command list waiting to be executed under the LUN (pr_cmds/pwe _cmds/p_dma), and the corresponding attribute members such as the number of commands (p_cnt). In addition, each Channel (Channel, higher-level storage organization structure than LUN, which may include multiple LUNs under one Channel) of the Nand Flash controller is also managed by a software data structure of a context management block (Channel cmd_buffer), wherein several queues (command to-be-executed LUN queues pc_luns/pwc _luns, busy-waiting queues busy_luns, read ready queues rdy_luns, etc.) are introduced, and the LUN control blocks in corresponding states are sequentially mounted in these queues as nodes.
The firmware main program then periodically traverses the context management block of each Channel, checks each queue and processes. After the back-end completes the analysis of FTL (front-end and back-end interaction algorithm module in SSD firmware) message to Nand Flash command context, the command is mounted to pr_cmds/pwe _cmds list under corresponding LUN control block according to physical address (PBA) of the message, and LUN control block is mounted to-be-executed command queue pc_luns of corresponding Channel context management block (for example, reading). Then under the control of firmware program logic, the LUN control blocks sequentially circulate in the pc_luns, busy_luns and rdy_luns queues until the command is completed, and taking a read command as an example, the detailed flow is as follows:
a read command message to be made is found on a certain LUN [ n ], and the LUN [ n ] is mounted in an execution queue pc_luns under a Channel corresponding to the Nand Flash controller;
circularly checking a LUN to-be-executed queue pc_luns of each Channel in a rear-end firmware main program, after finding a LUN [ n ], entering a command stage, sending a 00-30h sequence to a Nand Flash controller, and removing the LUN from the to-be-executed queue pc_luns;
the Nand Flash controller returns a LUN [ n ] command stage completion mark, the LUN [ n ] enters a busy state, namely, data in Nand Flash particles is waited to be transported to an IO interface, then the LUN [ n ] is mounted on a wait queue busy_luns, and the wait time is set;
the firmware circularly checks the LUN waiting queue, if the waiting time of the LUN [ n ] is up, the LUN waiting queue is removed from the list, and a command for checking the state of the LUN is issued to the Nand Flash controller, if the waiting time is not up, the LUN [ n ] is kept in a busy state, and the firmware processes other LUNs;
judging whether the command phase 00-30h of the LUN [ n ] is finished, if not, re-hanging the LUN [ n ] back to the waiting queue, resetting the waiting time, checking the LUN waiting queue in the previous step, and if so, controlling the LUN [ n ] to enter a data transmission phase by firmware, sending a 06-e0h sequence to a Nand Flash controller, and enabling a DMA module to carry data on a Nand Flash particle IO interface to a host memory;
after the data transmission stage is completed, judging whether other read commands to be executed exist on the LUN [ n ], if so, returning to the first step for continuous execution, and if not, turning the LUN [ n ] into an idle state.
While after the AIPR function is turned on, the smallest parallel unit of a Single Plane read command is no longer a LUN, but a Plane within the LUN. Single Plane read commands can be executed on different planes of one LUN concurrently, and command processes on the planes are independent; however, if a LUN is currently executing other commands such as write-erase, only one Plane can be allowed to work on the LUN, and the other planes cannot independently execute the commands. To meet this rule, the following modifications are made under the framework of software LUN management described above:
(1) The number of LUN control blocks (lun_ctrl) in each Channel context management block (Channel cmd_buffer) is extended according to the number of planes that each LUN of Nand Flash granule has (for example, for Nand Flash granule of 4 planes/LUN, the number of LUN control blocks is increased to 4 times as much as the original number), and the meaning is changed into the number of planes control blocks (pln_ctrl), i.e. the data set of the status and command list of each Plane under the LUN. Each Plane control block is still mounted in each queue of the Channel context management block like the previous LUN control block to participate in state circulation;
(2) In a Channel context management block (Channel cmd_buffer) data structure, add attribute members: the Plane status bitmap (pln_busy_mask) and LUN AIPR mode flag (lun_aipr_en), which are both array types, are one for each LUN under Channel. The pln_busy_mask reflects whether each Plane under a certain LUN has a command execution in a Bit mask form, and if so, the corresponding Bit is 1, otherwise, 0.lun_aipr_en reflects whether this LUN is currently in AIPR mode (indicating that it is in AIPR mode when the flag is true), and only allows each of its planes to independently execute commands in AIPR mode, otherwise only one Plane can execute commands.
Besides the data structure modification aiming at software LUN management, the implementation of the AIPR function mainly relates to the modification of the processing procedure of a new command message of the back end and the processing procedure of the next command process of the current LUN after the command is completed.
The new command message processing flow is as follows:
after the back end receives and parses the command message sent from the FTL, and completes the application and configuration of the command context (cmd_info), a corresponding Channel context management block and a Plane control block (with the number of LUN [ n ] PLN [ m ]) are found according to the Nand Flash physical address (PBA) in the message, and the new command context is mounted to the pr_cmds or pwe _cmds list of the Plane control block LUN [ n ] PLN [ m ] according to the specific command type, and then the following steps are executed:
(1) Judging whether the new command is the first command on the LUN [ n ] PLN [ m ] (whether the new command is empty in the lists of pr_cmds/pwe _cmds and the like of the LUN [ n ] PLN [ m ] before being added) if the new command is the first command on the LUN [ n ] PLN [ m ], if the new command is empty, continuing the next judgment, and if the new command is not the first command, jumping to the step 6.
(2) Checking whether Bit corresponding to PLN [ m ] (PLN where new command is located) is 0 or not in a Plane state bitmap pln_busy_mask of LUN [ n ] (LUN where new command is located) in a Channel context management block, namely whether the Bit is in an idle state or not before PLN [ m ]. If yes, continuing the next judgment, and if not, jumping to the step 6.
(3) Checking whether Bit bits corresponding to other planes in the Plane state bitmap of the LUN [ n ] are all 0, namely whether all planes of the LUN [ n ] are idle. If yes, jumping to the step 5, otherwise continuing the next judgment.
(4) Checking whether the AIPR mode flag lun_aipr_en of LUN [ n ] in the Channel context management block is true (whether LUN [ n ] is in AIPR mode), and whether the new command is of a command type (Single Plane read command) supporting AIPR operation, if both conditions are true, performing the next operation, otherwise, jumping to step 6.
(5) Updating a Plane state bitmap pln_busy_mask of the LUN [ n ], setting Bit position 1 corresponding to the PLN [ m ], and setting an AIPR mode flag lun_aipr_en of the LUN [ n ] according to whether a new command is a command type supporting AIPR operation (if 1 is set, and if 0 is not set). The Plane control block LUN [ n ] PLN [ m ] is then mounted to the command pending queue (pc_luns or pwc _luns, depending on the new command type on LUN [ n ] PLN [ m) of the Channel context management block.
(6) And ending the processing flow of the new command message, and processing other business logic (such as sending a command sequence to the Nand Flash controller hardware according to the Plane management queue of each Channel, polling the command completion state returned by the receiving hardware, and the like) by the firmware program.
After the command on a Plane is completed, the processing flow of taking the next step of the command to be executed of the LUN where the command is located is as follows:
(1) The firmware program knows that the current command on the LUN [ n ] PLN [ m ] is completed from the state information returned by the hardware of the Nand Flash controller, and clears the Bit corresponding to the PLN [ m ] in the Plane state bitmap pln_busy_mask of the LUN [ n ] by 0.
(2) Check if the corresponding bits of other planes in the Plane status bitmap pln busy mask of LUN n are also all 0 (if all planes of LUN n are idle). If yes, jumping to the step 4, otherwise continuing the next judgment.
(3) If some other commands for the planes remain outstanding on LUN [ n ], then the LUN must be in AIPR mode, so the new command can be executed only if the type supporting AIPR operation (Single Plane read), it is checked whether there are any commands supporting AIPR operation to be done on PLN [ m ] that just completed the command, and PLN [ m ] does not traverse other idle planes of LUN [ n ] any more (PLN_busy_mask corresponds to a Plane with Bit of 0). And stopping searching as soon as any one Plane (assumed as PLN [ i ]) meeting the condition is found, mounting the Plane control block on a command queue (pc_luns) to be executed of the Channel context management block, and setting 1 to the PLN [ i ] corresponding to the Bit in the Plane state bitmap of the LUN [ n ] (if all idle planes of the LUN [ n ] do not have new AIPR commands to be done currently). And then jumps to step 6.
(4) LUN [ n ] is currently free for all planes, then either AIPR type commands (Single Plane read) or normal commands (full LUN level commands such as erase and write) can be executed. The LUN [ n ] is initialized to a non-AIPR mode by default (lun_aipr_en flag is cleared to 0), then each Plane of the LUN [ n ] is traversed from the next Plane of the PLN [ m ] (from PLN [0] if the PLN [ m ] is the last Plane of the LUN), and each PLN [ i ] is checked in turn for commands to be executed on the list of commands to be executed (pr_cmds/pwe _cmds). If no Plane of the command to be executed is found after the traversing cycle is finished, jumping to the step 6; if a non-AIPR command (LUN level command such as writing and erasing) is found on the PLN [ i ] in the searching process, the PLN [ i ] (control block) is mounted on a to-be-executed command queue (pc_luns or pwc _luns are selected according to the command type) of the Channel context management block, the PLN [ i ] in the PLN [ n ] Plane state bitmap pln_busy_mask corresponds to Bit 1, traversal is stopped, and then the step 6 is skipped; otherwise (the AIPR type command to be executed is found on PLN [ i ] in the traversal process) the following steps are continued.
(5) If there is an AIPR command to be executed on the PLN [ i ], marking the LUN [ n ] as an AIPR mode (lun_aipr_en flag is set to 1), mounting the PLN [ i ] (control block) on a Channel context management block execution queue (pc_luns), setting the PLN [ i ] corresponding to Bit set to 1 in the PLN [ n ] Plane state bitmap pln_busy_mask, pointing to the next Plane of the LUN [ n ], repeating the steps until all planes of the LUN [ n ] are checked for one pass (if the planes to be executed command is a common command are encountered in the circulation process), and continuing the next step.
(6) Judging whether the PLN_busy_mask of the PLN [ n ] updated PLN state bitmap is not 0 or not, namely, if at least one PLE works next, processing corresponding commands on each non-idle PLE of the LUN [ n ] when the firmware runs to the PLE management queue program segment of each Channel; otherwise LUN [ n ] enters an idle state. So far, the process of selecting the LUN to be executed next is finished.
For an AIPR type command (Single Plane read command), when checking whether the CMD stage of the command (the process of transferring data inside Nand Flash grains to the IO interface) is completed, an instruction sequence for separately checking a Plane state may be sent to the Nand Flash controller, instead of sending an instruction for checking the state of the whole LUN to the controller like a LUN level command such as erasure, etc., to improve the parallel efficiency between planes.
Finally, it should be noted that: the foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (7)
1. The AIPR command based on software LUN management realizes a data structure, and is characterized in that the number of LUN control blocks in each Channel context management block in a LUN management frame is multiplied according to the number of planes of each LUN of Nand Flash grains, and the meaning of the number of the planes is changed into the Plane control blocks; adding a Plane state bitmap and a LUN AIPR mode mark of an attribute member of an array type into a Channel context management block data structure, wherein each LUN under the Channel corresponds to one Plane state bitmap and one LUN AIPR mode mark respectively; the Plane status bitmap reflects whether each Plane under the LUN has a command to execute, the LUN AIPR reflects whether the LUN is currently in an AIPR mode, the LUN only allows each Plane to independently execute the command under the AIPR mode, otherwise, only one Plane can execute the command.
2. The AIPR read command implementation data structure of claim 1, wherein the LUN management framework includes a LUN control block and a Channel context management block, the LUN control block is used to manage commands and states of each LUN, the Channel context management block is used to manage each Channel of the Nand Flash controller, and the LUN control blocks in different states are sequentially mounted as nodes in a state queue of the Channel context management block.
3. The AIPR read command implementation data structure based on software LUN management of claim 2 wherein the LUN control block comprises: numbering of the LUN, current state, read, write and erase command list waiting to be executed under the LUN, and corresponding command quantity attribute members; the state queue of the Channel context management block comprises: a command to execute LUN queue, a busy waiting queue, a read ready queue.
4. An AIPR command implementation method based on software LUN management, characterized in that based on the data structure of any of claims 1-3, the steps include:
after the back end receives and analyzes the command message sent by the FTL, the Channel context management block and the Plane control block which are corresponding to the number of the LUN [ n ] PLN [ m ] are found according to the Nand Flash physical address in the message, the new command context is mounted in a read or write erase list waiting to be executed under the LUN of the Plane control block LUN [ n ] PLN [ m ] according to the specific command type, the judgment command on the Plane is executed, and the next command waiting to be executed of the LUN where the judgment command is located is taken to be processed.
5. The method according to claim 4, wherein the new command message processing flow is specifically:
(1) Judging whether the new command is the first command on LUN [ n ] PLN [ m ], if so, continuing the next judgment, and if not, jumping to the step 6;
(2) Checking whether PLN [ m ] is in an idle state before in a Plane state bitmap of LUN [ n ] in a Channel context management block, if so, continuing the next judgment, and if not, jumping to the step 6;
(3) Checking whether all planes of the LUN [ n ] are idle, if yes, jumping to the step 5, otherwise continuing the next judgment;
(4) Checking whether the LUN [ n ] in the Channel context management block is in an AIPR mode or not and whether the new command is of a command type supporting AIPR operation or not, if both conditions are true, performing the next operation, otherwise, jumping to the step 6;
(5) Updating a Plane state bitmap of the LUN [ n ], setting a Bit position corresponding to the PLN [ m ] to be non-idle, setting an AIPR mode mark of the LUN [ n ] according to whether a new command is a command type supporting AIPR operation, and mounting the Plane control block LUN [ n ] PLN [ m ] to a corresponding command waiting execution queue of a Channel context management block;
(6) And ending the new command message processing flow, and processing other business logic by the firmware program.
6. The method for implementing data structure according to claim 4, wherein the processing flow of the command to be executed next in the LUN is specifically:
(1) The firmware program obtains the completion of the current command on the LUN [ n ] PLN [ m ] from the state information returned by the hardware of the Nand Flash controller, and the Bit position corresponding to the Plane state bitmap PLN [ m ] of the LUN [ n ] is idle;
(2) Checking whether all planes of the LUN [ n ] are idle, if yes, jumping to the step 4, otherwise continuing the next judgment;
(3) Checking whether a command supporting AIPR operation is still available on PLN [ m ] which just completes the command currently, wherein the PLN [ m ] does not traverse other idle planes of the LUN [ n ] any more, if any one Plane meeting the condition is found, the search is stopped if the PLN [ i ] is assumed, the Plane control block is mounted on a command queue to be executed of a Channel context management block, the corresponding Bit of the PLN [ i ] in a Plane state bitmap of the LUN [ n ] is set to be non-idle, if all idle planes of the LUN [ n ] do not currently have new AIPR commands to be done, the processing is not performed, and then the step 6 is skipped;
(4) Initializing a LUN [ n ] into a non-AIPR mode by default, traversing each Plane of the LUN [ n ] from the next Plane of the PLN [ m ], sequentially checking whether a command to be executed exists on a read or write wiping list to be executed of each PLN [ i ] from the PLN [0] if the PLN [ m ] is the last Plane of the LUN, and jumping to the 6 th step if no Plane of the command to be executed is found after the traversing cycle is finished; if a non-AIPR command is found on the PLN [ i ] in the searching process, the PLN [ i ] is mounted on a command queue to be executed corresponding to a Channel context management block, the Bit corresponding to the PLN [ i ] in the LUN [ n ] Plane state bitmap is set to be non-idle, traversal is stopped, and then the step 6 is skipped; if the AIPR type command to be executed is found to exist on PLN [ i ] in the traversal process, the following steps are continued.
(5) Marking the LUN [ n ] as an AIPR mode, mounting PLN [ i ] (control block) on a Channel context management block execution queue, setting the corresponding Bit of the PLN [ i ] in a LUN [ n ] Plane state bitmap to be non-idle, pointing to the next Plane of the LUN [ n ], repeating the steps until all planes of the LUN [ n ] are checked for one time, and continuing the next step;
(6) Judging whether at least one Plane will work next or not according to the updated Plane state bitmap of the LUN [ n ], if yes, when the firmware runs to the Plane management queue program section of each Channel, processing the corresponding command on each non-idle Plane of the LUN [ n ]; otherwise, LUN [ n ] enters an idle state;
(7) The process of selecting the LUN next to execute the command ends.
7. The AIPR read command implementation data structure according to claim 4, wherein for commands of the AIPR type, an instruction sequence for separately checking a Plane state is sent to the Nand Flash controller when checking whether the CMD phase of the command is completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311277115.0A CN117420952A (en) | 2023-09-28 | 2023-09-28 | AIPR command realization data structure and method based on software LUN management |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311277115.0A CN117420952A (en) | 2023-09-28 | 2023-09-28 | AIPR command realization data structure and method based on software LUN management |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117420952A true CN117420952A (en) | 2024-01-19 |
Family
ID=89527453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311277115.0A Pending CN117420952A (en) | 2023-09-28 | 2023-09-28 | AIPR command realization data structure and method based on software LUN management |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117420952A (en) |
-
2023
- 2023-09-28 CN CN202311277115.0A patent/CN117420952A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9110669B2 (en) | Power management of a storage device including multiple processing cores | |
US9021178B2 (en) | High performance path for command processing | |
AU2008308549B2 (en) | Solid state drive optimizer | |
US8832357B2 (en) | Memory system having a plurality of writing mode | |
US8321639B2 (en) | Command tracking for direct access block storage devices | |
CN101446924B (en) | Method and system for storing and obtaining data | |
US9696934B2 (en) | Hybrid solid state drive (SSD) using PCM or other high performance solid-state memory | |
US12001359B2 (en) | Identification and classification of write stream priority | |
US10942676B2 (en) | Data storage device for determining a write mode, operation method thereof and storage system having the same | |
CN109582215B (en) | Hard disk operation command execution method, hard disk and storage medium | |
CN110674056B (en) | Garbage recovery method and device | |
CN103985393B (en) | A kind of multiple optical disk data parallel management method and device | |
CN109240939B (en) | Method for rapidly processing solid state disk TRIM | |
US10503438B1 (en) | Memory sub-system supporting non-deterministic commands | |
US20230120184A1 (en) | Systems, methods, and devices for ordered access of data in block modified memory | |
Cho et al. | The solid-state drive technology, today and tomorrow | |
KR101070511B1 (en) | Solid state drive controller and method for operating of the solid state drive controller | |
CN115552531A (en) | Memory access conflict management on shared wordlines | |
CN117420952A (en) | AIPR command realization data structure and method based on software LUN management | |
CN114174977B (en) | Improved handling of host initiated requests in a memory subsystem | |
CN117836751A (en) | Enhancing memory performance using memory access command queues in a memory device | |
CN114287032A (en) | Memory subsystem management based on dynamic control of wordline enable voltage | |
US11698856B2 (en) | Maintaining sequentiality for media management of a memory sub-system | |
US20240220157A1 (en) | Methods and systems for software based prefetching for low buffer depth sequential read traffic | |
CN115885265A (en) | Improved memory device performance based on storage traffic pattern detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |