CN107315648B - Method for improving data moving performance during bad block management - Google Patents

Method for improving data moving performance during bad block management Download PDF

Info

Publication number
CN107315648B
CN107315648B CN201710513873.6A CN201710513873A CN107315648B CN 107315648 B CN107315648 B CN 107315648B CN 201710513873 A CN201710513873 A CN 201710513873A CN 107315648 B CN107315648 B CN 107315648B
Authority
CN
China
Prior art keywords
data
block
page
bad block
page address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710513873.6A
Other languages
Chinese (zh)
Other versions
CN107315648A (en
Inventor
王志奇
何欣霖
周道双
陈早
何卫国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu 30javee Microelectronics Co ltd
Original Assignee
Chengdu 30javee Microelectronics Co ltd
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 Chengdu 30javee Microelectronics Co ltd filed Critical Chengdu 30javee Microelectronics Co ltd
Priority to CN201710513873.6A priority Critical patent/CN107315648B/en
Publication of CN107315648A publication Critical patent/CN107315648A/en
Application granted granted Critical
Publication of CN107315648B publication Critical patent/CN107315648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • 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
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)

Abstract

The invention discloses a method for improving data moving performance during bad block management, which specifically comprises the following steps: (1) writing a data structure LPA _ LOG storing a logical page address PLA corresponding to the physical page address PPA into the NAND Flash page; (2) and recovering bad block data: (2-1) after the data of the block is abnormal, reading the data and the data structure LPA _ LOG stored in the block page, and acquiring a logical page address PLA corresponding to the physical page address PPA; (2-2) copying the block page data to a new page, and rewriting the data structure LPA _ LOG in the new page; (2-3) modifying a new physical page address PPA' corresponding to the logical page address PLA in the address mapping table; and (2-4) after the data of all pages of the block are moved, marking the block as a bad block and adding the bad block into a bad block list for management. When bad block data is moved, the logical page address PLA can be directly obtained from the data structure LPA _ LOG without traversing the address mapping table, and the efficiency and the performance of moving the bad block data are effectively improved.

Description

Method for improving data moving performance during bad block management
Technical Field
The invention relates to bad block data moving, in particular to a method for improving data moving performance during bad block management.
Background
The rapid development of the semiconductor industry appears a high-performance memory NAND Flash, the NAND Flash memory uses a semiconductor as a storage medium, has the advantages of high speed, low energy consumption, shock resistance and the like, and a basic storage unit of the NAND Flash is formed by blocks (Block). Each block is in turn made up of several pages (pages). The minimum read/write unit is a page, the minimum erase unit is a block, and before a page is programmed, the block where the page is located needs to be erased. Due to the property of NAND Flash, the erasing times of a single block are limited, the capacity is increased along with the advanced process, the erasing times of the single block of NAND Flash are reduced, and from 10 ten thousand erasing times of SLC type NAND Flash to hundreds of erasing times of current TLC type NAND Flash, the wear balance management method is particularly important for NAND Flash, the performance and efficiency of NAND Flash can be improved, and the service life of NAND Flash can be greatly prolonged. Based on the above, a series of management algorithms for NAND Flash appears, and the core of the management algorithms all comprises several major parts of address mapping, wear leveling, garbage collection and bad block management, wherein the bad block management is an important part of the NAND Flash management algorithms.
Due to the NAND Flash manufacturing process, manufacturers cannot guarantee that all the block states of NAND Flash are good when the NAND Flash leaves a factory, some bad blocks exist when the NAND Flash leaves the factory, the bad block manufacturers mark the bad blocks when leaving the factory, a bad block management algorithm reads the flag bits when the bad block management algorithm is initialized, and the blocks are added into a bad block list for management. Because the NAND Flash can also cause bad blocks due to various exceptions in the use process, the bad block management algorithm can add the bad blocks in the use process into the bad block list for management. In this process, if there is data in the bad block, a process of moving the data is required, and after the moving is completed, the address mapping table needs to be updated. For a large-capacity solid-state storage device, in order to pursue high performance, a page mapping mechanism is mostly adopted, under the mapping mechanism, a NAND Flash mapping table indicates a mapping relationship from a Logical Page Address (LPA) to a Physical Page Address (PPA), that is, the PPA can be conveniently found through the LPA, but after a bad block occurs during data writing, all data stored in the block needs to be copied into a new block, then the LPA is found through PPA reversal, and the normal data can be ensured only by modifying the mapping relationship between the LPA and the new PPA, as shown in fig. 1. For NAND Flash, the larger the capacity, the larger the address mapping table, for example, 33536 blocks for 2Tb series NANDFlash with L85C capacity, each block having 512 pages, i.e. 33536 × 512 — 17170432 pages in total, and 17170432 entries in total are required for the mapping table. For SSD with large capacity, the required entries are multiplied, and so many entries are searchedThe LPA corresponding to the PPA requires a large amount of time, and is set to T0For the nand flash of the L85C series, each block has 512 pages, and the time required for data transfer is 512T0This is unacceptable for high speed data read and write applications.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the existing problems, the high-efficiency bad block data moving method without traversing the address mapping table is provided.
The technical scheme adopted by the invention is as follows:
a method for improving data moving performance in bad block management, the minimum erasing unit of NAND Flash is a block, the block is composed of pages, the pages are divided into data segments and additional segments, the method includes the following steps:
(1) writing a data structure LPA _ LOG storing a logical page address PLA corresponding to the physical page address PPA into the NAND Flash page;
(2) and recovering bad block data:
(2-1) after the data of the block is abnormal, reading the data and the data structure LPA _ LOG stored in the block page, and acquiring a logical page address PLA corresponding to the physical page address PPA;
(2-2) copying the block page data to a new page, and rewriting the data structure LPA _ LOG in the new page;
(2-3) modifying a new physical page address PPA' corresponding to the logical page address PLA in the address mapping table;
and (2-4) after the data of all pages of the block are moved, marking the block as a bad block and adding the bad block into a bad block list for management.
Furthermore, in the step (1), along with the storing of data into the NAND Flash page by the user, the NAND Flash driver writes the data structure LPA _ LOG storing the logical page address PLA corresponding to the physical page address PPA into the page appended segment.
Further, after the block data is abnormal in the step (2), the block can be marked as a bad block to be recovered, a data read-write request of the upper computer is responded preferentially, and then page data moving is carried out.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that: when the bad block data needs to be moved, the logical page address PLA corresponding to the physical page address PPA can be directly obtained from the data structure LPA _ LOG without traversing an address mapping table, and the moving efficiency and performance of the bad block data are effectively improved.
Drawings
The invention will now be described, by way of example, with reference to the accompanying drawings, in which:
FIG. 1 is a flowchart of a method for recycling bad block data according to the present invention
Detailed Description
All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.
Any feature disclosed in this specification may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.
A method for improving data moving performance in bad block management, the minimum erasing unit of NAND Flash is a block, the block is composed of pages, the pages are divided into data segments and additional segments, the method includes the following steps:
(1) writing a data structure LPA _ LOG storing a logical page address PLA corresponding to the physical page address PPA into the NAND Flash page;
(2) and recovering bad block data:
(2-1) after the data of the block is abnormal, reading the data and the data structure LPA _ LOG stored in the block page, and acquiring a logical page address PLA corresponding to the physical page address PPA;
(2-2) copying the block page data to a new page, and rewriting the data structure LPA _ LOG in the new page;
(2-3) modifying a new physical page address PPA' corresponding to the logical page address PLA in the address mapping table;
and (2-4) after the data of all pages of the block are moved, marking the block as a bad block and adding the bad block into a bad block list for management.
In order to improve the write-in performance, the NAND Flash adopts a remote update strategy, that is, one logical page address LPA can correspond to a plurality of physical page addresses PPA, wherein only one physical page address PPA stores valid data, and the rest is outdated data, and can be used as recycled data or not used. Effective data can be obtained only by searching the physical page address PPA and finding the corresponding relation between the logical page address LPA and the physical page address PPA.
In the step (1), along with the storage of data into the NAND Flash page by the user, the NAND Flash driver writes the data structure LPA _ LOG in which the logical page address PLA corresponding to the physical page address PPA is stored in the additional section of the page. When the user does not store data into NAND Flash, the NAND Flash driver does not write the data structure LPA _ LOG in the page. The writing of the data structure LPA _ LOG occurs with the user saving data into the NAND Flash page.
When the page data is shifted out from the bad block, the data structure LPA _ LOG in the page appended segment is not shifted with the page data. When the page data is copied to a new page, the NAND Flash drive executes the process of the step (1) to write the data structure LPA _ LOG in which the logical page address PLA corresponding to the new physical page address PPA' is stored in the additional segment of the new page.
Optimally, after the block data in the step (2) is abnormal, the block can be marked as a bad block to be recovered, the data read-write request of the upper computer is responded preferentially, and after the data request of the upper computer is completed, the step (2-1), the step (2-2) and the step (2-3) are executed to recover the bad block data. Before data recovery, the abnormal data blocks are marked as bad blocks to be recovered, and the data read-write request of the upper computer is responded preferentially, so that the moving efficiency and performance of the bad block data are effectively improved.
The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed.

Claims (3)

1. A method for improving data moving performance in bad block management, the minimum erasing unit of NAND Flash is a block, the block is composed of pages, the pages are divided into data segments and additional segments, characterized in that, the method includes steps:
(1) writing a data structure LPA _ LOG storing a logical page address PLA corresponding to the physical page address PPA into the NAND Flash page;
(2) and recovering bad block data:
(2-1) after the data of the block is abnormal, reading the data and the data structure LPA _ LOG stored in the block page, and acquiring a logical page address PLA corresponding to the physical page address PPA;
(2-2) copying the block page data to a new page, and rewriting the data structure LPA _ LOG in the new page;
(2-3) modifying a new physical page address PPA' corresponding to the logical page address PLA in the address mapping table;
and (2-4) after the data of all pages of the block are moved, marking the block as a bad block and adding the bad block into a bad block list for management.
2. The method according to claim 1, wherein in step (1), along with the user saving data in the NAND Flash page, the NAND Flash driver writes a data structure LPA _ LOG storing the logical page address PLA corresponding to the physical page address PPA in the page addition segment.
3. The method for improving data moving performance in bad block management according to claim 1, wherein after the block data is abnormal in step (2), the block is marked as a bad block to be recovered, and the page data moving is performed after preferentially responding to the data read-write request of the upper computer.
CN201710513873.6A 2017-06-29 2017-06-29 Method for improving data moving performance during bad block management Active CN107315648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710513873.6A CN107315648B (en) 2017-06-29 2017-06-29 Method for improving data moving performance during bad block management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710513873.6A CN107315648B (en) 2017-06-29 2017-06-29 Method for improving data moving performance during bad block management

Publications (2)

Publication Number Publication Date
CN107315648A CN107315648A (en) 2017-11-03
CN107315648B true CN107315648B (en) 2020-07-03

Family

ID=60179804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710513873.6A Active CN107315648B (en) 2017-06-29 2017-06-29 Method for improving data moving performance during bad block management

Country Status (1)

Country Link
CN (1) CN107315648B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075211A (en) * 2007-06-08 2007-11-21 马彩艳 Flash memory management based on sector access
CN103559144A (en) * 2013-11-12 2014-02-05 上海华兴数字科技有限公司 Method and device for secure data storage of embedded system
US9122586B2 (en) * 2013-02-06 2015-09-01 Seagate Technology Llc Physical-to-logical address map to speed up a recycle operation in a solid state drive
CN105389266A (en) * 2015-10-16 2016-03-09 联想(北京)有限公司 Data management method and apparatus
CN106528436A (en) * 2015-09-15 2017-03-22 慧荣科技股份有限公司 Data storage device and data maintenance method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075211A (en) * 2007-06-08 2007-11-21 马彩艳 Flash memory management based on sector access
US9122586B2 (en) * 2013-02-06 2015-09-01 Seagate Technology Llc Physical-to-logical address map to speed up a recycle operation in a solid state drive
CN103559144A (en) * 2013-11-12 2014-02-05 上海华兴数字科技有限公司 Method and device for secure data storage of embedded system
CN106528436A (en) * 2015-09-15 2017-03-22 慧荣科技股份有限公司 Data storage device and data maintenance method thereof
CN105389266A (en) * 2015-10-16 2016-03-09 联想(北京)有限公司 Data management method and apparatus

Also Published As

Publication number Publication date
CN107315648A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
TWI442399B (en) Memory apparatus and method for accessing a flash memory, and method of evenly using blocks of the flash memory
US10725930B2 (en) Logical to physical memory address mapping tree
KR100706242B1 (en) Memory system and run level address mapping table forming method thereof
US8407397B2 (en) Block management method for flash memory and controller and storage system using the same
TWI398770B (en) Data accessing method for flash memory and storage system and controller using the same
TWI537728B (en) Buffer memory management method, memory control circuit unit and memory storage device
CN102981963B (en) A kind of implementation method of flash translation layer (FTL) of solid-state disk
CN102508788B (en) SSD (solid state drive) and SSD garbage collection method and device
TWI584122B (en) Buffer memory management method, memory control circuit unit and memory storage device
US8392691B2 (en) Data management method, memory controller and memory storage apparatus
US20130054878A1 (en) Solid state drive and wear-leveling control method thereof
US8037236B2 (en) Flash memory writing method and storage system and controller using the same
US8819387B2 (en) Memory storage device, memory controller, and method for identifying valid data
CN108733577B (en) Memory management method, memory control circuit unit and memory storage device
CN111580754B (en) Write-friendly flash memory solid-state disk cache management method
US20100318726A1 (en) Memory system and memory system managing method
CN104424110A (en) Active recovery of solid state drive
CN109669889B (en) Light Nor Flash control method and device
CN104598386A (en) Method for recycling solid state drive block by tracking and utilizing secondary mapping index
CN111104045A (en) Storage control method, device, equipment and computer storage medium
US8954646B2 (en) Method for managing a plurality of blocks of a flash memory, and associated memory device and controller thereof
US20150205538A1 (en) Storage apparatus and method for selecting storage area where data is written
CN109840218B (en) Effective data management method and storage controller
TWI677790B (en) Valid data management method and storage controller
CN113190180A (en) Storage device based on mixed media and distributed storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant