WO2022021337A1 - Flash memory control method and device - Google Patents

Flash memory control method and device Download PDF

Info

Publication number
WO2022021337A1
WO2022021337A1 PCT/CN2020/106229 CN2020106229W WO2022021337A1 WO 2022021337 A1 WO2022021337 A1 WO 2022021337A1 CN 2020106229 W CN2020106229 W CN 2020106229W WO 2022021337 A1 WO2022021337 A1 WO 2022021337A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
entry
ppn
ftl
lba
Prior art date
Application number
PCT/CN2020/106229
Other languages
French (fr)
Chinese (zh)
Inventor
苏杰
林财成
朱胜
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/106229 priority Critical patent/WO2022021337A1/en
Priority to CN202080101642.4A priority patent/CN115668153A/en
Publication of WO2022021337A1 publication Critical patent/WO2022021337A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages

Definitions

  • the present application relates to the field of storage technologies, and in particular, to a flash memory control method and device.
  • NAND flash memory In universal flash storage (UFS), embedded multi-media card (eMMC), or consumer solid state disk (SSD), NAND flash memory has special physical properties, such as requiring Erasing is done at block granularity, and each block has a limit on the number of erasures. Therefore, it is necessary to maintain the mapping relationship between the logical block address (LBA) and the physical page number (PPN) through the flash translation layer (FTL) table entry, so as to achieve the purpose of wear leveling .
  • LBA logical block address
  • PPN physical page number
  • FTL flash translation layer
  • FTL adopts a multi-level mapping method and can only cache part of the SRAM. FTL first-level entry. When the cached FTL first-level table entry misses, the appropriate FTL first-level table needs to be loaded and replaced from the NAND.
  • FTL first-level entries increases read and write latency, reduces system performance, and affects user experience.
  • the present application provides a method and device for controlling a flash memory, which can directly access target data through the information of the second-level table of the flash translation layer (FTL) without loading and replacing the first-level table of the FTL, thereby improving the efficiency of data access.
  • FTL flash translation layer
  • a flash memory control device comprising: a random access memory for storing an FTL secondary table; a controller for receiving a data access instruction sent by a host, where the data access instruction includes a target logical block address (logical block address, LBA); when the physical page number (physical page number, PPN) corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous, and the first entry corresponds to the valid data space , the target data is accessed according to the target LBA and the starting PPN in the first entry, where the starting PPN is the PPN corresponding to the first LBA in the LBA address segment indicated by the first entry.
  • LBA logical block address
  • PPN physical page number
  • the first entry includes the starting PPN
  • the controller may, according to the target LBA of the target data and the information of the starting PPN in the first entry, perform an update on the target data.
  • FTL first-level tables which avoids the access delay caused by the loading and replacement of FTL first-level tables, improves the efficiency of data access, and improves system performance.
  • the controller when the physical page numbers PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table are consecutive, and the first entry corresponds to the invalid data space, the controller further uses : Send indication information to the host, where the indication information is used to indicate that the data access is invalid.
  • the controller can directly return invalid data access information to the host without loading the FTL first-level table corresponding to the first entry for judgment, which improves the efficiency of data access.
  • the controller is specifically configured to: obtain the offset of the target LBA, where the offset of the target LBA is the difference between the target LBA and the first LBA in the LBA address segment indicated by the first entry; The target data is accessed based on the offset and the starting PPN.
  • the controller is specifically configured to: determine the target PPN corresponding to the target LBA of the target data according to the offset and the starting PPN, where the target PPN is the sum of the starting PPN and the offset; The target PPN accesses target data.
  • the target PPN corresponding to the target LBA can be obtained through simple calculation, so as to access the target data, which improves the efficiency of data access.
  • the controller is further configured to: receive a data write instruction sent by the host, where the data write instruction includes the data to be written; assign a write address to the data to be written; Data write control.
  • the controller is specifically configured to: determine that the PPNs corresponding to the LBA address segment indicated by the first entry where the write address is located are continuous; and record the starting PPN in the first entry.
  • the starting PPN may be recorded in the first entry to facilitate subsequent data access.
  • the first entry includes a space reduction flag, and the space reduction flag is used to indicate that the first entry corresponds to valid data space, or the space reduction flag is used to indicate that the first entry corresponds to invalid data space .
  • the controller may determine that the first entry corresponds to the valid data space or the first entry corresponds to the invalid data space according to the space reduction flag in the first entry, so as to perform appropriate data access control according to the instruction of the host.
  • a flash memory control method comprising: receiving a data access command sent by a host, where the data access command includes a target logical block address LBA of target data; the LBA address segment indicated by the first entry of the FTL secondary table
  • the target data is accessed according to the target LBA and the starting PPN in the first entry, and the starting PPN is indicated by the first entry.
  • the first entry includes the starting PPN
  • the controller may, according to the target LBA of the target data and the information of the starting PPN in the first entry, perform an update on the target data.
  • FTL first-level tables which avoids the access delay caused by the loading and replacement of FTL first-level tables, improves the efficiency of data access, and improves system performance.
  • the method further includes: Sending indication information to the host, where the indication information is used to indicate that the data access is invalid.
  • the flash controller can directly return the information that the data access is invalid to the host, without loading the FTL first-level table corresponding to the first entry for judgment, which improves the efficiency of data access.
  • accessing the target data according to the target LBA and the starting PPN in the first entry includes: obtaining an offset of the target LBA, where the offset of the target LBA is indicated by the target LBA and the first entry The difference of the first LBA in the LBA address segment; according to the offset and the starting PPN, the target data is accessed.
  • accessing the target data according to the offset and the starting PPN includes: determining a target PPN corresponding to the target LBA of the target data according to the offset and the starting PPN, where the target PPN is the starting PPN and the offset and ; access target data according to the target PPN.
  • the target PPN corresponding to the target LBA can be obtained through simple calculation, thereby accessing the target data, which improves the efficiency of data access.
  • the method further includes: receiving a data write instruction sent by the host, where the data write instruction includes data to be written; assigning a write address to the data to be written; Write control.
  • performing data write control on the data to be written includes: determining that the PPN corresponding to the LBA address segment indicated by the first entry where the write address is located is continuous; recording the first entry Start PPN.
  • the starting PPN may be recorded in the first entry to facilitate subsequent data access.
  • the first entry includes a space reduction flag, and the space reduction flag is used to indicate that the first entry corresponds to valid data space, or the space reduction flag is used to indicate that the first entry corresponds to invalid data space .
  • the controller may determine that the first entry corresponds to the valid data space or the first entry corresponds to the invalid data space according to the space reduction flag in the first entry, so as to perform appropriate data access control according to the instruction of the host.
  • a method for processing an FTL table entry comprising: a storage device determining that the physical page numbers corresponding to the logical block addresses in the FTL level-1 table of the first segment are consecutive; updating or establishing the FTL level-2 table of the first segment entry, the FTL secondary table entry for this first segment includes the space reduction flag.
  • the storage device may not store the FTL level-1 table of the segment, but directly mark it in the entry of the FTL level-2 table of the segment, which reduces the storage space occupied by the FTL level-1 entry.
  • the FTL second-level table entry with the space reduction flag implies the information of the FTL first-level table of the segment, which improves the hit rate of the FTL table entry of the storage device to a certain extent.
  • the first segment corresponds to all continuous data, or the first segment corresponds to all invalid data.
  • the first segment corresponds to fully continuous data
  • the FTL secondary table entry of the first segment includes: a start PPN of the first segment, where the start PPN is the first segment of the first segment The PPN corresponding to each LBA.
  • the starting PPN of the segment is stored in the entry of the FTL secondary table of the corresponding segment.
  • the target data can be obtained directly according to the LBA offset and the starting PPN, which improves the The hit rate of FTL entries improves the efficiency of data access.
  • the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
  • the newly defined flag bit can be used as the space reduction flag, or the undefined state of the existing flag bit can be used as the space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the second undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
  • the space reduction flag includes a third flag, the third flag includes a bit, the value of the third flag indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a first mode
  • the first mode indicates that the first segment corresponds to all invalid data
  • the FTL entry of the first segment is reduced.
  • a newly defined flag bit or a new mode can be used as the space reduction flag, or the undefined state of the existing flag bit can be used as the space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
  • the FTL entry processing method is executed when the storage device performs an input/output IO operation.
  • the FTL entry processing method is executed during an idle period of the storage device.
  • the processing of the FTL table entry can be performed during the IO operation or during the idle period of the storage device, which improves the work efficiency of the storage device.
  • a method for reading data comprising: determining that the flash memory translation layer FTL secondary table entry of the segment where the target logical block address LBA of the target data is located includes a space reduction flag, and the space reduction flag indicates the corresponding first segment.
  • the physical page number PPN is continuous; the target data is read according to the FTL secondary table entry of the first segment where the target LBA is located.
  • the FTL secondary table of the target segment When reading data, you can first check the entry of the FTL secondary table of the target segment. When the secondary table entry of the segment includes the space reduction flag, the target data can be obtained directly from the secondary table entry of the segment without loading.
  • the FTL first-level table of this segment improves the hit rate of the FTL table entry and improves the efficiency of data reading.
  • the space reduction flag includes a first flag, the first flag includes one bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced.
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
  • the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, and the starting PPN is the PPN corresponding to the first LBA of the first segment.
  • reading the target data according to the FTL secondary table entry of the first segment where the target LBA is located includes: acquiring the offset of the target LBA; The starting PPN is used, and the target data is read.
  • the target data corresponds to fully continuous data according to the space reduction flag of the FTL secondary table entry of the first segment where the target LBA is located.
  • the starting PPN of the segment and the corresponding partial It is not necessary to obtain the FTL first-level table of the segment by moving to obtain the target data, which improves the efficiency of data reading.
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the second undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
  • the space reduction flag includes a third flag, the third flag includes a bit, the value of the third flag indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a first mode
  • the first mode indicates that the first segment corresponds to all invalid data
  • the FTL entry of the first segment is reduced.
  • reading the target data according to the FTL secondary table entry of the first segment where the target LBA is located includes: returning invalid data to the host.
  • a fifth aspect provides a data writing method, comprising: determining that the data to be written is fully contiguous data, and the physical data in the first segment of the flash memory translation layer FTL first-level table where the logical block address LBA of the fully contiguous data is located.
  • the page number PPN is continuous; the FTL secondary table entry of the first segment is updated or established, and the FTL secondary table entry of the first segment includes a space reduction flag; and the fully continuous data is written.
  • the entry of the FTL secondary table of the segment can be directly updated, and the space reduction flag is included in the FTL secondary table entry of the segment, without the need for
  • the FTL first-level table is then established or updated, which reduces the storage space occupied by the FTL table entry and facilitates the reading of data.
  • the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
  • the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, where the starting PPN is the PPN corresponding to the first LBA of the first segment.
  • a storage device comprising: a determination module for determining that the physical page number PPN corresponding to the logical block address LBA in the first-stage flash memory translation layer FTL level table is continuous; an update module for updating Or create an FTL secondary table entry for the first segment, where the FTL secondary table entry for the first segment includes a space reduction flag.
  • the storage device may not store the FTL level-1 table of the segment, but directly mark it in the entry of the FTL level-2 table of the segment, which reduces the storage space occupied by the FTL level-1 entry.
  • the FTL second-level table entry with the space reduction flag implies the information of the FTL first-level table of the segment, which improves the hit rate of the FTL table entry of the storage device to a certain extent.
  • the determining module is specifically configured to determine that the first segment corresponds to all continuous data, or to determine that the first segment corresponds to all invalid data.
  • the determining module determines that the first segment corresponds to fully continuous data; the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, where the starting PPN is the first segment The first LBA corresponds to the PPN.
  • the starting PPN of the segment is stored in the entry of the FTL secondary table of the corresponding segment.
  • the target data can be obtained directly according to the LBA offset and the starting PPN, which improves the The hit rate of FTL entries improves the efficiency of data access.
  • the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
  • the newly defined flag bit can be used as the space reduction flag, or the undefined state of the existing flag bit can be used as the space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
  • the determining module determines that the first segment corresponds to all invalid data; the space reduction flag includes a second flag, the second flag includes a plurality of bits, and the second non-valid data among the multiple states indicated by the second flag
  • the definition state is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
  • the determining module determines that the first segment corresponds to all invalid data; the space reduction flag includes a third flag, the third flag includes one bit, and the value of the third flag indicates that the first segment corresponds to all invalid data, And the FTL entry of the first paragraph is reduced.
  • the determining module determines that the first segment corresponds to all invalid data; the space reduction flag includes a first mode, the first mode indicates that the first segment corresponds to all invalid data, and the first segment corresponds to all invalid data. FTL entries have been reduced.
  • a newly defined flag bit or a new mode can be used as a space reduction flag, or an undefined state of an existing flag bit can be used as a space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
  • a data reading device is provided, the data reading device is applied to a storage device, and the device includes: a determining module for determining the flash memory conversion of the first segment where the target logical block address LBA of the target data is located
  • the layer FTL secondary table entry includes a space reduction flag indicating that the physical page number PPN corresponding to the first segment is continuous; the reading module is configured to read target data according to the FTL secondary table entry of the first segment.
  • the FTL secondary table of the target segment When reading data, you can first check the entry of the FTL secondary table of the target segment. When the secondary table entry of the segment includes the space reduction flag, the target data can be obtained directly from the secondary table entry of the segment without loading.
  • the FTL first-level table of this segment improves the hit rate of the FTL table entry and improves the efficiency of data reading.
  • the space reduction flag includes a first flag, the first flag includes one bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced.
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
  • the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, and the starting PPN is the PPN corresponding to the first LBA of the first segment.
  • the apparatus further includes: an obtaining module, configured to obtain the offset of the target LBA; and the reading module is specifically configured to read the target data according to the offset and the starting PPN.
  • the target data corresponds to fully continuous data according to the space reduction flag of the FTL secondary table entry of the first segment where the target LBA is located.
  • the starting PPN of the segment and the corresponding partial It is not necessary to obtain the FTL first-level table of the segment by moving to obtain the target data, which improves the efficiency of data reading.
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the second undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
  • the space reduction flag includes a third flag, the third flag includes a bit, the value of the third flag indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a first mode
  • the first mode indicates that the first segment corresponds to all invalid data
  • the FTL entry of the first segment is reduced.
  • the read module is specifically configured to return invalid data to the host.
  • a data writing device is provided, the data writing device is applied to a storage device, and the device includes: a determining module for determining that the data to be written is fully continuous data, the logical block address of the fully continuous data
  • the physical page numbers PPN in the FTL first-level table of the flash conversion layer of the first segment where the LBA is located are consecutive; the update module is used to update or establish the FTL second-level table entry of the first segment, and the FTL second-level table entry of the first segment includes Space reduction flag; write module for writing fully contiguous data.
  • the entry of the FTL secondary table of the segment can be directly updated, and the space reduction flag is included in the FTL secondary table entry of the segment, without the need for
  • the FTL first-level table is then established or updated, which reduces the storage space occupied by the FTL table entry and facilitates the reading of data.
  • the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
  • the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
  • the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, and the starting PPN is the PPN corresponding to the first LBA of the first segment.
  • a computer-readable medium stores program codes for device execution, the program codes including flash memory control for executing the second aspect or any implementation manner of the second aspect method.
  • a computer-readable medium stores program codes for device execution, the program codes including an FTL table for executing the third aspect or any implementation manner of the third aspect item processing method.
  • a computer-readable medium stores program code for execution by a device, the program code including data for executing the fourth aspect or any implementation manner of the fourth aspect read method.
  • a computer-readable medium stores program code for execution by a device, the program code including data for executing the fifth aspect or any implementation manner of the fifth aspect write method.
  • a thirteenth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code runs on the flash memory control device, the flash memory control device executes the second aspect or the second aspect. Flash memory control method in any implementation manner.
  • a fourteenth aspect provides a computer program product, the computer program product comprising: computer program code, which when the computer program code is executed on a storage device, causes the storage device to execute the third aspect or any one of the third aspects An FTL table entry processing method in an implementation manner.
  • a fifteenth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a storage device, the storage device executes the fourth aspect or any one of the fourth aspect The data reading method in this implementation.
  • a sixteenth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a storage device, the storage device executes the fifth aspect or any one of the fifth aspects The data writing method in this implementation.
  • a seventeenth aspect provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes the second aspect or any implementation manner of the second aspect Flash control method in .
  • the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the second aspect or the second aspect.
  • the flash memory control method in any one of the implementations.
  • a chip in an eighteenth aspect, includes a processor and a data interface, the processor reads instructions stored in a memory through the data interface, and executes the third aspect or any one of the implementation manners of the third aspect. FTL entry processing method in .
  • the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the third aspect or the third aspect.
  • the FTL entry processing method in any one of the implementations.
  • a nineteenth aspect provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes any one of the fourth aspect or the fourth aspect.
  • the data read method in .
  • the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the fourth aspect or the fourth aspect.
  • the data reading method in any one of the implementations.
  • a twentieth aspect provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes any implementation manner of the fifth aspect or the fifth aspect The data write method in .
  • the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the fifth aspect or the fifth aspect.
  • the data writing method in any one of the implementations.
  • an apparatus comprising: a processor and a memory, where the memory is used to store the computer program code, when the computer program code is executed on the processor, the apparatus causes the apparatus to execute a third The FTL entry processing method in any one of the implementation manners of the aspect or the third aspect.
  • an apparatus comprising: a processor and a memory, the memory is used for storing the computer program code, when the computer program code is executed on the processor, the apparatus causes the apparatus to execute the fourth The data reading method in the aspect or any one of the implementation manners of the fourth aspect.
  • an apparatus comprising: a processor and a memory, the memory is used to store the computer program code, when the computer program code is executed on the processor, the apparatus causes the apparatus to execute the fifth A data writing method in any one of the implementation manners of the aspect or the fifth aspect.
  • FIG. 1 is a schematic diagram of a multi-level flash memory translation layer FTL table entry
  • FIG. 2 is a schematic flowchart of a method for processing an FTL entry according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an FTL table entry according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an FTL secondary table entry of full continuous data according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an FTL secondary table entry of all invalid data according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of data access control according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of data write control according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a storage device according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another storage device according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a flash memory control device according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a data reading device according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a data writing device according to an embodiment of the present application.
  • NVM non-volatile memory
  • UFS universal flash storage
  • eMMC embedded multi-media card
  • SSD solid state disk
  • NAND is a non-volatile storage medium. NAND flash memory needs to be erased on a block-by-block basis, and new data can be written to the erased blocks, and each block has a limit on the number of times of erasure. In a storage device using NAND flash memory, due to the physical characteristics of NAND, it is necessary to maintain the logical block address (LBA) and physical page number (physical page number) through the flash translation layer (FTL) table entry. , PPN) mapping relationship to achieve the purpose of balancing NAND wear.
  • LBA logical block address
  • physical page number physical page number
  • FTL flash translation layer
  • each entry (entry) of the FTL table uses 4 bytes (byte, B) to store a PPN, and a PPN corresponds to a 4KB address space, which means that the FTL table entry consumes an unprecedented amount of storage device capacity. 1/1000. Because the on-chip static random access memory (SRAM) of the storage device controller is small and cannot accommodate the complete FTL table entry, the FTL table generally adopts a multi-level mapping method.
  • SRAM static random access memory
  • FIG. 1 is a schematic diagram of a multi-level FTL table.
  • the multi-level FTL table uses a segmentation mechanism to equally divide the complete address space into multiple segments. Illustratively, the size of each segment may be 128, 256, 512, and so on.
  • the FTL level 1 table directly corresponds to the conversion relationship between LBA and PPN.
  • each entry (entry) indicates the PPN corresponding to a certain LBA.
  • the FTL first-level table of each segment can be independently stored in NAND.
  • Each segment of the FTL level-1 table corresponds to an entry of the FTL level-2 (level 2) table, and each entry in the level-2 table stores the position of the segment's FTL level-1 table in NAND.
  • the size of a segment is 256 as an example (that is, the FTL level-1 table of each segment includes 256 mapping relationships between LBAs and PPNs).
  • each entry indicates the PPN corresponding to the LBA, for example, the first entry indicates the physical page number corresponding to the logical block address LAB 0. is PPN 0.
  • This segment corresponds to the first entry in the FTL second-level table, which stores the location where the FTL first-level table of LAB 0-255 is stored in NAND.
  • Multi-level FTL mapping can cache some FTL first-level entries in SRAM. When an entry misses, it needs to be loaded and replaced. According to the location of the segment's FTL first-level table stored in the FTL second-level table in NAND , read the required FTL first-level table, and swap in the segment that needs to be accessed currently in the SRAM. Loading and replacing table items will increase the read and write latency, reduce performance, and affect user experience.
  • Another solution is to open up a space in the host memory (host memory), such as using a host performance booster (HPB), as the FTL table entry cache of the storage device.
  • HPB host performance booster
  • the PPN address information on the HPB cache is directly sent to the storage device.
  • the host obtains the latest table entry from the storage device.
  • the host and storage device have frequent synchronization overhead.
  • the host memory is also a bottleneck, and using the host memory to store the FTL mapping table is also a great challenge to the host memory capacity.
  • the embodiment of the present application provides a flash memory control method, which can directly perform data access control according to the information of the FTL second-level table, without frequently loading and replacing the FTL first-level table, improving the hit rate of FTL table entries, and improving the performance of the system.
  • a two-level FTL table is used as an example to introduce the FTL table entry processing method in this embodiment of the present application.
  • the descriptions such as the “FTL first-level table” and the “FTL second-level table” in the embodiments of the present application are only for distinguishing FTL table items of different levels. May be referred to as the "FTL Level 2 Table”; the “FTL Level 2 Table” for this application may also be referred to as the "FTL Level 1 Table".
  • the flash memory control method mainly includes the processing of FTL entries and the reading and writing of data (data access or data writing).
  • FIG. 2 is a schematic flowchart of a method 200 for processing an FTL entry according to an embodiment of the present application. As shown in FIG. 2 , the method for processing an FTL entry in this embodiment of the present application includes steps S210 to S230. In the following, with reference to FIG. 2 , the method for processing an FTL entry in this embodiment of the present application will be described in detail.
  • the storage device determines that the PPN of the LBA address segment corresponding to a certain entry (for example, the "first entry” hereinafter) of the FTL secondary table is continuous. In this case, the corresponding space With the feature of reduction, the FTL first-level table can be reduced. This FTL first-level table may not occupy storage space, and is only marked in the entry corresponding to this section in the FTL second-level table.
  • each segment is 256 in size.
  • the PPN 0 corresponding to LBA 0 points to page 1 in the NAND space
  • the PPN 1 corresponding to LBA 1 points to the NAND space
  • the page 2 ...
  • the PPN 255 corresponding to LBA 255 points to page 256 in the NAND space, that is to say, the pages in the NAND space pointed to by the PPN corresponding to each LBA are continuous, that is, a logical block address LBA
  • the corresponding physical page number PPN is continuous.
  • the FTL first-level table of the segment of LBA 0-255 does not occupy storage space, and is only identified in the entry corresponding to the FTL second-level table LBA 0-255.
  • the PPN corresponding to LBA 0 points to page 1 in the NAND space
  • the PPN corresponding to LBA 1 points to page 2 in the NAND space
  • the corresponding PPN of LBA 2 points to page 2 in the NAND space.
  • PPN points to page 3 in the NAND space; however, the pages in the NAND space pointed to by the PPN corresponding to LBA 3-255 are discontinuous, that is, in the first segment, the physical address corresponding to each logical block address is not Continuously, in this case, the FTL level-1 table cannot be reduced, and the complete FTL level-1 table of the first segment needs to be stored in the SRAM or NAND of the storage device.
  • the segment of data when the PPNs corresponding to a segment of data are continuous, and the segment of data is valid data, the segment of data may be called fully continuous data. In this case, the first entry corresponds to the valid data space.
  • the segment of data when the PPNs corresponding to a segment of data are continuous, and the segment of data is invalid data, the segment of data may be referred to as completely invalid data, and in this case, the first entry corresponds to an invalid data space.
  • the data does not conform to the characteristics of space reduction, and an FTL first-level table is generated.
  • the existing multi-level FTL table entry technology is used to generate or update the FTL first-level table and the FTL second-level table, which will not be described in detail here for brevity.
  • the data conforms to the space reduction feature, and is identified in the FTL secondary table.
  • the space reduction flag is included in the first entry of the FTL secondary table.
  • the PPNs corresponding to LBA0-255 are continuous, which conforms to the space reduction feature in the above step S210.
  • the FTL first-level table of LBA0-255 is stored, and is identified in the entry of the second-level table.
  • FIG. 4 is an FTL secondary table entry identification method for full continuous data.
  • the FTL secondary entry of the full continuous data includes the status flag and the start PPN of the segment.
  • the starting PPN of the segment points to the PPN corresponding to the first LBA of the segment. For example, taking (a) in FIG. 3 as an example, in the secondary table entry of the segment, the starting PPN of the segment is PPN 0 corresponding to LBA 0, and PPN 0 points to page 1 of the NAND space.
  • a first flag of 1 bit may be used to indicate that the segment corresponds to fully contiguous data. Exemplarily, when the value of the first flag is 1, it indicates that the current segment is full continuous data. Or, when the value of the first flag is 0, it indicates that the current segment is full continuous data.
  • the above-mentioned 1-bit first flag may be located at any position of the entry except the starting PPN, which is not limited in this embodiment of the present application.
  • the first undefined state in the second flag can be used as the state flag of the fully continuous data, where the second flag includes multiple bits.
  • a 2-bit second flag is used to represent different states. These two bits can represent 4 different states. Exemplarily, when the value of these two bits is 11, it is the first undefined state. In this case, 11 can be used to indicate that the current segment is full continuous data.
  • the data of the first segment is invalid data, and conforms to the space reduction feature in the above step S210, that is, the data of this segment is completely invalid. data.
  • the FTL first-level table in the SRAM or NAND of the storage device.
  • FIG. 5 is an FTL secondary table entry identification method for all invalid data.
  • the entry of the secondary table may use a 1-bit third flag to indicate that the data of the current segment is all invalid data. For example, when the value of the third flag is 1, it indicates that the data of the current segment is all invalid data; or, when the value of the third flag is 0, it indicates that the data of the current segment is all invalid data.
  • 1-bit third flag may be located at any position of the entry except the first flag, which is not limited in this embodiment of the present application.
  • the second undefined state in the second flag may be used as the state flag of all invalid data, where the second flag includes multiple bits.
  • the second flag of 2 bits is the original state identification bit
  • 2 bits can represent 4 different states
  • the second undefined state among the four states can be used to represent that the data of the current segment is all invalid data.
  • 11 can be used to indicate that the data of the current segment is all continuous data
  • 10 can be used to indicate that the data of the current segment is all invalid data.
  • the entry of the secondary table may also use a first pattern (pattern) to indicate that the data of the current segment is all invalid data. For example, when the entry of the secondary table is "0xFFFFFFF", it means that the data of the current segment is all invalid data.
  • the entry of the secondary table may also be identified by other modes, which is not limited in this embodiment of the present application.
  • the storage space of the storage device can be saved, and the FTL first-level table does not need to be frequently replaced in the controller SRAM, which improves the hit rate of the FTL entry as a whole.
  • the method for processing FTL entries in this embodiment of the present application in addition to reducing the FTL entries for the above-mentioned all continuous data or all invalid data, can also be applied to perform FTL entry processing on continuous data with other characteristics. reduction, which is not limited in this embodiment of the present application.
  • the FTL first-level table may be reduced for a segment of continuous PPN data with all 0s; for another example, the data of a specific pattern that is continuous for a segment of PPN may be reduced. It is not repeated here.
  • the FTL table entry processing method according to the embodiment of the present application is described in detail above with reference to FIG. 2 to FIG. 5 .
  • the reduction method of the above FTL table entry can be performed at different stages of the data input and output (IO) process.
  • the above-described method 200 may be performed when the storage device is idle.
  • the storage device may search for FTL entries in an idle period to determine whether the corresponding data conforms to the space reduction feature in the above method 200 .
  • the NAND space pointed to by the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous, and the data is valid data, then the FTL primary table of this segment can no longer be stored, and the FTL of this segment is
  • the entry (first entry) of the secondary table stores the starting PPN of the address segment, and is identified in the entry of the secondary table of this segment in the manner shown in FIG. 4 .
  • the FTL primary table of the address segment can no longer be stored, and in the segment's In the entry (first entry) of the FTL secondary table, identification is made in the entry of the FTL secondary table of the segment in the manner as shown in FIG. 5 .
  • the performance of the storage device when performing IO operations can be improved.
  • the above-described method 200 may be performed when the storage device performs an IO operation.
  • the storage device may perform the above method 200 during the process of performing the data writing operation.
  • the storage device recognizes that the NAND space pointed to by the PPN corresponding to a certain segment of the LBA address of the data to be written is continuous, then the FTL level-1 table of the segment can no longer be stored or updated, and The starting PPN of the address segment is stored in the entry (eg, the first entry) of the FTL secondary table of the segment, and is performed in the first entry of the secondary table of the segment in the manner shown in FIG. 4 . logo.
  • the above method can be applied to scenarios where a large amount of sequential cold data is written, such as application (application, APP) installation, video, picture storage, and the like.
  • the writing of a large amount of continuous data can meet the characteristics of the above-mentioned fully continuous data, and in these application scenarios, FTL entries can be greatly reduced.
  • the storage device may perform the above-mentioned method 200 during the process of performing the data deletion operation.
  • the deleted data is equivalent to the invalid data described above.
  • the storage device recognizes that the address of the data to be deleted corresponds to a segment of the FTL entry, then the FTL level-1 table of the segment can no longer be stored or updated, and the FTL level-2 of the segment can be stored or updated.
  • the table entry is identified, and the identification method is shown in Figure 5.
  • the above method can be applied to scenarios where a large number of continuous spaces are deleted, such as APP uninstallation, video, picture deletion, and the like.
  • deleting data it can be directly marked in the entry of the corresponding segment of the FTL secondary table, and there is no need to update the FTL primary table.
  • Executing the above-mentioned FTL reduction method 200 while performing the IO operation can reduce the number of times the storage device scans the NAND space and improve the efficiency of data reading and writing.
  • FIG. 6 is a data access method according to an embodiment of the present application. The data access process of the flash memory control method according to the embodiment of the present application is described below with reference to FIG. 6 .
  • the host issues a read IO command (data access command).
  • the storage device receives the read IO command from the host and starts to perform the data read operation.
  • the storage device queries an entry (entry) corresponding to the FTL secondary table corresponding to the target LBA.
  • step S430 determine whether the entry has a space reduction flag. If there is a space reduction flag, step S440 is performed, and if there is no space reduction flag, step S470 is performed.
  • the reduction flag includes a first flag, and the value of the first flag is a value for indicating fully contiguous data.
  • the reduction flag includes a third status flag bit, and the value of the third flag is a value for indicating all invalid data.
  • the reduction flag includes a second flag, and the value of the second flag is a value for indicating full-consecutive data or full-consecutive data.
  • the reduced flag includes a first pattern indicating all invalid data.
  • the entry includes a first flag, and the value of the first flag is 1, which determines that the segment corresponds to fully continuous data.
  • the entry includes a first flag, and the value of the first flag is 0, which determines that the segment corresponds to fully continuous data.
  • the entry includes a second flag, and the value of the second flag is 11, which determines that the segment corresponds to full continuous data.
  • step S450 is performed; if it is determined that the segment corresponds to not fully continuous data, step S460 is performed.
  • the starting PPN of the segment is obtained from the entry, and the corresponding offset is calculated.
  • the target logical block address of the target data is LBA 30, which is located in a section of the FTL table LBA 0-255. It is determined by the space reduction flag in the entry of LBA 0-255 of the secondary table that the segment corresponds to fully continuous data, and the starting PPN of the segment obtained from the entry is PPN 0. The PPN 0 points to page n of the NAND space.
  • the target logical block address is LBA 30, and the offset relative to the starting logical block address LBA 0 of the segment can be calculated as 30. Therefore, the target data can be read from page(n+30) of the NAND space.
  • step S440 there are two types of reduction flags for the entry of the FTL secondary table, which are respectively used to identify all continuous data and all invalid data.
  • whether it is all invalid data may be further determined according to the reduction flag.
  • the entry includes a third flag, and the value of the third flag is 1, which determines that the segment corresponds to all invalid data.
  • the entry includes a third flag, and the value of the third flag is 0, which determines that the segment corresponds to all invalid data.
  • the entry includes a second flag, and the value of the second flag is 10, which determines that the segment corresponds to all invalid data.
  • the entry includes a first pattern that determines that the segment corresponds to all invalid data.
  • the storage device can directly return invalid data to the host.
  • step S430 When it is determined in step S430 that there is no reduction flag in the entry of the secondary table of the address segment where the target LBA is located, the data is read according to the existing multi-level FTL table entry data reading method, according to the entry in the FTL secondary table. The location where the stored FTL first-level table is located to obtain the FTL first-level table.
  • FIG. 7 is a data writing method according to an embodiment of the present application. The following describes the data writing process of the flash memory control method according to the embodiment of the present application with reference to FIG. 7 .
  • the host issues a write IO command (data write command).
  • the storage device receives the write IO command from the host and starts to perform the data writing operation.
  • step S320 Determine whether the data to be written is fully continuous data.
  • the controller of the storage device will allocate a write address for the data to be written.
  • step S320 the storage device may determine whether the data to be written is fully continuous data according to the above method 200 according to the write address allocated by the controller.
  • step S330 is performed; when it is determined that the data to be written is not fully continuous data, step S340 is performed.
  • the storage device determines that the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table where the LBA where the data to be written is located is continuous, and can determine that the current data to be written is fully continuous data.
  • the storage device determines that the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table where the LBA where the data to be written is located is discontinuous, and can determine that the current data to be written is not fully continuous data.
  • the FTL first-level table of the currently written data may not be updated or saved, and the first entry of the corresponding FTL second-level table may be marked.
  • the corresponding FTL secondary entry includes the space reduction flag and the starting PPN. The identification method of the FTL secondary table entry is shown in FIG. 4 , which will not be repeated here.
  • the method for updating or establishing the FTL entry is the same as that in the prior art. In this case, both the FTL first-level table and the FTL second-level table need to be updated, which will not be repeated here.
  • the storage device writes the data to be written into the storage unit of the storage device to complete the data writing process.
  • log structured file systems (log structured file systems, LFS) can also be combined with the above-mentioned FTL entry processing method to further exert the effect of the above-mentioned FTL entry processing method.
  • LFS out-of-place update
  • LFS converts random IO writes into sequential writes, which makes it easier for data to meet the space reduction feature of the above-mentioned FTL entry processing method, which is conducive to better reduction of FTL entries and improves the hit rate of FTL entries.
  • FIG. 8 is a schematic diagram of a storage device according to an embodiment of the present application. As shown in FIG. 8 , the storage device in this embodiment of the present application includes a determination module 810 and an update module 820 .
  • the determining module 810 is configured to determine the module, configured to determine that the physical page numbers PPN corresponding to the logical block address LBA in the FTL level-1 table of the flash memory translation layer of the first segment are continuous.
  • the updating module 820 is configured to update the FTL level 2 table entry that will establish the first segment, where the FTL level 2 table entry of the first segment includes a space reduction flag.
  • the storage device 800 can be used to execute the above-mentioned FTL entry processing method 200, wherein the determination module 810 can implement the function of step S210 in the above-mentioned method; the updating module 820 can implement the above-mentioned method from steps S220 to S220 Features of the S230.
  • the determination module 810 can implement the function of step S210 in the above-mentioned method
  • the updating module 820 can implement the above-mentioned method from steps S220 to S220 Features of the S230.
  • FIG. 9 is a schematic diagram of another storage device according to an embodiment of the present application.
  • the storage device of the embodiment of the present application includes a flash memory controller 910 and a NAND flash memory 920 .
  • the flash controller 910 is used to control the operation of the storage device.
  • the flash memory controller 910 may further include: an interface (interface) 911, a central processing unit (central processing unit, CPU) 912, a static random access device (static random access memory, SRAM) 913 and a NAND controller 914.
  • the interface 911 is specifically used to connect to the host and perform data transmission with the host.
  • the data transmission can be performed by a UFS method, an embedded multimedia card (embedded multimedia card, EMMC) method, or a high-speed serial computer expansion bus (peripheral component interconnect express, PCIE) method equal to the host computer.
  • EMMC embedded multimedia card
  • PCIE peripheral component interconnect express
  • the CPU 912 is specifically used to control the data interaction between the various modules or components of the storage device 900.
  • the SRAM 913 is a random access (random access memory, RAM) space inside the flash memory controller 910, and can be specifically used to store FTL entries and data.
  • RAM random access memory
  • the NAND controller 914 is specifically used to control and manage the NANA flash memory 920 of the storage device 900 .
  • the above-mentioned storage device 900 is only an example of the storage device of the embodiment of the present application.
  • the storage device of the storage device may be other storage devices besides the above-mentioned NAND flash memory 920, and when the above-mentioned NAND flash memory 920 is For other storage devices, the NAND controller 914 may also be the controller of the corresponding storage device.
  • the storage device may further include other modules, or other units, or other components, which are not limited in this embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a flash memory control device 1000 according to an embodiment of the present application.
  • the flash memory control apparatus according to the embodiment of the present application includes a random access memory 1010 and a controller 1020 .
  • the random access memory 1010 is used to store the FTL secondary table.
  • the controller 1020 is used for data access control and data write control.
  • the controller 1020 is configured to receive a data access command sent by the host, where the data access command includes the target LBA of the target data, and the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous and the first When the entry corresponds to the valid data space, the target data is accessed according to the target LBA and the starting PPN in the first entry.
  • the controller 1020 may implement the functions of the various steps in the method 400 shown in FIG. 6 .
  • the controller 1020 can also be configured to receive a data write instruction sent by the host, where the data write instruction includes data to be written; assign a write address to the data to be written, and perform data write control on the data to be written .
  • the controller 1020 may implement the functions of each step in the method 300 shown in FIG. 7 .
  • the controller 1020 may also process the FTL entries in the random access memory 1010 during the idle period. In this case, the controller 1020 may implement the various steps in the method 200 shown in FIG. 2 . function.
  • the flash memory control apparatus 1000 in this embodiment of the present application is equivalent to the flash memory controller 910 in the storage device shown in FIG. 9 , and it should also be understood that the flash memory controller 910 shown in FIG. 9 is only the flash memory control device shown in FIG. 10 . A possible implementation manner of the device, which is not limited in this embodiment of the present application.
  • FIG. 11 is a schematic diagram of a data reading apparatus 1100 according to an embodiment of the present application. As shown in FIG. 11 , the data reading device 1100 includes a determination module 1110 and a reading module 1120 .
  • the determining module 1110 is configured to determine that the FTL secondary table entry of the first segment where the target LBA of the target data is located includes a space reduction flag, where the space reduction flag indicates that the PPN corresponding to the first segment is continuous.
  • the reading module 1120 is configured to read the target data according to the FTL secondary table entry of the first segment.
  • the data reading apparatus 1000 in this embodiment of the present application can be used to implement the above method 400.
  • the determination module 1110 can implement steps S420, S430 and S440 of the above method;
  • the reading module 1120 can implement steps S450 and S460 of the above method , S470 and S480.
  • the determining module 1110 and the reading module 1120 can implement steps S450 and S460 of the above method , S470 and S480.
  • the data reading apparatus 1000 can be applied to a storage device.
  • the functions of the determination module 1110 and the reading module 1120 may be implemented by the flash memory controller 910 or the flash memory control apparatus 1000 .
  • FIG. 12 is a schematic diagram of a data writing apparatus 1200 according to an embodiment of the present application. As shown in FIG. 12 , the data reading device 1200 includes a determining module 1210 , an updating module 1220 and a writing module 1230 .
  • the determining module 1210 is configured to determine that the data to be written is fully continuous data, and the PPNs of the FTL first-level table corresponding to the first segment where the LBA of the fully continuous data is located are continuous.
  • the updating module 1220 is configured to update or establish the FTL secondary table entry of the first segment, where the secondary table entry includes a space reduction flag.
  • the writing module 1230 is used for writing full continuous data.
  • the data reading apparatus 1200 in this embodiment of the present application can be used to implement the above method 300.
  • the determination module 1210 can implement step S320 of the above method;
  • the update module 1220 can implement steps S330 and S340 of the above method;
  • the writing module 1230 It can be used to implement step S350 of the above method.
  • the determining module 1210, the updating module 1220, and the writing module 1230 reference may be made to the descriptions of the above methods, which are not repeated here for brevity.
  • the data reading apparatus 1200 can be applied to a storage device.
  • the functions of the determining module 1210 , the updating module 1220 and the writing module 1230 may be implemented by the flash memory controller 910 or the flash memory control apparatus 1000 .
  • Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction), when it runs on the flash memory control device, so that the flash memory control device executes the above implementation Example of flash control method.
  • a computer program also referred to as code, or instruction
  • Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction) when it runs on a storage device, causing the storage device to execute the above-mentioned embodiments.
  • a computer program also referred to as code, or instruction
  • Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction) when it runs on a storage device, causing the storage device to execute the above-mentioned embodiments. data read method.
  • a computer program also referred to as code, or instruction
  • Embodiments of the present application also provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction), when it runs on a storage device, to cause a computer to execute the above-mentioned embodiments.
  • a computer program also referred to as code, or instruction
  • Data write method when it runs on a storage device, to cause a computer to execute the above-mentioned embodiments.
  • An embodiment of the present application also provides a chip system, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the flash memory control device installed with the chip system The flash memory control method in the above embodiment is executed.
  • the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
  • An embodiment of the present application further provides a chip system, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a storage device installed with the chip system executes the The FTL table entry processing method in the above embodiment.
  • the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
  • An embodiment of the present application further provides a chip system, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a storage device installed with the chip system executes the The data reading and/or data writing methods in the above embodiments.
  • the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist physically alone, or two or more modules may be integrated in one unit.

Abstract

The present application provides a flash memory control method and device, the device comprising: a random access memory for storing a flash translation layer (FTL) secondary table; and a controller for receiving a data access instruction sent by a host machine, the data access instruction comprising a target logical block address (LBA) of target data. Physical page numbers (PPN) corresponding to an LBA segment indicated by a first entry of the FTL secondary table are continuous. If the first entry corresponds to a valid data space, the target data is accessed according to the target LBA and a beginning PPN in the first entry, the beginning PPN being a PPN corresponding to the first LBA in the LBA segment indicated by the first entry. The flash memory control device can directly access the target data using information in the FTL secondary table, does not require an FTL primary table to be loaded and replaced, and improves data access efficiency.

Description

闪存控制方法和装置Flash memory control method and device 技术领域technical field
本申请涉及存储技术领域,尤其涉及一种闪存控制方法和装置。The present application relates to the field of storage technologies, and in particular, to a flash memory control method and device.
背景技术Background technique
在通用闪存存储(universal flash storage,UFS)、嵌入式多媒体卡(embedded multi-media card,eMMC)或者消费类固态硬盘(solid state disk,SSD)中,NAND闪存的具有特殊的物理性质,例如需要以块为粒度进行擦除,并且每个块有擦除次数的限制。因此,需要通过闪存转换层(flash translation layer,FTL)表项来维护逻辑块地址(logical block address,LBA)和物理页号(physical page number,PPN)的映射关系,使其达到磨损均衡的目的。In universal flash storage (UFS), embedded multi-media card (eMMC), or consumer solid state disk (SSD), NAND flash memory has special physical properties, such as requiring Erasing is done at block granularity, and each block has a limit on the number of erasures. Therefore, it is necessary to maintain the mapping relationship between the logical block address (LBA) and the physical page number (PPN) through the flash translation layer (FTL) table entry, so as to achieve the purpose of wear leveling .
UFS、eMMC和消费类SSD由于控制器片内静态随机存储器(static random access memory,SRAM)容量较小,无法容纳完整的FTL表项,因此FTL采用多级映射方式,在SRAM中只能缓存部分FTL一级表项。当缓存的FTL一级表项不命中时,需要从NAND中加载和替换合适的FTL一级表。UFS, eMMC and consumer SSDs cannot accommodate complete FTL entries due to the small capacity of the on-chip static random access memory (SRAM) of the controller. Therefore, FTL adopts a multi-level mapping method and can only cache part of the SRAM. FTL first-level entry. When the cached FTL first-level table entry misses, the appropriate FTL first-level table needs to be loaded and replaced from the NAND.
FTL一级表项的加载和替换导致读写延时变大,降低了系统性能,影响用户体验。The loading and replacement of FTL first-level entries increases read and write latency, reduces system performance, and affects user experience.
发明内容SUMMARY OF THE INVENTION
本申请提供一种闪存控制方法和装置,可以通过闪存转换层(flash translation layer,FTL)二级表的信息直接访问目标数据,无需加载和替换FTL一级表,提高了数据访问的效率。The present application provides a method and device for controlling a flash memory, which can directly access target data through the information of the second-level table of the flash translation layer (FTL) without loading and replacing the first-level table of the FTL, thereby improving the efficiency of data access.
第一方面,提供了一种闪存控制装置,包括:随机存储器,用于存储FTL二级表;控制器,用于接收主机发送的数据访问指令,数据访问指令包括目标数据的目标逻辑块地址(logical block address,LBA);在FTL二级表的第一条目指示的LBA地址段对应的物理页号(physical page number,PPN)连续,并且所述第一条目对应有效数据空间的情况下,根据目标LBA和第一条目中的起始PPN访问目标数据,起始PPN是第一条目指示的LBA地址段中第一个LBA对应的PPN。In a first aspect, a flash memory control device is provided, comprising: a random access memory for storing an FTL secondary table; a controller for receiving a data access instruction sent by a host, where the data access instruction includes a target logical block address ( logical block address, LBA); when the physical page number (physical page number, PPN) corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous, and the first entry corresponds to the valid data space , the target data is accessed according to the target LBA and the starting PPN in the first entry, where the starting PPN is the PPN corresponding to the first LBA in the LBA address segment indicated by the first entry.
当第一条目指示的LBA地址段对应的PPN连续时,第一条目中包括起始PPN,控制器可以根据目标数据的目标LBA和第一条目中起始PPN的信息,对目标数据进行访问控制,无需再加载和替换FTL一级表,避免了因FTL一级表的加载和替换导致的访问延时,提高了数据访问的效率,提升了系统性能。When the PPNs corresponding to the LBA address segment indicated by the first entry are consecutive, the first entry includes the starting PPN, and the controller may, according to the target LBA of the target data and the information of the starting PPN in the first entry, perform an update on the target data. For access control, there is no need to load and replace FTL first-level tables, which avoids the access delay caused by the loading and replacement of FTL first-level tables, improves the efficiency of data access, and improves system performance.
在一种可能的实现方式中,在FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且第一条目对应无效数据空间的情况下,控制器还用于:向主机发送指示信息,指示信息用于指示所述数据访问无效。In a possible implementation manner, when the physical page numbers PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table are consecutive, and the first entry corresponds to the invalid data space, the controller further uses : Send indication information to the host, where the indication information is used to indicate that the data access is invalid.
当第一条目对应无效数据空间的情况下,控制器可以直接向主机返回数据访问无效的信息,无需再加载第一条目对应的FTL一级表进行判断,提高了数据访问的效率。When the first entry corresponds to an invalid data space, the controller can directly return invalid data access information to the host without loading the FTL first-level table corresponding to the first entry for judgment, which improves the efficiency of data access.
在另一种可能的实现方式中,控制器具体用于:获取目标LBA的偏移,目标LBA的偏移是目标LBA与第一条目指示的LBA地址段中的第一个LBA的差;根据偏移和所述起始PPN,访问所述目标数据。In another possible implementation manner, the controller is specifically configured to: obtain the offset of the target LBA, where the offset of the target LBA is the difference between the target LBA and the first LBA in the LBA address segment indicated by the first entry; The target data is accessed based on the offset and the starting PPN.
在另一种可能的实现方式中,控制器具体用于:根据偏移和起始PPN,确定目标数据的目标LBA对应的目标PPN,目标PPN是起始PPN与所述偏移的和;根据所述目标PPN访问目标数据。In another possible implementation manner, the controller is specifically configured to: determine the target PPN corresponding to the target LBA of the target data according to the offset and the starting PPN, where the target PPN is the sum of the starting PPN and the offset; The target PPN accesses target data.
在上述技术方案中,根据第一条目中的起始PPN和目标LBA,可以通过简单的计算得到目标LBA对应的目标PPN从而访问目标数据,提高了数据访问的效率。In the above technical solution, according to the starting PPN and the target LBA in the first item, the target PPN corresponding to the target LBA can be obtained through simple calculation, so as to access the target data, which improves the efficiency of data access.
在另一种可能的实现方式中,控制器还用于:接收主机发送的数据写入指令,数据写入指令包括待写入数据;为待写入数据分配写入地址;对待写入数据进行数据写入控制。In another possible implementation manner, the controller is further configured to: receive a data write instruction sent by the host, where the data write instruction includes the data to be written; assign a write address to the data to be written; Data write control.
在另一种可能的实现方式中,控制器具体用于:确定写入地址所在的第一条目指示的LBA地址段对应的PPN连续;在第一条目中记录所述起始PPN。In another possible implementation manner, the controller is specifically configured to: determine that the PPNs corresponding to the LBA address segment indicated by the first entry where the write address is located are continuous; and record the starting PPN in the first entry.
在进行数据访问控制时,对于PPN连续的第一条目,可以在第一条目中记录起始PPN,便于后续的数据访问。When performing data access control, for the first consecutive entry of the PPN, the starting PPN may be recorded in the first entry to facilitate subsequent data access.
在另一种可能的实现方式中,第一条目中包括空间缩减标志,空间缩减标志用于指示第一条目对应有效数据空间,或者空间缩减标志用于指示第一条目对应无效数据空间。In another possible implementation manner, the first entry includes a space reduction flag, and the space reduction flag is used to indicate that the first entry corresponds to valid data space, or the space reduction flag is used to indicate that the first entry corresponds to invalid data space .
控制器可以根据第一条目中的空间缩减标志确定该第一条目对应有效数据空间或者第一条目对应无效数据空间,从而根据主机的指令进行合适的数据访问控制。The controller may determine that the first entry corresponds to the valid data space or the first entry corresponds to the invalid data space according to the space reduction flag in the first entry, so as to perform appropriate data access control according to the instruction of the host.
第二方面,提供了一种闪存控制方法,包括:接收主机发送的数据访问指令,数据访问指令包括目标数据的目标逻辑块地址LBA;在FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且所述第一条目对应有效数据空间的情况下,根据目标LBA和第一条目中的起始PPN访问目标数据,起始PPN是第一条目指示的LBA地址段中第一个LBA对应的PPN。In a second aspect, a flash memory control method is provided, comprising: receiving a data access command sent by a host, where the data access command includes a target logical block address LBA of target data; the LBA address segment indicated by the first entry of the FTL secondary table When the corresponding physical page number PPN is continuous, and the first entry corresponds to the valid data space, the target data is accessed according to the target LBA and the starting PPN in the first entry, and the starting PPN is indicated by the first entry. The PPN corresponding to the first LBA in the LBA address segment.
当第一条目指示的LBA地址段对应的PPN连续时,第一条目中包括起始PPN,控制器可以根据目标数据的目标LBA和第一条目中起始PPN的信息,对目标数据进行访问控制,无需再加载和替换FTL一级表,避免了因FTL一级表的加载和替换导致的访问延时,提高了数据访问的效率,提升了系统性能。When the PPNs corresponding to the LBA address segment indicated by the first entry are consecutive, the first entry includes the starting PPN, and the controller may, according to the target LBA of the target data and the information of the starting PPN in the first entry, perform an update on the target data. For access control, there is no need to load and replace FTL first-level tables, which avoids the access delay caused by the loading and replacement of FTL first-level tables, improves the efficiency of data access, and improves system performance.
在一种可能的实现方式中,在FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且第一条目对应无效数据空间的情况下,该方法还包括:向主机发送指示信息,指示信息用于指示所述数据访问无效。In a possible implementation manner, when the physical page numbers PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table are consecutive, and the first entry corresponds to the invalid data space, the method further includes: Sending indication information to the host, where the indication information is used to indicate that the data access is invalid.
当第一条目对应无效数据空间的情况下,闪存控制器可以直接向主机返回数据访问无效的信息,无需再加载第一条目对应的FTL一级表进行判断,提高了数据访问的效率。When the first entry corresponds to an invalid data space, the flash controller can directly return the information that the data access is invalid to the host, without loading the FTL first-level table corresponding to the first entry for judgment, which improves the efficiency of data access.
在另一种可能的实现方式中,根据目标LBA和第一条目中的起始PPN访问目标数据包括:获取目标LBA的偏移,目标LBA的偏移是目标LBA与第一条目指示的LBA地址段中的第一个LBA的差;根据偏移和所述起始PPN,访问目标数据。In another possible implementation manner, accessing the target data according to the target LBA and the starting PPN in the first entry includes: obtaining an offset of the target LBA, where the offset of the target LBA is indicated by the target LBA and the first entry The difference of the first LBA in the LBA address segment; according to the offset and the starting PPN, the target data is accessed.
在另一种可能的实现方式中,根据偏移和起始PPN访问目标数据包括:根据偏移和起始PPN,确定目标数据的目标LBA对应的目标PPN,目标PPN是起始PPN与偏移的和;根据目标PPN访问目标数据。In another possible implementation manner, accessing the target data according to the offset and the starting PPN includes: determining a target PPN corresponding to the target LBA of the target data according to the offset and the starting PPN, where the target PPN is the starting PPN and the offset and ; access target data according to the target PPN.
在上述技术方案中,根据第一条目中的起始PPN和目标LBA,可以通过简单的计算 得到目标LBA对应的目标PPN从而访问目标数据,提高了数据访问的效率。In the above technical solution, according to the starting PPN and the target LBA in the first item, the target PPN corresponding to the target LBA can be obtained through simple calculation, thereby accessing the target data, which improves the efficiency of data access.
在另一种可能的实现方式中,该方法还包括:接收主机发送的数据写入指令,数据写入指令包括待写入数据;为待写入数据分配写入地址;对待写入数据进行数据写入控制。In another possible implementation manner, the method further includes: receiving a data write instruction sent by the host, where the data write instruction includes data to be written; assigning a write address to the data to be written; Write control.
在另一种可能的实现方式中,对待写入数据进行数据写入控制包括:确定写入地址所在的第一条目指示的LBA地址段对应的PPN连续;在第一条目中记录所述起始PPN。In another possible implementation manner, performing data write control on the data to be written includes: determining that the PPN corresponding to the LBA address segment indicated by the first entry where the write address is located is continuous; recording the first entry Start PPN.
在进行数据访问控制时,对于PPN连续的第一条目,可以在第一条目中记录起始PPN,便于后续的数据访问。When performing data access control, for the first consecutive entry of the PPN, the starting PPN may be recorded in the first entry to facilitate subsequent data access.
在另一种可能的实现方式中,第一条目中包括空间缩减标志,空间缩减标志用于指示第一条目对应有效数据空间,或者空间缩减标志用于指示第一条目对应无效数据空间。In another possible implementation manner, the first entry includes a space reduction flag, and the space reduction flag is used to indicate that the first entry corresponds to valid data space, or the space reduction flag is used to indicate that the first entry corresponds to invalid data space .
控制器可以根据第一条目中的空间缩减标志确定该第一条目对应有效数据空间或者第一条目对应无效数据空间,从而根据主机的指令进行合适的数据访问控制。The controller may determine that the first entry corresponds to the valid data space or the first entry corresponds to the invalid data space according to the space reduction flag in the first entry, so as to perform appropriate data access control according to the instruction of the host.
第三方面,提供了一种FTL表项处理方法,包括:存储设备确定第一段的FTL一级表中的逻辑块地址对应的物理页号连续;更新或建立第一段的FTL二级表条目,该第一段的FTL二级表条目包括空间缩减标志。In a third aspect, a method for processing an FTL table entry is provided, comprising: a storage device determining that the physical page numbers corresponding to the logical block addresses in the FTL level-1 table of the first segment are consecutive; updating or establishing the FTL level-2 table of the first segment entry, the FTL secondary table entry for this first segment includes the space reduction flag.
对于一段的PPN连续的数据,存储设备可以不存储该段的FTL一级表,直接在该段的FTL二级表的条目中进行标识,减少了FTL一级表项占用的存储空间。并且,在这种情况下,带有空间缩减标志的FTL二级表条目隐含了该段的FTL一级表的信息,一定程度上提高了存储设备FTL表项的命中率。For a segment of PPN continuous data, the storage device may not store the FTL level-1 table of the segment, but directly mark it in the entry of the FTL level-2 table of the segment, which reduces the storage space occupied by the FTL level-1 entry. Moreover, in this case, the FTL second-level table entry with the space reduction flag implies the information of the FTL first-level table of the segment, which improves the hit rate of the FTL table entry of the storage device to a certain extent.
在一种可能的实现方式中,第一段对应全连续数据,或者第一段对应全无效数据。In a possible implementation manner, the first segment corresponds to all continuous data, or the first segment corresponds to all invalid data.
在另一种可能的实现方式中,第一段对应全连续数据,第一段的FTL二级表条目包括:第一段的起始PPN,该起始PPN是所述第一段的第一个LBA对应的PPN。In another possible implementation manner, the first segment corresponds to fully continuous data, and the FTL secondary table entry of the first segment includes: a start PPN of the first segment, where the start PPN is the first segment of the first segment The PPN corresponding to each LBA.
对于全连续数据,在对应段的FTL二级表的条目中存储该段的起始PPN,在执行数据读取的操作时,可以直接根据LBA偏移量和起始PPN获取目标数据,提高了FTL表项的命中率,提高了数据访问的效率。For fully continuous data, the starting PPN of the segment is stored in the entry of the FTL secondary table of the corresponding segment. When performing the data read operation, the target data can be obtained directly according to the LBA offset and the starting PPN, which improves the The hit rate of FTL entries improves the efficiency of data access.
在另一种可能的实现方式中,空间缩减标志包括第一标志,第一标志包括一个比特,第一标志的值指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第一未定义状态用于指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
在上述方案中,可以用新定义的标志位作为空间缩减标志,也可以用已有的标志位的未定义状态作为空间缩减标志,可以根据实际情况灵活选用空间缩减标志。In the above solution, the newly defined flag bit can be used as the space reduction flag, or the undefined state of the existing flag bit can be used as the space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第二未定义状态用于指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the second undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,空间缩减标志包括第三标志,第三标志包括一个比特,第三标志的值指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a third flag, the third flag includes a bit, the value of the third flag indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第一模式,第一模式指示所述第一段对应全无效数据,并且所述第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first mode, the first mode indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在上述方案中,可以用新定义的标志位或者新的模式作为空间缩减标志,也可以用已 有的标志位的未定义状态作为空间缩减标志,可以根据实际情况灵活选用空间缩减标志。In the above scheme, a newly defined flag bit or a new mode can be used as the space reduction flag, or the undefined state of the existing flag bit can be used as the space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
在另一种可能的实现方式中,该FTL表项处理方法在存储设备进行输入输出IO操作时执行。In another possible implementation manner, the FTL entry processing method is executed when the storage device performs an input/output IO operation.
在另一种可能的实现方式中,该FTL表项处理方法在存储设备的空闲时段执行。In another possible implementation manner, the FTL entry processing method is executed during an idle period of the storage device.
对FTL表项的处理既可以在IO操作时执行,也可以在存储设备的空闲时段执行,提高了存储设备的工作效率。The processing of the FTL table entry can be performed during the IO operation or during the idle period of the storage device, which improves the work efficiency of the storage device.
第四方面,提供一种数据读取方法,包括:确定目标数据的目标逻辑块地址LBA所在段的闪存转换层FTL二级表条目包括空间缩减标志,空间缩减标志指示所述第一段对应的物理页号PPN连续;根据目标LBA所在的第一段的FTL二级表条目,读取目标数据。In a fourth aspect, a method for reading data is provided, comprising: determining that the flash memory translation layer FTL secondary table entry of the segment where the target logical block address LBA of the target data is located includes a space reduction flag, and the space reduction flag indicates the corresponding first segment. The physical page number PPN is continuous; the target data is read according to the FTL secondary table entry of the first segment where the target LBA is located.
在读取数据时,可以先查看目标段的FTL二级表的条目,当该段的二级表条目中包括空间缩减标志时,可以直接根据该段的二级表条目获取目标数据,无需加载该段的FTL一级表,提高了FTL表项的命中率,提高了数据读取的效率。When reading data, you can first check the entry of the FTL secondary table of the target segment. When the secondary table entry of the segment includes the space reduction flag, the target data can be obtained directly from the secondary table entry of the segment without loading. The FTL first-level table of this segment improves the hit rate of the FTL table entry and improves the efficiency of data reading.
在一种可能的实现方式中,空间缩减标志包括第一标志,第一标志包括一个比特,第一标志的值指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In a possible implementation manner, the space reduction flag includes a first flag, the first flag includes one bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第一未定义状态用于指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,第一段的FTL二级表条目包括:第一段的起始PPN,起始PPN是第一段的第一个LBA对应的PPN。In another possible implementation manner, the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, and the starting PPN is the PPN corresponding to the first LBA of the first segment.
在另一种可能的实现方式中,根据所述目标LBA所在的第一段的FTL二级表条目,读取目标数据,包括:获取所述目标LBA的偏移;根据所述偏移和所述起始PPN,读取所述目标数据。In another possible implementation manner, reading the target data according to the FTL secondary table entry of the first segment where the target LBA is located includes: acquiring the offset of the target LBA; The starting PPN is used, and the target data is read.
在上述方案中,根据目标LBA所在的第一段的FTL二级表条目的空间缩减标志可以确定目标数据对应全连续数据,在这种情况下可以直接根据该段的起始PPN和相应的偏移获取目标数据,不需要再获取该段的FTL一级表,提高了数据读取的效率。In the above solution, it can be determined that the target data corresponds to fully continuous data according to the space reduction flag of the FTL secondary table entry of the first segment where the target LBA is located. In this case, the starting PPN of the segment and the corresponding partial It is not necessary to obtain the FTL first-level table of the segment by moving to obtain the target data, which improves the efficiency of data reading.
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第二未定义状态用于指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the second undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,空间缩减标志包括第三标志,第三标志包括一个比特,第三标志的值指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a third flag, the third flag includes a bit, the value of the third flag indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第一模式,第一模式指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first mode, the first mode indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,根据所述目标LBA所在的第一段的FTL二级表条目,读取目标数据,包括:向主机返回无效数据。In another possible implementation manner, reading the target data according to the FTL secondary table entry of the first segment where the target LBA is located includes: returning invalid data to the host.
在读取数据时,根据目标LBA所在的第一段的FTL二级表条目的空间缩减标志,可以直接确定该段对应的是全无效数据,因此可以直接向主机返回全无效数据,无需在根据FTL一级表获取目标LBA的PPN,提高了数据读取的效率。When reading data, according to the space reduction flag of the FTL secondary table entry of the first segment where the target LBA is located, it can be directly determined that this segment corresponds to all invalid data, so all invalid data can be directly returned to the host without needing to The FTL first-level table obtains the PPN of the target LBA, which improves the efficiency of data reading.
第五方面,提供了一种数据写入方法,包括:确定待写入数据是全连续数据,该全连续数据的逻辑块地址LBA所在的第一段的闪存转换层FTL一级表中的物理页号PPN连 续;更新或建立所述第一段的FTL二级表条目,所述第一段的FTL二级表条目包括空间缩减标志;写入该全连续数据。A fifth aspect provides a data writing method, comprising: determining that the data to be written is fully contiguous data, and the physical data in the first segment of the flash memory translation layer FTL first-level table where the logical block address LBA of the fully contiguous data is located. The page number PPN is continuous; the FTL secondary table entry of the first segment is updated or established, and the FTL secondary table entry of the first segment includes a space reduction flag; and the fully continuous data is written.
在写入数据时,当确定待写入的数据是全连续数据时,可以直接更新该段的FTL二级表的条目,并且在该段的FTL二级表条目中包括了空间缩减标志,无需再建立或者更新FTL一级表,减少了FTL表项占用的存储空间,也便于数据的读取。When writing data, when it is determined that the data to be written is fully continuous data, the entry of the FTL secondary table of the segment can be directly updated, and the space reduction flag is included in the FTL secondary table entry of the segment, without the need for The FTL first-level table is then established or updated, which reduces the storage space occupied by the FTL table entry and facilitates the reading of data.
在另一种可能的实现方式中,空间缩减标志包括第一标志,第一标志包括一个比特,第一标志的值指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第一未定义状态用于指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,第一段的FTL二级表条目包括:第一段的起始PPN,起始PPN是第一段的第一个LBA对应的PPN。In another possible implementation manner, the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, where the starting PPN is the PPN corresponding to the first LBA of the first segment.
第六方面,提供了一种存储设备,包括:确定模块,用于确定第一段的闪存转换层FTL一级表中的逻辑块地址LBA对应的物理页号PPN连续;更新模块,用于更新或建立第一段的FTL二级表条目,第一段的FTL二级表条目包括空间缩减标志。In a sixth aspect, a storage device is provided, comprising: a determination module for determining that the physical page number PPN corresponding to the logical block address LBA in the first-stage flash memory translation layer FTL level table is continuous; an update module for updating Or create an FTL secondary table entry for the first segment, where the FTL secondary table entry for the first segment includes a space reduction flag.
对于一段的PPN连续的数据,存储设备可以不存储该段的FTL一级表,直接在该段的FTL二级表的条目中进行标识,减少了FTL一级表项占用的存储空间。并且,在这种情况下,带有空间缩减标志的FTL二级表条目隐含了该段的FTL一级表的信息,一定程度上提高了存储设备FTL表项的命中率。For a segment of PPN continuous data, the storage device may not store the FTL level-1 table of the segment, but directly mark it in the entry of the FTL level-2 table of the segment, which reduces the storage space occupied by the FTL level-1 entry. Moreover, in this case, the FTL second-level table entry with the space reduction flag implies the information of the FTL first-level table of the segment, which improves the hit rate of the FTL table entry of the storage device to a certain extent.
在一种可能的实现方式中,确定模块具体用于确定第一段对应全连续数据,或者确定第一段对应全无效数据。In a possible implementation manner, the determining module is specifically configured to determine that the first segment corresponds to all continuous data, or to determine that the first segment corresponds to all invalid data.
在另一种可能的实现方式中,确定模块确定所述第一段对应全连续数据;第一段的FTL二级表条目包括:第一段的起始PPN,该起始PPN是第一段的第一个LBA对应的PPN。In another possible implementation manner, the determining module determines that the first segment corresponds to fully continuous data; the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, where the starting PPN is the first segment The first LBA corresponds to the PPN.
对于全连续数据,在对应段的FTL二级表的条目中存储该段的起始PPN,在执行数据读取的操作时,可以直接根据LBA偏移量和起始PPN获取目标数据,提高了FTL表项的命中率,提高了数据访问的效率。For fully continuous data, the starting PPN of the segment is stored in the entry of the FTL secondary table of the corresponding segment. When performing the data read operation, the target data can be obtained directly according to the LBA offset and the starting PPN, which improves the The hit rate of FTL entries improves the efficiency of data access.
在另一种可能的实现方式中,空间缩减标志包括第一标志,第一标志包括一个比特,第一标志的值指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第一未定义状态用于指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
在上述方案中,可以用新定义的标志位作为空间缩减标志,也可以用已有的标志位的未定义状态作为空间缩减标志,可以根据实际情况灵活选用空间缩减标志。In the above solution, the newly defined flag bit can be used as the space reduction flag, or the undefined state of the existing flag bit can be used as the space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
在另一种可能的实现方式中,确定模块确定第一段对应全无效数据;空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第二未定义状态用于指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the determining module determines that the first segment corresponds to all invalid data; the space reduction flag includes a second flag, the second flag includes a plurality of bits, and the second non-valid data among the multiple states indicated by the second flag The definition state is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,确定模块确定第一段对应全无效数据;空间缩减标志包括第三标志,第三标志包括一个比特,第三标志的值指示第一段对应全无效数据,并且第 一段的FTL表项进行了缩减。In another possible implementation manner, the determining module determines that the first segment corresponds to all invalid data; the space reduction flag includes a third flag, the third flag includes one bit, and the value of the third flag indicates that the first segment corresponds to all invalid data, And the FTL entry of the first paragraph is reduced.
在另一种可能的实现方式中,确定模块确定第一段对应全无效数据;空间缩减标志包括第一模式,第一模式指示所述第一段对应全无效数据,并且所述第一段的FTL表项进行了缩减。In another possible implementation manner, the determining module determines that the first segment corresponds to all invalid data; the space reduction flag includes a first mode, the first mode indicates that the first segment corresponds to all invalid data, and the first segment corresponds to all invalid data. FTL entries have been reduced.
在上述方案中,可以用新定义的标志位或者新的模式作为空间缩减标志,也可以用已有的标志位的未定义状态作为空间缩减标志,可以根据实际情况灵活选用空间缩减标志。In the above solution, a newly defined flag bit or a new mode can be used as a space reduction flag, or an undefined state of an existing flag bit can be used as a space reduction flag, and the space reduction flag can be flexibly selected according to the actual situation.
第七方面,提供了一种数据读取装置,该数据读取装置应用于存储设备中,该装置包括:确定模块,用于确定目标数据的目标逻辑块地址LBA所在的第一段的闪存转换层FTL二级表条目包括空间缩减标志,空间缩减标志指示所述第一段对应的物理页号PPN连续;读取模块,用于根据第一段的FTL二级表条目,读取目标数据。In a seventh aspect, a data reading device is provided, the data reading device is applied to a storage device, and the device includes: a determining module for determining the flash memory conversion of the first segment where the target logical block address LBA of the target data is located The layer FTL secondary table entry includes a space reduction flag indicating that the physical page number PPN corresponding to the first segment is continuous; the reading module is configured to read target data according to the FTL secondary table entry of the first segment.
在读取数据时,可以先查看目标段的FTL二级表的条目,当该段的二级表条目中包括空间缩减标志时,可以直接根据该段的二级表条目获取目标数据,无需加载该段的FTL一级表,提高了FTL表项的命中率,提高了数据读取的效率。When reading data, you can first check the entry of the FTL secondary table of the target segment. When the secondary table entry of the segment includes the space reduction flag, the target data can be obtained directly from the secondary table entry of the segment without loading. The FTL first-level table of this segment improves the hit rate of the FTL table entry and improves the efficiency of data reading.
在一种可能的实现方式中,空间缩减标志包括第一标志,第一标志包括一个比特,第一标志的值指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In a possible implementation manner, the space reduction flag includes a first flag, the first flag includes one bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第一未定义状态用于指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,第一段的FTL二级表条目包括:第一段的起始PPN,起始PPN是第一段的第一个LBA对应的PPN。In another possible implementation manner, the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, and the starting PPN is the PPN corresponding to the first LBA of the first segment.
在另一种可能的实现方式中,该装置还包括:获取模块,用于获取目标LBA的偏移;读取模块具体用于根据偏移和起始PPN,读取目标数据。In another possible implementation manner, the apparatus further includes: an obtaining module, configured to obtain the offset of the target LBA; and the reading module is specifically configured to read the target data according to the offset and the starting PPN.
在上述方案中,根据目标LBA所在的第一段的FTL二级表条目的空间缩减标志可以确定目标数据对应全连续数据,在这种情况下可以直接根据该段的起始PPN和相应的偏移获取目标数据,不需要再获取该段的FTL一级表,提高了数据读取的效率。In the above solution, it can be determined that the target data corresponds to fully continuous data according to the space reduction flag of the FTL secondary table entry of the first segment where the target LBA is located. In this case, the starting PPN of the segment and the corresponding partial It is not necessary to obtain the FTL first-level table of the segment by moving to obtain the target data, which improves the efficiency of data reading.
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第二未定义状态用于指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the second undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,空间缩减标志包括第三标志,第三标志包括一个比特,第三标志的值指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a third flag, the third flag includes a bit, the value of the third flag indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第一模式,第一模式指示第一段对应全无效数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first mode, the first mode indicates that the first segment corresponds to all invalid data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,读取模块具体用于向主机返回无效数据。In another possible implementation manner, the read module is specifically configured to return invalid data to the host.
在读取数据时,根据目标LBA所在的第一段的FTL二级表条目的空间缩减标志,可以直接确定该段对应的是全无效数据,因此可以直接向主机返回全无效数据,无需在根据FTL一级表获取目标LBA的PPN,提高了数据读取的效率。When reading data, according to the space reduction flag of the FTL secondary table entry of the first segment where the target LBA is located, it can be directly determined that this segment corresponds to all invalid data, so all invalid data can be directly returned to the host without needing to The FTL first-level table obtains the PPN of the target LBA, which improves the efficiency of data reading.
第八方面,提供了一种数据写入装置,该数据写入装置应用于存储设备中,该装置包括:确定模块,用于确定待写入数据是全连续数据,全连续数据的逻辑块地址LBA所在的第一段的闪存转换层FTL一级表中的物理页号PPN连续;更新模块,用于更新或建立 第一段的FTL二级表条目,第一段的FTL二级表条目包括空间缩减标志;写入模块,用于写入全连续数据。In an eighth aspect, a data writing device is provided, the data writing device is applied to a storage device, and the device includes: a determining module for determining that the data to be written is fully continuous data, the logical block address of the fully continuous data The physical page numbers PPN in the FTL first-level table of the flash conversion layer of the first segment where the LBA is located are consecutive; the update module is used to update or establish the FTL second-level table entry of the first segment, and the FTL second-level table entry of the first segment includes Space reduction flag; write module for writing fully contiguous data.
在写入数据时,当确定待写入的数据是全连续数据时,可以直接更新该段的FTL二级表的条目,并且在该段的FTL二级表条目中包括了空间缩减标志,无需再建立或者更新FTL一级表,减少了FTL表项占用的存储空间,也便于数据的读取。When writing data, when it is determined that the data to be written is fully continuous data, the entry of the FTL secondary table of the segment can be directly updated, and the space reduction flag is included in the FTL secondary table entry of the segment, without the need for The FTL first-level table is then established or updated, which reduces the storage space occupied by the FTL table entry and facilitates the reading of data.
在另一种可能的实现方式中,空间缩减标志包括第一标志,第一标志包括一个比特,第一标志的值指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a first flag, the first flag includes a bit, the value of the first flag indicates that the first segment corresponds to fully continuous data, and the FTL entry of the first segment is reduced .
在另一种可能的实现方式中,空间缩减标志包括第二标志,第二标志包括多个比特,第二标志指示的多个状态中的第一未定义状态用于指示第一段对应全连续数据,并且第一段的FTL表项进行了缩减。In another possible implementation manner, the space reduction flag includes a second flag, the second flag includes multiple bits, and the first undefined state among the multiple states indicated by the second flag is used to indicate that the first segment corresponds to full continuity data, and the FTL entry of the first segment is reduced.
在另一种可能的实现方式中,第一段的FTL二级表条目包括:第一段的起始PPN,起始PPN是第一段的第一个LBA对应的PPN。In another possible implementation manner, the FTL secondary table entry of the first segment includes: the starting PPN of the first segment, and the starting PPN is the PPN corresponding to the first LBA of the first segment.
第九方面,提供一种计算机可读介质,该计算机可读介质存储用于设备执行的程序代码,该程序代码包括用于执行第二方面或者第二方面的任意一种实现方式中的闪存控制方法。In a ninth aspect, a computer-readable medium is provided, where the computer-readable medium stores program codes for device execution, the program codes including flash memory control for executing the second aspect or any implementation manner of the second aspect method.
第十方面,提供一种计算机可读介质,该计算机可读介质存储用于设备执行的程序代码,该程序代码包括用于执行第三方面或者第三方面的任意一种实现方式中的FTL表项处理方法。In a tenth aspect, a computer-readable medium is provided, where the computer-readable medium stores program codes for device execution, the program codes including an FTL table for executing the third aspect or any implementation manner of the third aspect item processing method.
第十一方面,提供一种计算机可读介质,该计算机可读介质存储用于设备执行的程序代码,该程序代码包括用于执行第四方面或者第四方面的任意一种实现方式中的数据读取方法。In an eleventh aspect, a computer-readable medium is provided, and the computer-readable medium stores program code for execution by a device, the program code including data for executing the fourth aspect or any implementation manner of the fourth aspect read method.
第十二方面,提供一种计算机可读介质,该计算机可读介质存储用于设备执行的程序代码,该程序代码包括用于执行第五方面或者第五方面的任意一种实现方式中的数据写入方法。In a twelfth aspect, a computer-readable medium is provided, where the computer-readable medium stores program code for execution by a device, the program code including data for executing the fifth aspect or any implementation manner of the fifth aspect write method.
第十三方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当所述计算机程序代码在闪存控制装置上运行时,使得闪存控制装置执行第二方面或者第二方面的任意一种实现方式中的闪存控制方法。A thirteenth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code runs on the flash memory control device, the flash memory control device executes the second aspect or the second aspect. Flash memory control method in any implementation manner.
第十四方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当所述计算机程序代码在存储设备上运行时,使得存储设备执行第三方面或者第三方面的任意一种实现方式中的FTL表项处理方法。A fourteenth aspect provides a computer program product, the computer program product comprising: computer program code, which when the computer program code is executed on a storage device, causes the storage device to execute the third aspect or any one of the third aspects An FTL table entry processing method in an implementation manner.
第十五方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当所述计算机程序代码在存储设备上运行时,使得存储设备执行第四方面或者第四方面的任意一种实现方式中的数据读取方法。A fifteenth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a storage device, the storage device executes the fourth aspect or any one of the fourth aspect The data reading method in this implementation.
第十六方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当所述计算机程序代码在存储设备上运行时,使得存储设备执行第五方面或者第五方面的任意一种实现方式中的数据写入方法。A sixteenth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a storage device, the storage device executes the fifth aspect or any one of the fifth aspects The data writing method in this implementation.
第十七方面,提供一种芯片,该芯片包括处理器与数据接口,处理器通过所述数据接口读取存储器上存储的指令,执行上述第二方面或第二方面中的任意一种实现方式中的闪存控制方法。A seventeenth aspect provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes the second aspect or any implementation manner of the second aspect Flash control method in .
可选地,作为一种实现方式,该芯片还可以包括存储器,存储器中存储有指令,处理器用于执行存储器上存储的指令,当指令被执行时,处理器用于执行第二方面或者第二方面中的任意一种实现方式中的闪存控制方法。Optionally, as an implementation manner, the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the second aspect or the second aspect. The flash memory control method in any one of the implementations.
第十八方面,提供一种芯片,该芯片包括处理器与数据接口,处理器通过所述数据接口读取存储器上存储的指令,执行上述第三方面或第三方面中的任意一种实现方式中的FTL表项处理方法。In an eighteenth aspect, a chip is provided, the chip includes a processor and a data interface, the processor reads instructions stored in a memory through the data interface, and executes the third aspect or any one of the implementation manners of the third aspect. FTL entry processing method in .
可选地,作为一种实现方式,该芯片还可以包括存储器,存储器中存储有指令,处理器用于执行存储器上存储的指令,当指令被执行时,处理器用于执行第三方面或者第三方面中的任意一种实现方式中的FTL表项处理方法。Optionally, as an implementation manner, the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the third aspect or the third aspect. The FTL entry processing method in any one of the implementations.
第十九方面,提供一种芯片,该芯片包括处理器与数据接口,处理器通过所述数据接口读取存储器上存储的指令,执行上述第四方面或第四方面中的任意一种实现方式中的数据读取方法。A nineteenth aspect provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes any one of the fourth aspect or the fourth aspect. The data read method in .
可选地,作为一种实现方式,该芯片还可以包括存储器,存储器中存储有指令,处理器用于执行存储器上存储的指令,当指令被执行时,处理器用于执行第四方面或者第四方面中的任意一种实现方式中的数据读取方法。Optionally, as an implementation manner, the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the fourth aspect or the fourth aspect. The data reading method in any one of the implementations.
第二十方面,提供一种芯片,该芯片包括处理器与数据接口,处理器通过所述数据接口读取存储器上存储的指令,执行上述第五方面或第五方面中的任意一种实现方式中的数据写入方法。A twentieth aspect provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes any implementation manner of the fifth aspect or the fifth aspect The data write method in .
可选地,作为一种实现方式,该芯片还可以包括存储器,存储器中存储有指令,处理器用于执行存储器上存储的指令,当指令被执行时,处理器用于执行第五方面或者第五方面中的任意一种实现方式中的数据写入方法。Optionally, as an implementation manner, the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the fifth aspect or the fifth aspect. The data writing method in any one of the implementations.
第二十一方面,提供了一种装置,包括:处理器和存储器,存储器用于存储所述计算机程序代码,当所述计算机程序代码在所述处理器上运行时,使得该装置执行第三方面或者第三方面的任意一种实现方式中的FTL表项处理方法。In a twenty-first aspect, an apparatus is provided, comprising: a processor and a memory, where the memory is used to store the computer program code, when the computer program code is executed on the processor, the apparatus causes the apparatus to execute a third The FTL entry processing method in any one of the implementation manners of the aspect or the third aspect.
第二十二方面,提供了一种装置,包括:处理器和存储器,存储器用于存储所述计算机程序代码,当所述计算机程序代码在所述处理器上运行时,使得该装置执行第四方面或者第四方面的任意一种实现方式中的数据读取方法。In a twenty-second aspect, there is provided an apparatus, comprising: a processor and a memory, the memory is used for storing the computer program code, when the computer program code is executed on the processor, the apparatus causes the apparatus to execute the fourth The data reading method in the aspect or any one of the implementation manners of the fourth aspect.
第二十三方面,提供了一种装置,包括:处理器和存储器,存储器用于存储所述计算机程序代码,当所述计算机程序代码在所述处理器上运行时,使得该装置执行第五方面或者第五方面的任意一种实现方式中的数据写入方法。In a twenty-third aspect, an apparatus is provided, comprising: a processor and a memory, the memory is used to store the computer program code, when the computer program code is executed on the processor, the apparatus causes the apparatus to execute the fifth A data writing method in any one of the implementation manners of the aspect or the fifth aspect.
附图说明Description of drawings
图1是多级闪存转换层FTL表项的示意图;FIG. 1 is a schematic diagram of a multi-level flash memory translation layer FTL table entry;
图2是本申请一实施例的FTL表项处理方法的流程示意图;2 is a schematic flowchart of a method for processing an FTL entry according to an embodiment of the present application;
图3是本申请一实施例的FTL表项的示意图;3 is a schematic diagram of an FTL table entry according to an embodiment of the present application;
图4是本申请一实施例的全连续数据的FTL二级表条目示意图;4 is a schematic diagram of an FTL secondary table entry of full continuous data according to an embodiment of the present application;
图5是本申请一实施例的全无效数据的FTL二级表条目示意图;5 is a schematic diagram of an FTL secondary table entry of all invalid data according to an embodiment of the present application;
图6是本申请一实施例的数据访问控制的流程示意图;6 is a schematic flowchart of data access control according to an embodiment of the present application;
图7是本申请一实施例的数据写入控制的流程示意图;7 is a schematic flowchart of data write control according to an embodiment of the present application;
图8是本申请实施例的一种存储设备的示意图;8 is a schematic diagram of a storage device according to an embodiment of the present application;
图9是本申请实施例的另一种存储设备的示意图;9 is a schematic diagram of another storage device according to an embodiment of the present application;
图10是本申请实施例的一种闪存控制装置的示意图;FIG. 10 is a schematic diagram of a flash memory control device according to an embodiment of the present application;
图11是本申请实施例的一种数据读取装置的示意图;11 is a schematic diagram of a data reading device according to an embodiment of the present application;
图12是本申请实施例的一种数据写入装置的示意图。FIG. 12 is a schematic diagram of a data writing device according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。可以理解的是,所描述的实施例是本申请一部分的实施例,而不是全部的实施例。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. It is to be understood that the described embodiments are some, but not all, of the embodiments of the present application.
本申请实施例的技术方案可以应用于各种非易失性存储(non-volatile memory,NVM)产品,例如通用闪存存储(universal flash storage,UFS)、嵌入式多媒体卡(embedded multi-media card,eMMC)、固态硬盘(solid state disk,SSD)等。The technical solutions of the embodiments of the present application can be applied to various non-volatile memory (NVM) products, such as universal flash storage (UFS), embedded multi-media card (embedded multi-media card, eMMC), solid state disk (solid state disk, SSD), etc.
NAND是一种非易失性存储介质,NAND闪存需要以块为粒度进行擦除,擦除后的块可以写入新的数据,并且每个块有擦除次数的限制。在采用NAND闪存的存储设备中,由于NAND的物理特性约束,需要通过闪存转换层(flash translation layer,FTL)表项来维持逻辑块地址(logical block address,LBA)和物理页号(physical page number,PPN)的映射关系,以达到均衡NAND磨损的目的。通常情况下,FTL表的每个条目(entry)用4个字节(byte,B)来存放一个PPN,一个PPN对应4KB的地址空间,也就是说FTL表项消耗的空前为存储设备容量的1/1000。由于存储设备控制器的片内静态存储(static random access memory,SRAM)较小,无法容纳完整的FTL表项,因此FTL表一般采用多级映射的方式。NAND is a non-volatile storage medium. NAND flash memory needs to be erased on a block-by-block basis, and new data can be written to the erased blocks, and each block has a limit on the number of times of erasure. In a storage device using NAND flash memory, due to the physical characteristics of NAND, it is necessary to maintain the logical block address (LBA) and physical page number (physical page number) through the flash translation layer (FTL) table entry. , PPN) mapping relationship to achieve the purpose of balancing NAND wear. Under normal circumstances, each entry (entry) of the FTL table uses 4 bytes (byte, B) to store a PPN, and a PPN corresponds to a 4KB address space, which means that the FTL table entry consumes an unprecedented amount of storage device capacity. 1/1000. Because the on-chip static random access memory (SRAM) of the storage device controller is small and cannot accommodate the complete FTL table entry, the FTL table generally adopts a multi-level mapping method.
图1是多级FTL表的示意图。多级FTL表采用分割机制,将完整的地址空间等分成多个段(segment)。示例性地,每个段的大小可以是128、256、512等。FTL一级(level1)表直接对应LBA和PPN的转换关系。在FTL一级表中,每个条目(entry)指示了某个LBA对应的PPN。每一段的FTL一级表可以独立存储在NAND中。每一段FTL一级表对应了一个FTL二级(level 2)表的entry,二级表中的每个entry存储了该段的FTL一级表在NAND中的位置。Figure 1 is a schematic diagram of a multi-level FTL table. The multi-level FTL table uses a segmentation mechanism to equally divide the complete address space into multiple segments. Illustratively, the size of each segment may be 128, 256, 512, and so on. The FTL level 1 table directly corresponds to the conversion relationship between LBA and PPN. In the FTL first-level table, each entry (entry) indicates the PPN corresponding to a certain LBA. The FTL first-level table of each segment can be independently stored in NAND. Each segment of the FTL level-1 table corresponds to an entry of the FTL level-2 (level 2) table, and each entry in the level-2 table stores the position of the segment's FTL level-1 table in NAND.
例如,如图1所示,以段的大小为256为例(即每段的FTL一级表包括256个LBA和PPN的映射关系)。示例性地,对于LBA 0-255,在该段对的FTL一级表中,每个entry指示了该LBA对应的PPN,例如,第一个entry指示了逻辑块地址LAB 0对应的物理页号是PPN 0。该段对应了FTL二级表中的第一个entry,这个entry存放了LAB 0-255的FTL一级表在NAND中存放的位置。For example, as shown in FIG. 1 , the size of a segment is 256 as an example (that is, the FTL level-1 table of each segment includes 256 mapping relationships between LBAs and PPNs). Exemplarily, for LBA 0-255, in the FTL first-level table of the segment pair, each entry indicates the PPN corresponding to the LBA, for example, the first entry indicates the physical page number corresponding to the logical block address LAB 0. is PPN 0. This segment corresponds to the first entry in the FTL second-level table, which stores the location where the FTL first-level table of LAB 0-255 is stored in NAND.
多级FTL映射可以缓存部分FTL一级表项在SRAM中,当表项出现不命中时,需要去加载和替换,根据FTL二级表中存储的该段的FTL一级表在NAND中的位置,读取需要的FTL一级表,并在SRAM中换入当前需要访问的段。表项加载和替换会导致读写时延变大,导致性能降低,影响用户体验。Multi-level FTL mapping can cache some FTL first-level entries in SRAM. When an entry misses, it needs to be loaded and replaced. According to the location of the segment's FTL first-level table stored in the FTL second-level table in NAND , read the required FTL first-level table, and swap in the segment that needs to be accessed currently in the SRAM. Loading and replacing table items will increase the read and write latency, reduce performance, and affect user experience.
为了提升FTL表项的命中率,主要有两种方案。一种是提升存储设备控制器内部的SRAM空间,以增加控制器内可以存储的FTL一级表的数量,从而提升命中率。但是,扩大SRAM会增加控制器的成本,其收益有限。例如,对于容量为256G的存储设备,将 控制器SRAM从1MB增加到2MB,SRAM可存储的表项提升了一倍,但是表项可以覆盖的NAND的范围仅从1GB提升到2GB。而因为扩大SRAM将导致成本增加,以及存储设备的功耗增加。To improve the hit rate of FTL entries, there are two main solutions. One is to increase the SRAM space inside the storage device controller to increase the number of FTL first-level tables that can be stored in the controller, thereby increasing the hit rate. However, expanding the SRAM increases the cost of the controller, and its benefits are limited. For example, for a storage device with a capacity of 256G, increasing the controller SRAM from 1MB to 2MB doubles the entries that can be stored in the SRAM, but the range of NAND that can be covered by an entry is only increased from 1GB to 2GB. And because expanding the SRAM will lead to increased cost, as well as increased power consumption of the storage device.
另一种方案是在主机内存(host memory)中开辟一段空间,例如使用主机性能增强器(host performance booster,HPB),作为存储设备的FTL表项缓存。当需要读写数据时,直接将HPB缓存上的PPN地址信息发送给存储设备。并且,当表项发生更新时,主机从存储设备获取最新的表项。Another solution is to open up a space in the host memory (host memory), such as using a host performance booster (HPB), as the FTL table entry cache of the storage device. When data needs to be read and written, the PPN address information on the HPB cache is directly sent to the storage device. And, when the table entry is updated, the host obtains the latest table entry from the storage device.
采用这种方案时,主机和存储设备有频繁的同步开销。并且,在一些终端设备中,例如手机中,主机内存也是瓶颈,用主机内存来存放FTL映射表对主机内存容量也是较大的挑战。With this approach, the host and storage device have frequent synchronization overhead. In addition, in some terminal devices, such as mobile phones, the host memory is also a bottleneck, and using the host memory to store the FTL mapping table is also a great challenge to the host memory capacity.
本申请实施例提供了一闪存控制方法,可以直接根据FTL二级表的信息进行数据访问控制,无需频繁加载和替换FTL一级表,提升FTL表项的命中率,提高了系统的性能。示例性地,以两级FTL表为例介绍本申请实施例的FTL表项处理方法。应理解,本申请实施例的“FTL一级表”和“FTL二级表”等描述仅仅是为了区分不同层级的FTL表项,在其他实现方式中,本申请的“FTL一级表”也可能称为“FTL二级表”;本申请的“FTL二级表”也可能称为“FTL一级表”。The embodiment of the present application provides a flash memory control method, which can directly perform data access control according to the information of the FTL second-level table, without frequently loading and replacing the FTL first-level table, improving the hit rate of FTL table entries, and improving the performance of the system. Illustratively, a two-level FTL table is used as an example to introduce the FTL table entry processing method in this embodiment of the present application. It should be understood that the descriptions such as the “FTL first-level table” and the “FTL second-level table” in the embodiments of the present application are only for distinguishing FTL table items of different levels. May be referred to as the "FTL Level 2 Table"; the "FTL Level 2 Table" for this application may also be referred to as the "FTL Level 1 Table".
本申请实施例的闪存控制方法主要包括对FTL表项的处理以及数据的读写(数据访问或者数据写入)。The flash memory control method according to the embodiment of the present application mainly includes the processing of FTL entries and the reading and writing of data (data access or data writing).
图2是本申请本申请实施例的FTL表项处理方法200的流程示意图。如图2所示,本申请实施例的FTL表项处理方法包括步骤S210至步骤S230。下面结合图2,详细介绍本申请实施例的FTL表项处理方法。FIG. 2 is a schematic flowchart of a method 200 for processing an FTL entry according to an embodiment of the present application. As shown in FIG. 2 , the method for processing an FTL entry in this embodiment of the present application includes steps S210 to S230. In the following, with reference to FIG. 2 , the method for processing an FTL entry in this embodiment of the present application will be described in detail.
S210,识别特征数据,确定数据是否符合空间缩减特征。S210, identifying feature data, and determining whether the data conforms to the space reduction feature.
具体来说,在一些实施例中,存储设备确定FTL二级表的某一个条目(例如,下文的“第一条目”)对应的LBA地址段的PPN连续,在这种情况下,符合空间缩减的特征,可以对FTL一级表进行缩减,这段FTL一级表可以不占用存储空间,仅在FTL二级表中在与这一段对应的entry中进行标识。Specifically, in some embodiments, the storage device determines that the PPN of the LBA address segment corresponding to a certain entry (for example, the "first entry" hereinafter) of the FTL secondary table is continuous. In this case, the corresponding space With the feature of reduction, the FTL first-level table can be reduced. This FTL first-level table may not occupy storage space, and is only marked in the entry corresponding to this section in the FTL second-level table.
示例性地,每一段的大小为256。例如,如图3中的(a)所示,LBA0-255的地址段中,LBA 0对应的PPN 0指向了NAND空间中的页(page)1,LBA 1对应的PPN 1指向了NAND空间中的page 2……LBA 255对应的PPN 255指向了NAND空间中的page 256,也就是说,每一个LBA对应的PPN指向的NAND空间中的页(page)是连续的,即一段逻辑块地址LBA对应的物理页号PPN连续,在这种情况下,LBA 0-255这一个段的FTL一级表可以不占用存储空间,仅在FTL二级表LBA 0-255对应的条目中进行标识。Illustratively, each segment is 256 in size. For example, as shown in (a) of Figure 3, in the address segment of LBA0-255, the PPN 0 corresponding to LBA 0 points to page 1 in the NAND space, and the PPN 1 corresponding to LBA 1 points to the NAND space The page 2... The PPN 255 corresponding to LBA 255 points to page 256 in the NAND space, that is to say, the pages in the NAND space pointed to by the PPN corresponding to each LBA are continuous, that is, a logical block address LBA The corresponding physical page number PPN is continuous. In this case, the FTL first-level table of the segment of LBA 0-255 does not occupy storage space, and is only identified in the entry corresponding to the FTL second-level table LBA 0-255.
如图3中的(b)所示,LBA0-255地址段中,LBA 0对应的PPN指向了NAND空间中的page 1,LBA 1对应的PPN指向了NAND空间中的page 2,LBA 2对应的PPN指向了NAND空间中的page 3;但是,LBA 3-255对应的PPN指向的NAND空间中的page是不连续的,也就是说,第一段中,每一个逻辑块地址对应的物理地址不是连续的,在这种情况下,不能对FTL一级表进行缩减,需要在存储设备的SRAM或者NAND中存储完整的第一段的FTL一级表。As shown in (b) of Figure 3, in the LBA0-255 address segment, the PPN corresponding to LBA 0 points to page 1 in the NAND space, the PPN corresponding to LBA 1 points to page 2 in the NAND space, and the corresponding PPN of LBA 2 points to page 2 in the NAND space. PPN points to page 3 in the NAND space; however, the pages in the NAND space pointed to by the PPN corresponding to LBA 3-255 are discontinuous, that is, in the first segment, the physical address corresponding to each logical block address is not Continuously, in this case, the FTL level-1 table cannot be reduced, and the complete FTL level-1 table of the first segment needs to be stored in the SRAM or NAND of the storage device.
在一些实施例中,当一段数据对应的PPN连续时,并且该段数据是有效数据时,可 以称该段数据为全连续数据,在这种情况下,第一条目对应有效数据空间。In some embodiments, when the PPNs corresponding to a segment of data are continuous, and the segment of data is valid data, the segment of data may be called fully continuous data. In this case, the first entry corresponds to the valid data space.
在另一些实施例中,当一段数据对应的PPN连续,并且该段数据是无效数据时,可以称该段数据为全无效数据,在这种情况下第一条目对应无效数据空间。In other embodiments, when the PPNs corresponding to a segment of data are continuous, and the segment of data is invalid data, the segment of data may be referred to as completely invalid data, and in this case, the first entry corresponds to an invalid data space.
S220,数据不符合空间缩减的特征,生成FTL一级表。S220, the data does not conform to the characteristics of space reduction, and an FTL first-level table is generated.
当数据不符合空间缩减特征时,采用现有的多级FTL表项技术,生成或者更新FTL一级表和FTL二级表,为了简洁,在此不再详述。When the data does not conform to the space reduction feature, the existing multi-level FTL table entry technology is used to generate or update the FTL first-level table and the FTL second-level table, which will not be described in detail here for brevity.
S230,数据符合空间缩减特征,在FTL二级表进行标识。其中,FTL二级表的第一条目中包括空间缩减标志。下面结合图4至图5详细说明本申请实施例的FTL二级表的标识方法。S230, the data conforms to the space reduction feature, and is identified in the FTL secondary table. Wherein, the space reduction flag is included in the first entry of the FTL secondary table. The method for identifying the FTL secondary table according to the embodiment of the present application will be described in detail below with reference to FIG. 4 to FIG. 5 .
示例性地,在一些实施例中,以图3中的(a)为例,LBA0-255对应的PPN连续,符合上述步骤S210中的空间缩减特征,此时,存储设备的SRAM或NAND中无需存储LBA0-255的FTL一级表,并且,在二级表的entry中进行标识。图4是全连续数据的FTL二级表条目标识方法。Exemplarily, in some embodiments, taking (a) in FIG. 3 as an example, the PPNs corresponding to LBA0-255 are continuous, which conforms to the space reduction feature in the above step S210. The FTL first-level table of LBA0-255 is stored, and is identified in the entry of the second-level table. FIG. 4 is an FTL secondary table entry identification method for full continuous data.
如图4所示,全连续数据的FTL二级条目包括状态标志和该段起始PPN。其中,该段起始PPN指向了该段的第一个LBA对应的PPN。例如,以图3中的(a)为例,在该段的二级表entry中,该段起始PPN是LBA 0对应的PPN 0,PPN 0指向了NAND空间的page 1。As shown in Fig. 4, the FTL secondary entry of the full continuous data includes the status flag and the start PPN of the segment. The starting PPN of the segment points to the PPN corresponding to the first LBA of the segment. For example, taking (a) in FIG. 3 as an example, in the secondary table entry of the segment, the starting PPN of the segment is PPN 0 corresponding to LBA 0, and PPN 0 points to page 1 of the NAND space.
在一些实施例中,可以用1个比特(bit)的第一标志来指示该段对应全连续数据。示例性地,当该第一标志的值为1时,表示当前段为全连续数据。或者,当该第一标志的值为0时,表示当前段为全连续数据。In some embodiments, a first flag of 1 bit (bit) may be used to indicate that the segment corresponds to fully contiguous data. Exemplarily, when the value of the first flag is 1, it indicates that the current segment is full continuous data. Or, when the value of the first flag is 0, it indicates that the current segment is full continuous data.
应理解,上述1bit的第一标志可以位于该entry的除了起始PPN的任意位置,本申请实施例对此不做限定。It should be understood that the above-mentioned 1-bit first flag may be located at any position of the entry except the starting PPN, which is not limited in this embodiment of the present application.
在另一些实施例中,可以用第二标志中第一未定义状态作为全连续数据的状态标志,其中第二标志包括多个bit。例如,原有的二级表entry中,用2bit的第二标志表示不同的状态。这两个bit可以表示4种不同的状态。示例性地,当这两个bit的值为11时,是第一未定义的状态,在这种情况下,可以用11表示当前段为全连续数据。In other embodiments, the first undefined state in the second flag can be used as the state flag of the fully continuous data, where the second flag includes multiple bits. For example, in the original secondary table entry, a 2-bit second flag is used to represent different states. These two bits can represent 4 different states. Exemplarily, when the value of these two bits is 11, it is the first undefined state. In this case, 11 can be used to indicate that the current segment is full continuous data.
示例性地,在另一些实施例中,以图3中的(a)为例,第一段的数据是无效的数据,并且符合上述步骤S210中的空间缩减特征,即该段数据是全无效数据。此时,存储设备的SRAM或NAND中无需存储FTL一级表。并且,在该段对应的二级表的entry中进行标识。图5是全无效数据的FTL二级表条目标识方法。Exemplarily, in other embodiments, taking (a) in FIG. 3 as an example, the data of the first segment is invalid data, and conforms to the space reduction feature in the above step S210, that is, the data of this segment is completely invalid. data. At this time, there is no need to store the FTL first-level table in the SRAM or NAND of the storage device. And, it is identified in the entry of the secondary table corresponding to this segment. FIG. 5 is an FTL secondary table entry identification method for all invalid data.
如图5中的(a)所示,在一些实施例中,二级表的entry可以用一个1bit的第三标志来表示当前段的数据是全无效数据。例如,当第三标志的值为1时,表示当前段的数据是全无效数据;或者,当第三标志的值为0时,表示当前段的数据是全无效数据。As shown in (a) of FIG. 5 , in some embodiments, the entry of the secondary table may use a 1-bit third flag to indicate that the data of the current segment is all invalid data. For example, when the value of the third flag is 1, it indicates that the data of the current segment is all invalid data; or, when the value of the third flag is 0, it indicates that the data of the current segment is all invalid data.
应理解,上述1bit的第三标志可以位于该entry的除了第一标志的任意位置,本申请实施例对此不做限定。It should be understood that the above-mentioned 1-bit third flag may be located at any position of the entry except the first flag, which is not limited in this embodiment of the present application.
如图5中的(b)所示,在另一些实施例中,可以用第二标志中第二未定义的状态作为全无效数据的状态标识,其中第二标志包括多个bit。示例性地,2bit的第二标志是原有的状态标识位,2bit可以表示4种不同的状态,可以用四种状态中第二未定义的状态表示当前段的数据是全无效数据。例如,可以用11表示当前段的数据是全连续数据,可以用 10表示当前段的数据是全无效数据。As shown in (b) of FIG. 5 , in other embodiments, the second undefined state in the second flag may be used as the state flag of all invalid data, where the second flag includes multiple bits. Exemplarily, the second flag of 2 bits is the original state identification bit, 2 bits can represent 4 different states, and the second undefined state among the four states can be used to represent that the data of the current segment is all invalid data. For example, 11 can be used to indicate that the data of the current segment is all continuous data, and 10 can be used to indicate that the data of the current segment is all invalid data.
如图5中的(c)所示,在另一些实施例中,二级表的entry还可以用第一模式(pattern)表示当前段的数据是全无效数据。例如,用当二级表的entry是“0xFFFFFFF”时,表示当前段的数据是全无效数据。As shown in (c) of FIG. 5 , in other embodiments, the entry of the secondary table may also use a first pattern (pattern) to indicate that the data of the current segment is all invalid data. For example, when the entry of the secondary table is "0xFFFFFFF", it means that the data of the current segment is all invalid data.
应理解,当用第一模式表示当前段的数据是全无效数据时,二级表的条目也可以用其他模式进行标识,本申请实施例对此不做限定。It should be understood that when the first mode is used to indicate that the data of the current segment is completely invalid data, the entry of the secondary table may also be identified by other modes, which is not limited in this embodiment of the present application.
通过识别特征数据,对符合空间缩减特征的FTL表项进行缩减,可以节约存储设备的存储空间,并且无需频繁在控制器SRAM中替换FTL一级表,整体上提高了FTL表项的命中率。By identifying the characteristic data and reducing the FTL entries that meet the space reduction feature, the storage space of the storage device can be saved, and the FTL first-level table does not need to be frequently replaced in the controller SRAM, which improves the hit rate of the FTL entry as a whole.
应理解,本申请实施例的FTL表项处理方法,除了可以对上述的全连续数据或者全无效数据进行FTL表项的缩减,还可以应用于对具有其他特征的连续的数据进行FTL表项进行缩减,本申请实施例对此不做限定。例如,可以对一段全为0的PPN连续的数据进行FTL一级表的缩减;再如,可以对一段PPN连续的特定pattern的数据进行缩减。在此不再赘述。It should be understood that the method for processing FTL entries in this embodiment of the present application, in addition to reducing the FTL entries for the above-mentioned all continuous data or all invalid data, can also be applied to perform FTL entry processing on continuous data with other characteristics. reduction, which is not limited in this embodiment of the present application. For example, the FTL first-level table may be reduced for a segment of continuous PPN data with all 0s; for another example, the data of a specific pattern that is continuous for a segment of PPN may be reduced. It is not repeated here.
以上结合图2至图5详细介绍了本申请实施例的FTL表项处理方法。上述FTL表项的缩减方法可以在数据输入输出(input and output,IO)流程的不同阶段执行。The FTL table entry processing method according to the embodiment of the present application is described in detail above with reference to FIG. 2 to FIG. 5 . The reduction method of the above FTL table entry can be performed at different stages of the data input and output (IO) process.
在一些实施例中,上述方法200可以在存储设备空闲时执行。例如,存储设备可以在空闲(idle)时段搜索FTL表项,判断对应的数据是否符合上述方法200中的空间缩减特征。In some embodiments, the above-described method 200 may be performed when the storage device is idle. For example, the storage device may search for FTL entries in an idle period to determine whether the corresponding data conforms to the space reduction feature in the above method 200 .
例如,FTL二级表的第一条目指示的LBA地址段对应的PPN指向的NAND空间连续,并且数据为有效数据,那么可以不再存储该段的FTL一级表,并且在该段的FTL二级表的entry(第一条目)中存储该地址段的起始PPN,并且按照如图4所示的方式在该段二级表的entry中进行标识。For example, the NAND space pointed to by the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous, and the data is valid data, then the FTL primary table of this segment can no longer be stored, and the FTL of this segment is The entry (first entry) of the secondary table stores the starting PPN of the address segment, and is identified in the entry of the secondary table of this segment in the manner shown in FIG. 4 .
例如,FTL二级表的第一条目指示的LBA地址段对应的PPN指向的NAND空间连续,并且数据为无效数据,那么可以不再存储该地址段的FTL一级表,并且在该段的FTL二级表的entry(第一条目)中,按照如图5所示的方式在该段的FTL二级表的entry中进行标识。For example, if the NAND space pointed to by the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous, and the data is invalid data, then the FTL primary table of the address segment can no longer be stored, and in the segment's In the entry (first entry) of the FTL secondary table, identification is made in the entry of the FTL secondary table of the segment in the manner as shown in FIG. 5 .
通过在空闲时段对存储空间进行整理,对符合空间缩减特征的FTL表项进行缩减,可以提高存储设备在执行IO操作时的性能。By arranging the storage space in the idle period, and reducing the FTL entries that conform to the space reduction feature, the performance of the storage device when performing IO operations can be improved.
在另一些实施例中,上述方法200可以在存储设备执行IO操作时执行。In other embodiments, the above-described method 200 may be performed when the storage device performs an IO operation.
例如,存储设备可以在执行数据写入操作的过程中,执行上述方法200。示例性地,存储设备在数据写入的过程中识别到即将写入的数据的某一段LBA地址对应的PPN指向的NAND空间连续,那么可以不再存储或者更新该段的FTL一级表,并且在该段的FTL二级表的entry(例如,第一条目)中存储该地址段的起始PPN,并且按照如图4所示的方式在该段二级表的第一条目中进行标识。上述方法可以应用于大量顺序冷数据写入的场景,例如应用程序(application,APP)安装、视频、图片存储等。大量连续数据的写入可以满足上述全连续数据的特征,这些应用场景下可以实现FTL表项的大幅缩减。For example, the storage device may perform the above method 200 during the process of performing the data writing operation. Exemplarily, in the process of data writing, the storage device recognizes that the NAND space pointed to by the PPN corresponding to a certain segment of the LBA address of the data to be written is continuous, then the FTL level-1 table of the segment can no longer be stored or updated, and The starting PPN of the address segment is stored in the entry (eg, the first entry) of the FTL secondary table of the segment, and is performed in the first entry of the secondary table of the segment in the manner shown in FIG. 4 . logo. The above method can be applied to scenarios where a large amount of sequential cold data is written, such as application (application, APP) installation, video, picture storage, and the like. The writing of a large amount of continuous data can meet the characteristics of the above-mentioned fully continuous data, and in these application scenarios, FTL entries can be greatly reduced.
例如,存储设备可以在执行数据删除操作的过程中,执行上述方法200。删除的数据相当于上述无效数据。示例性地,存储设备在数据删除的过程中识别到即将删除的数据的 地址对应了一段FTL表项,那么可以不再存储或者更新该段的FTL一级表,并且在该段的FTL二级表的entry中进行标识,标识的方法如图5所示。For example, the storage device may perform the above-mentioned method 200 during the process of performing the data deletion operation. The deleted data is equivalent to the invalid data described above. Exemplarily, in the process of data deletion, the storage device recognizes that the address of the data to be deleted corresponds to a segment of the FTL entry, then the FTL level-1 table of the segment can no longer be stored or updated, and the FTL level-2 of the segment can be stored or updated. The table entry is identified, and the identification method is shown in Figure 5.
上述方法可以应用于大量连续空间进行删除的场景,例如APP卸载、视频、图片删除等。删除数据时可以直接在FTL二级表的对应段的entry中进行标识,无需再更新FTL一级表。The above method can be applied to scenarios where a large number of continuous spaces are deleted, such as APP uninstallation, video, picture deletion, and the like. When deleting data, it can be directly marked in the entry of the corresponding segment of the FTL secondary table, and there is no need to update the FTL primary table.
在执行IO操作的同时执行上述FTL缩减方法200,可以减少存储设备对NAND空间的扫描次数,提高了数据读写的效率。Executing the above-mentioned FTL reduction method 200 while performing the IO operation can reduce the number of times the storage device scans the NAND space and improve the efficiency of data reading and writing.
图6是本申请实施例的数据访问方法。下面结合图6介绍本申请实施例的闪存控制方法的数据访问过程。FIG. 6 is a data access method according to an embodiment of the present application. The data access process of the flash memory control method according to the embodiment of the present application is described below with reference to FIG. 6 .
S410,主机(host)下发读IO命令(数据访问指令)。存储设备接收主机的读IO命令,开始执行数据读取的操作。S410, the host (host) issues a read IO command (data access command). The storage device receives the read IO command from the host and starts to perform the data read operation.
S420,存储设备查询目标LBA对应的FTL二级表对应的条目(entry)。S420, the storage device queries an entry (entry) corresponding to the FTL secondary table corresponding to the target LBA.
S430,确定该entry是否有空间缩减标志。如果有空间缩减标志,执行步骤S440,如果没有缩减标志,执行步骤S470。S430, determine whether the entry has a space reduction flag. If there is a space reduction flag, step S440 is performed, and if there is no space reduction flag, step S470 is performed.
示例性地,缩减标志包括第一标志,并且第一标志的值是用于指示全连续数据的值。Illustratively, the reduction flag includes a first flag, and the value of the first flag is a value for indicating fully contiguous data.
示例性地,缩减标志包括第三状态标志位,并且第三标志的值是用于指示全无效数据的值。Illustratively, the reduction flag includes a third status flag bit, and the value of the third flag is a value for indicating all invalid data.
示例性地,缩减标志包括第二标志,并且第二标志的值是用于指示全连续数据或者全连续数据的值。Illustratively, the reduction flag includes a second flag, and the value of the second flag is a value for indicating full-consecutive data or full-consecutive data.
示例性地,缩减标志包括第一模式,第一模式指示全无效数据。Illustratively, the reduced flag includes a first pattern indicating all invalid data.
S440,根据该entry的缩减标志确定是否为全连续数据。S440, according to the reduction flag of the entry, determine whether it is full continuous data.
示例性地,该entry包括第一标志,该第一标志的值为1,确定该段对应全连续数据。Exemplarily, the entry includes a first flag, and the value of the first flag is 1, which determines that the segment corresponds to fully continuous data.
示例性地,该entry包括第一标志,该第一标志的值为0,确定该段对应全连续数据。Exemplarily, the entry includes a first flag, and the value of the first flag is 0, which determines that the segment corresponds to fully continuous data.
示例性地,该entry包括第二标志,该第二标志的值为11,确定该段对应全连续数据。Exemplarily, the entry includes a second flag, and the value of the second flag is 11, which determines that the segment corresponds to full continuous data.
当确定该段对应的是全连续数据时,执行步骤S450;如果确定该段对应的不是全连续数据,执行步骤S460。When it is determined that the segment corresponds to fully continuous data, step S450 is performed; if it is determined that the segment corresponds to not fully continuous data, step S460 is performed.
S450,从FTL二级表中获取起始PPN并计算对应的偏移,从NAND中读取数据。S450, obtain the starting PPN from the FTL secondary table, calculate the corresponding offset, and read data from the NAND.
当根据FTL二级表中的entry的缩减标志确定是全连续数据时,从该entry获取该段的起始PPN,并计算对应的偏移。When it is determined that it is fully continuous data according to the reduction flag of the entry in the FTL secondary table, the starting PPN of the segment is obtained from the entry, and the corresponding offset is calculated.
示例性地,目标数据的目标逻辑块地址为LBA 30,该地址位于FTL表LBA 0-255的一段。通过二级表的LBA 0-255的entry中的空间缩减标志确定该段对应全连续数据,并且从该entry中获得该段的起始PPN为PPN 0。该PPN 0指向NAND空间的page n。目标逻辑块地址为LBA 30,可以计算相对于该段起始逻辑块地址LBA 0的偏移为30。因此,从NAND空间的page(n+30)可以读取目标数据。Exemplarily, the target logical block address of the target data is LBA 30, which is located in a section of the FTL table LBA 0-255. It is determined by the space reduction flag in the entry of LBA 0-255 of the secondary table that the segment corresponds to fully continuous data, and the starting PPN of the segment obtained from the entry is PPN 0. The PPN 0 points to page n of the NAND space. The target logical block address is LBA 30, and the offset relative to the starting logical block address LBA 0 of the segment can be calculated as 30. Therefore, the target data can be read from page(n+30) of the NAND space.
S460,向主机返回无效数据。S460, returning invalid data to the host.
在本申请实施例中,FTL二级表的entry的缩减标志有两类,分别用于标识全连续数据和全无效数据。当步骤S440根据缩减标志确定不是全连续数据时,可以确定该段对应的是全无效数据。In the embodiment of the present application, there are two types of reduction flags for the entry of the FTL secondary table, which are respectively used to identify all continuous data and all invalid data. When it is determined in step S440 that the data is not all continuous data according to the reduction flag, it can be determined that the segment corresponds to all invalid data.
在另一些实施例中,也可以进一步根据缩减标志判断是否是全无效数据。In other embodiments, whether it is all invalid data may be further determined according to the reduction flag.
示例性地,该entry包括第三标志,该第三标志的值为1,确定该段对应全无效数据。Exemplarily, the entry includes a third flag, and the value of the third flag is 1, which determines that the segment corresponds to all invalid data.
示例性地,该entry包括第三标志,该第三标志的值为0,确定该段对应全无效数据。Exemplarily, the entry includes a third flag, and the value of the third flag is 0, which determines that the segment corresponds to all invalid data.
示例性地,该entry包括第二标志,该第二标志的值为10,确定该段对应全无效数据。Exemplarily, the entry includes a second flag, and the value of the second flag is 10, which determines that the segment corresponds to all invalid data.
示例性地,该entry包括第一模式,确定该段对应全无效数据。Exemplarily, the entry includes a first pattern that determines that the segment corresponds to all invalid data.
当确定是全无效数据后,存储设备可以直接向主机返回无效数据。When it is determined that the data is all invalid, the storage device can directly return invalid data to the host.
S470,通过FTL二级表读取对应段的FTL一级表。S470: Read the FTL first-level table of the corresponding segment through the FTL second-level table.
当在步骤S430中确定目标LBA所在地址段的二级表的entry中没有缩减标志时,按照现有的多级FTL表项数据读取方法进行数据的读取,根据FTL二级表的entry中存储的FTL一级表所在的位置,获取FTL一级表。When it is determined in step S430 that there is no reduction flag in the entry of the secondary table of the address segment where the target LBA is located, the data is read according to the existing multi-level FTL table entry data reading method, according to the entry in the FTL secondary table. The location where the stored FTL first-level table is located to obtain the FTL first-level table.
S480,通过FTL一级表中目标LBA对应的PPN记录读取数据。S480, read data through the PPN record corresponding to the target LBA in the FTL first-level table.
通过本申请实施例的闪存控制方法,在读取数据时,对于全连续数据或者全无效数据,无需在SRAM中加载或替换FTL一级表,整体上提高了FTL表项的命中率,提高了数据访问的效率。Through the flash memory control method of the embodiment of the present application, when reading data, for all continuous data or all invalid data, there is no need to load or replace the FTL first-level table in the SRAM, which improves the hit rate of the FTL table entry as a whole and improves the Efficiency of data access.
图7是本申请实施例的数据写入方法。下面结合图7介绍本申请实施例的闪存控制方法的数据写入过程。FIG. 7 is a data writing method according to an embodiment of the present application. The following describes the data writing process of the flash memory control method according to the embodiment of the present application with reference to FIG. 7 .
S310,主机(host)下发写IO命令(数据写入指令)。存储设备接收主机的写IO命令,开始执行数据写入的操作。S310, the host (host) issues a write IO command (data write command). The storage device receives the write IO command from the host and starts to perform the data writing operation.
S320,确定待写入数据是否是全连续数据。存储设备的控制器会为待写入的数据分配写入地址,在步骤S320中,存储设备可以根据控制器分配的写入地址,按照上述方法200确定待写入的数据是否为全连续数据。当确定待写入数据是全连续数据时,执行步骤S330;当确定待写入数据不是全连续数据时,执行步骤S340。S320: Determine whether the data to be written is fully continuous data. The controller of the storage device will allocate a write address for the data to be written. In step S320, the storage device may determine whether the data to be written is fully continuous data according to the above method 200 according to the write address allocated by the controller. When it is determined that the data to be written is fully continuous data, step S330 is performed; when it is determined that the data to be written is not fully continuous data, step S340 is performed.
例如,存储设备确定待写入数据即将写入的LBA所在的FTL二级表的第一条目指示的LBA地址段对应的PPN连续,可以确定当前待写入数据是全连续数据。For example, the storage device determines that the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table where the LBA where the data to be written is located is continuous, and can determine that the current data to be written is fully continuous data.
例如,存储设备确定待写入数据即将写入的LBA所在的FTL二级表的第一条目指示的LBA地址段对应的PPN不连续,可以确定当前待写入数据不是全连续数据。For example, the storage device determines that the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table where the LBA where the data to be written is located is discontinuous, and can determine that the current data to be written is not fully continuous data.
S330,建立或更新FTL二级表。S330, establish or update the FTL secondary table.
当确定待写入数据是全连续数据时,可以不更新或者不保存当前写入数据的FTL一级表,并且在对应的FTL二级表的第一条目中进行标识。在这种情况下,对应的FTL二级entry包括空间缩减标志和起始PPN。FTL二级表entry的标识方法如图4所示,在此不再赘述。When it is determined that the data to be written is fully continuous data, the FTL first-level table of the currently written data may not be updated or saved, and the first entry of the corresponding FTL second-level table may be marked. In this case, the corresponding FTL secondary entry includes the space reduction flag and the starting PPN. The identification method of the FTL secondary table entry is shown in FIG. 4 , which will not be repeated here.
S340,建立或更新FTL一级表,并且建立或更新FTL二级表。S340, establish or update the FTL primary table, and establish or update the FTL secondary table.
当确定待写入数据不是全连续数据时,更新或建立FTL表项的方法与现有技术相同。在这种情况下,需要对FTL一级表和FTL二级表都进行更新,在此不再赘述。When it is determined that the data to be written is not completely continuous data, the method for updating or establishing the FTL entry is the same as that in the prior art. In this case, both the FTL first-level table and the FTL second-level table need to be updated, which will not be repeated here.
S350,写入数据。存储设备将待写入的数据写入存储设备的存储单元中,完成数据写入的流程。S350, write data. The storage device writes the data to be written into the storage unit of the storage device to complete the data writing process.
在一些实施例中,还可以将日志结构文件系统(log structured file systems,LFS)与上述FTL表项处理方法相结合,进一步发挥上述FTL表项处理方法的作用。In some embodiments, log structured file systems (log structured file systems, LFS) can also be combined with the above-mentioned FTL entry processing method to further exert the effect of the above-mentioned FTL entry processing method.
LFS的数据更新特征为异地更新(out place update,OPU),LFS会建立日志头,数据的每次更新会记录在当前日志的头部,因此在LFS中,一次写入操作可以将该日志的多 个更新连续地写入存储设备。The data update feature of LFS is out-of-place update (OPU). LFS will create a log header, and each update of data will be recorded in the header of the current log. Therefore, in LFS, a write operation can Multiple updates are written to the storage device consecutively.
LFS将随机IO写入转换为顺序写入,使得数据更容易满足上述FTL表项处理方法的空间缩减特征,有利于更好地实现FTL表项的缩减,提升FTL表项命中率。LFS converts random IO writes into sequential writes, which makes it easier for data to meet the space reduction feature of the above-mentioned FTL entry processing method, which is conducive to better reduction of FTL entries and improves the hit rate of FTL entries.
下面结合图8至图11介绍本申请实施例的装置。The apparatus of the embodiment of the present application will be described below with reference to FIG. 8 to FIG. 11 .
图8是本申请实施例的一种存储设备的示意图。如图8所示,本申请实施例的存储设备包括确定模块810和更新模块820。FIG. 8 is a schematic diagram of a storage device according to an embodiment of the present application. As shown in FIG. 8 , the storage device in this embodiment of the present application includes a determination module 810 and an update module 820 .
确定模块810,用于确定模块,用于确定第一段的闪存转换层FTL一级表中的逻辑块地址LBA对应的物理页号PPN连续。The determining module 810 is configured to determine the module, configured to determine that the physical page numbers PPN corresponding to the logical block address LBA in the FTL level-1 table of the flash memory translation layer of the first segment are continuous.
更新模块820,用于更新会建立上述第一段的FTL二级表条目,该第一段的FTL二级表条目中包括空间缩减标志。The updating module 820 is configured to update the FTL level 2 table entry that will establish the first segment, where the FTL level 2 table entry of the first segment includes a space reduction flag.
在一些实施例中,该存储设备800可以用于执行上述FTL表项处理方法200,其中确定模块810可以实现上述方法中的步骤S210的功能;更新模块820可以实现上述方法中的步骤S220至步骤S230的功能。确定模块810和更新模块820的具体功能和有益效果可以参见上述方法中的描述,为了简洁,在此不再赘述。In some embodiments, the storage device 800 can be used to execute the above-mentioned FTL entry processing method 200, wherein the determination module 810 can implement the function of step S210 in the above-mentioned method; the updating module 820 can implement the above-mentioned method from steps S220 to S220 Features of the S230. For the specific functions and beneficial effects of the determining module 810 and the updating module 820, reference may be made to the descriptions in the above methods, which are not repeated here for brevity.
图9是本申请实施例的另一种存储设备的示意图。如图9所示,本申请实施例的存储设备包括闪存控制器910和NAND闪存920。FIG. 9 is a schematic diagram of another storage device according to an embodiment of the present application. As shown in FIG. 9 , the storage device of the embodiment of the present application includes a flash memory controller 910 and a NAND flash memory 920 .
闪存控制器910用于控制存储设备的工作。其中,闪存控制器910还可以包括:接口(interface)911、中央处理器(central processing unit,CPU)912、静态随机存取器(static random access memory,SRAM)913和NAND控制器914。The flash controller 910 is used to control the operation of the storage device. Wherein, the flash memory controller 910 may further include: an interface (interface) 911, a central processing unit (central processing unit, CPU) 912, a static random access device (static random access memory, SRAM) 913 and a NAND controller 914.
其中,接口911具体用于连接主机,与主机进行数据传输。示例性地,可以通过UFS方式、嵌入式多媒体卡(embedded multi media card,EMMC)方式、高速串行计算机扩展总线(peripheral component interconnect express,PCIE)方式等于主机进行数据传输。Among them, the interface 911 is specifically used to connect to the host and perform data transmission with the host. Exemplarily, the data transmission can be performed by a UFS method, an embedded multimedia card (embedded multimedia card, EMMC) method, or a high-speed serial computer expansion bus (peripheral component interconnect express, PCIE) method equal to the host computer.
CPU 912具体用于控制该存储设备900的各个模块或部件之间的数据交互。The CPU 912 is specifically used to control the data interaction between the various modules or components of the storage device 900.
SRAM 913是闪存控制器910内部的随机存取(random access memory,RAM)空间,具体可以用于存放FTL表项以及数据。The SRAM 913 is a random access (random access memory, RAM) space inside the flash memory controller 910, and can be specifically used to store FTL entries and data.
NAND控制器914具体用于控制和管理存储设备900的NANA闪存920。The NAND controller 914 is specifically used to control and manage the NANA flash memory 920 of the storage device 900 .
应理解上述存储设备900仅仅是本申请实施例的存储设备的一个示例,在其他实施例中,存储设备的存储器件除了上述NAND闪存920外还可以是其他存储器件,并且当上述NAND闪存920是其他存储器件时,NAND控制器914也可以是相应的存储器件的控制器。还应理解,存储设备中还可以包括其他模块、或者其他单元、或者其他部件,本申请实施例对此不作限定。It should be understood that the above-mentioned storage device 900 is only an example of the storage device of the embodiment of the present application. In other embodiments, the storage device of the storage device may be other storage devices besides the above-mentioned NAND flash memory 920, and when the above-mentioned NAND flash memory 920 is For other storage devices, the NAND controller 914 may also be the controller of the corresponding storage device. It should also be understood that the storage device may further include other modules, or other units, or other components, which are not limited in this embodiment of the present application.
图10是本申请实施例的闪存控制装置1000的结构示意图。如图10所示,本申请实施例的闪存控制装置包括随机存储器1010和控制器1020。FIG. 10 is a schematic structural diagram of a flash memory control device 1000 according to an embodiment of the present application. As shown in FIG. 10 , the flash memory control apparatus according to the embodiment of the present application includes a random access memory 1010 and a controller 1020 .
随机存储器1010用于存储FTL二级表。The random access memory 1010 is used to store the FTL secondary table.
控制器1020用于进行数据访问控制和数据写入控制。The controller 1020 is used for data access control and data write control.
具体地,控制器1020用于接收主机发送的数据访问指令,该数据访问指令包括目标数据的目标LBA,在FTL二级表的第一条目指示的LBA地址段对应的PPN连续并且第一条目对应有效数据空间的情况下,根据目标LBA和第一条目中的起始PPN访问目标数据。在这种情况下,控制器1020可以实现如图6所示的方法400中的各个步骤的功能。Specifically, the controller 1020 is configured to receive a data access command sent by the host, where the data access command includes the target LBA of the target data, and the PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous and the first When the entry corresponds to the valid data space, the target data is accessed according to the target LBA and the starting PPN in the first entry. In this case, the controller 1020 may implement the functions of the various steps in the method 400 shown in FIG. 6 .
具体地,控制器1020还可以用于接收主机发送的数据写入指令,该数据写入指令包括待写入数据;为待写入数据分配写入地址,并对待写入数据进行数据写入控制。在这种情况下,控制器1020可以实现如图7所示的方法300中的各个步骤的功能。Specifically, the controller 1020 can also be configured to receive a data write instruction sent by the host, where the data write instruction includes data to be written; assign a write address to the data to be written, and perform data write control on the data to be written . In this case, the controller 1020 may implement the functions of each step in the method 300 shown in FIG. 7 .
在另一些实施例中,控制器1020还可以在空闲时段对随机存储器1010中的FTL表项进行处理,在这种情况下,控制器1020可以实现如图2所示的方法200中的各个步骤的功能。In other embodiments, the controller 1020 may also process the FTL entries in the random access memory 1010 during the idle period. In this case, the controller 1020 may implement the various steps in the method 200 shown in FIG. 2 . function.
应理解,本申请实施例的闪存控制装置1000相当于图9所示的存储设备中的闪存控制器910,还应理解,图9所示的闪存控制器910仅仅是图10所示的闪存控制装置的一种可能的实现方式,本申请实施例对此不做限定。It should be understood that the flash memory control apparatus 1000 in this embodiment of the present application is equivalent to the flash memory controller 910 in the storage device shown in FIG. 9 , and it should also be understood that the flash memory controller 910 shown in FIG. 9 is only the flash memory control device shown in FIG. 10 . A possible implementation manner of the device, which is not limited in this embodiment of the present application.
图11是本申请实施例的数据读取装置1100的示意图。如图11所示,该数据读取装置1100包括确定模块1110、读取模块1120。FIG. 11 is a schematic diagram of a data reading apparatus 1100 according to an embodiment of the present application. As shown in FIG. 11 , the data reading device 1100 includes a determination module 1110 and a reading module 1120 .
确定模块1110,用于确定目标数据的目标LBA所在的第一段的FTL二级表entry包括空间缩减标志,该空间缩减标志指示了第一段对应的PPN连续。The determining module 1110 is configured to determine that the FTL secondary table entry of the first segment where the target LBA of the target data is located includes a space reduction flag, where the space reduction flag indicates that the PPN corresponding to the first segment is continuous.
读取模块1120,用于根据第一段的FTL二级表条目,读取目标数据。The reading module 1120 is configured to read the target data according to the FTL secondary table entry of the first segment.
本申请实施例的数据读取装置1000可以用于实现上述方法400,具体来说,确定模块1110可以实现上述方法的步骤S420、S430、S440;读取模块1120可以实现上述方法的步骤S450、S460、S470和S480。确定模块1110和读取模块1120的具体功能和有益效果可以参见上述方法中的描述,为了简洁,在此不再赘述。The data reading apparatus 1000 in this embodiment of the present application can be used to implement the above method 400. Specifically, the determination module 1110 can implement steps S420, S430 and S440 of the above method; the reading module 1120 can implement steps S450 and S460 of the above method , S470 and S480. For the specific functions and beneficial effects of the determining module 1110 and the reading module 1120, reference may be made to the descriptions in the above methods, which are not repeated here for brevity.
该数据读取装置1000可以应用于存储设备中。示例性地,当数据读取装置1000应用于图9所示的存储设备中时,确定模块1110和读取模块1120的功能可以由闪存控制器910或闪存控制装置1000实现。The data reading apparatus 1000 can be applied to a storage device. Exemplarily, when the data reading apparatus 1000 is applied to the storage device shown in FIG. 9 , the functions of the determination module 1110 and the reading module 1120 may be implemented by the flash memory controller 910 or the flash memory control apparatus 1000 .
图12是本申请实施例的数据写入装置1200的示意图。如图12所示,该数据读取装置1200包括确定模块1210、更新模块1220和写入模块1230。FIG. 12 is a schematic diagram of a data writing apparatus 1200 according to an embodiment of the present application. As shown in FIG. 12 , the data reading device 1200 includes a determining module 1210 , an updating module 1220 and a writing module 1230 .
确定模块1210,用于确定待写入数据是全连续数据,全连续数据的LBA所在的第一段对应的FTL一级表的PPN连续。The determining module 1210 is configured to determine that the data to be written is fully continuous data, and the PPNs of the FTL first-level table corresponding to the first segment where the LBA of the fully continuous data is located are continuous.
更新模块1220,用于更新或建立第一段的FTL二级表entry,该二级表entry包括空间缩减标志。The updating module 1220 is configured to update or establish the FTL secondary table entry of the first segment, where the secondary table entry includes a space reduction flag.
写入模块1230,用于写入全连续数据。The writing module 1230 is used for writing full continuous data.
本申请实施例的数据读取装置1200可以用于实现上述方法300,具体来说,确定模块1210可以实现上述方法的步骤S320;更新模块1220可以实现上述方法的步骤S330和S340;写入模块1230可以用于实现上述方法的步骤S350。确定模块1210、更新模块1220和写入模块1230的具体功能和有益效果可以参见上述方法中的描述,为了简洁,在此不再赘述。The data reading apparatus 1200 in this embodiment of the present application can be used to implement the above method 300. Specifically, the determination module 1210 can implement step S320 of the above method; the update module 1220 can implement steps S330 and S340 of the above method; the writing module 1230 It can be used to implement step S350 of the above method. For the specific functions and beneficial effects of the determining module 1210, the updating module 1220, and the writing module 1230, reference may be made to the descriptions of the above methods, which are not repeated here for brevity.
该数据读取装置1200可以应用于存储设备中。示例性地,当数据读取装置1200应用于图9所示的存储设备中时,确定模块1210、更新模块1220和写入模块1230的功能可以由闪存控制器910或闪存控制装置1000实现。The data reading apparatus 1200 can be applied to a storage device. Exemplarily, when the data reading apparatus 1200 is applied to the storage device shown in FIG. 9 , the functions of the determining module 1210 , the updating module 1220 and the writing module 1230 may be implemented by the flash memory controller 910 or the flash memory control apparatus 1000 .
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有计算机程序(也可以称为代码,或指令)当其在闪存控制装置上运行时,使得闪存控制装置执行上述实施例中的闪存控制方法。Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction), when it runs on the flash memory control device, so that the flash memory control device executes the above implementation Example of flash control method.
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有计算机程序(也可以称为代码,或指令)当其在存储设备上运行时,使得存储设备执行上述实施例中的FTL表项处理方法。Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction) when it runs on a storage device, causing the storage device to execute the above-mentioned embodiments. The FTL entry processing method.
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有计算机程序(也可以称为代码,或指令)当其在存储设备上运行时,使得存储设备执行上述实施例中的数据读取方法。Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction) when it runs on a storage device, causing the storage device to execute the above-mentioned embodiments. data read method.
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有计算机程序(也可以称为代码,或指令)当其在存储设备上运行时,使得计算机执行上述实施例中的数据写入方法。Embodiments of the present application also provide a computer-readable medium, where the computer-readable medium stores a computer program (also referred to as code, or instruction), when it runs on a storage device, to cause a computer to execute the above-mentioned embodiments. Data write method.
本申请实施例还提供了一种芯片系统,包括存储器和处理器,该存储器用于存储计算机程序,该处理器用于从存储器中调用并运行该计算机程序,使得安装有该芯片系统的闪存控制装置执行上述实施例中的闪存控制方法。An embodiment of the present application also provides a chip system, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the flash memory control device installed with the chip system The flash memory control method in the above embodiment is executed.
其中,该芯片系统可以包括用于发送信息或数据的输入电路或者接口,以及用于接收信息或数据的输出电路或者接口。Wherein, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
本申请实施例还提供了一种芯片系统,包括存储器和处理器,该存储器用于存储计算机程序,该处理器用于从存储器中调用并运行该计算机程序,使得安装有该芯片系统的存储设备执行上述实施例中的FTL表项处理方法。An embodiment of the present application further provides a chip system, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a storage device installed with the chip system executes the The FTL table entry processing method in the above embodiment.
其中,该芯片系统可以包括用于发送信息或数据的输入电路或者接口,以及用于接收信息或数据的输出电路或者接口。Wherein, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
本申请实施例还提供了一种芯片系统,包括存储器和处理器,该存储器用于存储计算机程序,该处理器用于从存储器中调用并运行该计算机程序,使得安装有该芯片系统的存储设备执行上述实施例中的数据读取和/或数据写入方法。An embodiment of the present application further provides a chip system, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a storage device installed with the chip system executes the The data reading and/or data writing methods in the above embodiments.
其中,该芯片系统可以包括用于发送信息或数据的输入电路或者接口,以及用于接收信息或数据的输出电路或者接口。Wherein, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
术语“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The term "and/or", which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can mean: the existence of A alone, the existence of A and B at the same time, the case of the existence of B alone, where A , B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship.
应理解,说明书通篇中提到的“一些实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一些实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It is to be understood that reference throughout the specification to "some embodiments" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiments is included in at least one embodiment of the present application. Thus, appearances of "in some embodiments" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that, in combination with the method steps described in the embodiments disclosed herein, they can be implemented in electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the interchangeability of hardware and software In the foregoing specification, steps of various embodiments have been described generally in terms of functionality. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Persons of ordinary skill in the art may use different methods of implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of this application.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各种说明性逻辑块(illustrative logical block)和步骤(step),能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware accomplish. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and module described above can refer to the corresponding process in the foregoing method embodiments, which is not repeated here.
在本申请所提供的几个实施例中,可以理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it can be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个单元中。In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist physically alone, or two or more modules may be integrated in one unit.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (15)

  1. 一种闪存控制装置,其特征在于,包括:A flash memory control device, characterized in that it includes:
    随机存储器,用于存储闪存转换层FTL二级表;Random access memory, used to store the flash translation layer FTL secondary table;
    控制器,用于:Controller for:
    接收主机发送的数据访问指令,所述数据访问指令包括目标数据的目标逻辑块地址LBA;receiving a data access instruction sent by the host, where the data access instruction includes the target logical block address LBA of the target data;
    在所述FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且所述第一条目对应有效数据空间的情况下,根据所述目标LBA和所述第一条目中的起始PPN访问所述目标数据,所述起始PPN是所述第一条目指示的LBA地址段中第一个LBA对应的PPN。In the case that the physical page numbers PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table are consecutive, and the first entry corresponds to the valid data space, according to the target LBA and the first The starting PPN in the entry accesses the target data, and the starting PPN is the PPN corresponding to the first LBA in the LBA address segment indicated by the first entry.
  2. 根据权利要求1所述的装置,其特征在于,在所述FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且所述第一条目对应无效数据空间的情况下,所述控制器还用于:The device according to claim 1, wherein the physical page numbers PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table are consecutive, and the first entry corresponds to the invalid data space case, the controller is also used to:
    向主机发送指示信息,所述指示信息用于指示所述数据访问无效。Sending indication information to the host, where the indication information is used to indicate that the data access is invalid.
  3. 根据权利要求1或2所述的装置,其特征在于,所述控制器具体用于:The device according to claim 1 or 2, wherein the controller is specifically used for:
    获取所述目标LBA的偏移,所述目标LBA的偏移是所述目标LBA与所述第一条目指示的所述LBA地址段中的第一个LBA的差;Obtain the offset of the target LBA, where the offset of the target LBA is the difference between the target LBA and the first LBA in the LBA address segment indicated by the first entry;
    根据所述偏移和所述起始PPN,访问所述目标数据。The target data is accessed based on the offset and the starting PPN.
  4. 根据权利要求3所述的装置,其特征在于,所述控制器具体用于:The device according to claim 3, wherein the controller is specifically configured to:
    根据所述偏移和所述起始PPN,确定所述目标数据的目标LBA对应的目标PPN,所述目标PPN是所述起始PPN与所述偏移的和;According to the offset and the starting PPN, determine a target PPN corresponding to the target LBA of the target data, where the target PPN is the sum of the starting PPN and the offset;
    根据所述目标PPN访问所述目标数据。The target data is accessed according to the target PPN.
  5. 根据权利要求1-4中任一项所述的装置,其特征在于,所述控制器还用于:The device according to any one of claims 1-4, wherein the controller is further configured to:
    接收主机发送的数据写入指令,所述数据写入指令包括待写入数据;receiving a data write instruction sent by the host, where the data write instruction includes data to be written;
    为所述待写入数据分配写入地址;Allocate a write address for the data to be written;
    对所述待写入数据进行数据写入控制。Data write control is performed on the data to be written.
  6. 根据权利要求5所述的装置,其特征在于,所述控制器具体用于:The device according to claim 5, wherein the controller is specifically configured to:
    确定所述写入地址所在的所述第一条目指示的LBA地址段对应的PPN连续;Determine that the PPNs corresponding to the LBA address segment indicated by the first entry where the write address is located are continuous;
    在所述第一条目中记录所述起始PPN。The starting PPN is recorded in the first entry.
  7. 根据权利要求1-6中任一项所述的装置,其特征在于,所述第一条目中包括空间缩减标志,所述空间缩减标志用于指示所述第一条目对应有效数据空间,或者所述空间缩减标志用于指示所述第一条目对应无效数据空间。The apparatus according to any one of claims 1-6, wherein the first entry includes a space reduction flag, and the space reduction flag is used to indicate that the first entry corresponds to a valid data space, Or the space reduction flag is used to indicate that the first entry corresponds to invalid data space.
  8. 一种闪存控制方法,其特征在于,所述方法包括:A flash memory control method, characterized in that the method comprises:
    接收主机发送的数据访问指令,所述数据访问指令包括目标数据的目标逻辑块地址LBA;receiving a data access instruction sent by the host, where the data access instruction includes the target logical block address LBA of the target data;
    在闪存转换层FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且所述第一条目对应有效数据空间的情况下,根据所述目标LBA和所述第一条目中的 起始PPN访问所述目标数据,所述起始PPN是所述第一条目指示的LBA地址段中第一个LBA对应的PPN。In the case that the physical page numbers PPN corresponding to the LBA address segment indicated by the first entry of the flash translation layer FTL secondary table are consecutive, and the first entry corresponds to the valid data space, according to the target LBA and the third The starting PPN in an entry accesses the target data, and the starting PPN is the PPN corresponding to the first LBA in the LBA address segment indicated by the first entry.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    在所述FTL二级表的第一条目指示的LBA地址段对应的物理页号PPN连续,并且所述第一条目对应无效数据空间的情况下,向主机发送指示信息,所述指示信息用于指示所述数据访问无效。In the case that the physical page number PPN corresponding to the LBA address segment indicated by the first entry of the FTL secondary table is continuous, and the first entry corresponds to the invalid data space, send indication information to the host, the indication information Used to indicate that the data access is invalid.
  10. 根据权利要求8或9所述的方法,其特征在于,所述根据所述目标LBA和所述第一条目中的起始PPN访问所述目标数据包括:The method according to claim 8 or 9, wherein the accessing the target data according to the target LBA and the starting PPN in the first entry comprises:
    获取所述目标LBA的偏移,所述目标LBA的偏移是所述目标LBA与所述第一条目指示的所述LBA地址段中的第一个LBA的差;Obtain the offset of the target LBA, where the offset of the target LBA is the difference between the target LBA and the first LBA in the LBA address segment indicated by the first entry;
    根据所述偏移和所述起始PPN,访问所述目标数据。The target data is accessed based on the offset and the starting PPN.
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述偏移和所述起始PPN,访问所述目标数据包括:The method according to claim 10, wherein the accessing the target data according to the offset and the starting PPN comprises:
    根据所述偏移和所述起始PPN,确定所述目标数据的目标LBA对应的目标PPN,所述目标PPN是所述起始PPN与所述偏移的和;According to the offset and the starting PPN, determine a target PPN corresponding to the target LBA of the target data, where the target PPN is the sum of the starting PPN and the offset;
    根据所述目标PPN访问所述目标数据。The target data is accessed according to the target PPN.
  12. 根据权利要求8-11中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8-11, wherein the method further comprises:
    接收主机发送的数据写入指令,所述数据写入指令包括待写入数据;receiving a data write instruction sent by the host, where the data write instruction includes data to be written;
    为所述待写入数据分配写入地址;Allocate a write address for the data to be written;
    对所述待写入数据进行数据写入控制。Data write control is performed on the data to be written.
  13. 根据权利要求12所述的方法,其特征在于,所述对所述待写入数据进行数据写入控制包括:The method according to claim 12, wherein the performing data write control on the to-be-written data comprises:
    确定所述写入地址所在的所述第一条目指示的LBA地址段对应的PPN连续;Determine that the PPNs corresponding to the LBA address segment indicated by the first entry where the write address is located are continuous;
    在所述第一条目中记录所述起始PPN。The starting PPN is recorded in the first entry.
  14. 根据权利要求8-13中任一项所述的方法,其特征在于:所述第一条目中包括空间缩减标志,所述空间缩减标志用于指示所述第一条目对应有效数据空间,或者所述空间缩减标志用于指示所述第一条目对应无效数据空间。The method according to any one of claims 8-13, wherein: the first entry includes a space reduction flag, and the space reduction flag is used to indicate that the first entry corresponds to a valid data space, Or the space reduction flag is used to indicate that the first entry corresponds to invalid data space.
  15. 一种芯片,所述芯片包括处理器、存储器与数据接口,所述处理器通过所述数据接口读取所述存储器上存储的指令,执行如权利要求8-14中任一项所述的闪存控制方法。A chip, the chip includes a processor, a memory and a data interface, the processor reads the instructions stored on the memory through the data interface, and executes the flash memory according to any one of claims 8-14 Control Method.
PCT/CN2020/106229 2020-07-31 2020-07-31 Flash memory control method and device WO2022021337A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/106229 WO2022021337A1 (en) 2020-07-31 2020-07-31 Flash memory control method and device
CN202080101642.4A CN115668153A (en) 2020-07-31 2020-07-31 Flash memory control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/106229 WO2022021337A1 (en) 2020-07-31 2020-07-31 Flash memory control method and device

Publications (1)

Publication Number Publication Date
WO2022021337A1 true WO2022021337A1 (en) 2022-02-03

Family

ID=80037325

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106229 WO2022021337A1 (en) 2020-07-31 2020-07-31 Flash memory control method and device

Country Status (2)

Country Link
CN (1) CN115668153A (en)
WO (1) WO2022021337A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937319A (en) * 2009-06-29 2011-01-05 联发科技股份有限公司 Memory systems and mapping methods thereof
CN102521160A (en) * 2011-12-22 2012-06-27 上海交通大学 Write buffer detector, addressing method of written data and parallel channel write method
US20130185485A1 (en) * 2012-01-18 2013-07-18 Samsung Electronics Co., Ltd. Non-Volatile Memory Devices Using A Mapping Manager

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937319A (en) * 2009-06-29 2011-01-05 联发科技股份有限公司 Memory systems and mapping methods thereof
CN102521160A (en) * 2011-12-22 2012-06-27 上海交通大学 Write buffer detector, addressing method of written data and parallel channel write method
US20130185485A1 (en) * 2012-01-18 2013-07-18 Samsung Electronics Co., Ltd. Non-Volatile Memory Devices Using A Mapping Manager

Also Published As

Publication number Publication date
CN115668153A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US11893238B2 (en) Method of controlling nonvolatile semiconductor memory
US11669444B2 (en) Computing system and method for controlling storage device
US11467955B2 (en) Memory system and method for controlling nonvolatile memory
US10915475B2 (en) Methods and apparatus for variable size logical page management based on hot and cold data
KR20050034127A (en) Flash memory controling apparatus for xip in serial flash memory considering page priority and method using thereof and flash memory chip thereof
CN105095116A (en) Cache replacing method, cache controller and processor
TWI726314B (en) A data storage device and a data processing method
CN103744611A (en) Computer system based on solid state disc as cache and cache accelerating method
CN110968269A (en) SCM and SSD-based key value storage system and read-write request processing method
US20190146909A1 (en) Valid data management method and storage controller
WO2016138785A1 (en) Method and device for running process
CN108664217B (en) Caching method and system for reducing jitter of writing performance of solid-state disk storage system
US20240020014A1 (en) Method for Writing Data to Solid-State Drive
TWI749903B (en) Flash memory controller, memory device and method for accessing flash memory module
CN113407120A (en) Mapping table management method and device based on HMB and computer equipment
CN115203079A (en) Method for writing data into solid state disk
CN111352865B (en) Write caching for memory controllers
WO2022021337A1 (en) Flash memory control method and device
TWI755168B (en) Flash memory controller mechanism capable of generating host-based cache information or flash-memory-based cache information to build and optimize binary tree with fewer nodes when cache stores data from host
CN114610654A (en) Solid-state storage device and method for writing data into solid-state storage device
CN115344201A (en) Data storage method, data query method and device
CN116364148A (en) Wear balancing method and system for distributed full flash memory system
CN109840219B (en) Address translation system and method for mass solid state storage device
TWI814590B (en) Data processing method and the associated data storage device
Vishwakarma et al. Enhancing eMMC using multi-stream technique

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20947036

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20947036

Country of ref document: EP

Kind code of ref document: A1