CN107832237B - Method for quickly reconstructing unmapped table and solid state disk - Google Patents

Method for quickly reconstructing unmapped table and solid state disk Download PDF

Info

Publication number
CN107832237B
CN107832237B CN201711172395.3A CN201711172395A CN107832237B CN 107832237 B CN107832237 B CN 107832237B CN 201711172395 A CN201711172395 A CN 201711172395A CN 107832237 B CN107832237 B CN 107832237B
Authority
CN
China
Prior art keywords
unmapped
solid state
state disk
mapping
mapping table
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
CN201711172395.3A
Other languages
Chinese (zh)
Other versions
CN107832237A (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.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System 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 Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN201711172395.3A priority Critical patent/CN107832237B/en
Publication of CN107832237A publication Critical patent/CN107832237A/en
Application granted granted Critical
Publication of CN107832237B publication Critical patent/CN107832237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for quickly reconstructing an unmapped table and a solid state disk, which are characterized in that an unmapped table is simultaneously created in a cache of a solid state disk controller by the solid state disk controller when the solid state disk controller creates the unmapped table, the unmapped table is synchronously updated into a nand flash while the mapping table is updated into the nand flash, and data of the unmapped table is read from the nand flash as initial data of the unmapped table in the cache of the solid state disk controller when the solid state disk is electrified. By writing the unmapping table (no mapping table) into the nand flash, the unmapping table (no mapping table) can be directly read from the nand flash after being electrified to generate the unmapping table, and the generation speed of the unmapping table (no mapping table) is accelerated without traversing the whole mapping table.

Description

Method for quickly reconstructing unmapped table and solid state disk
Technical Field
The invention relates to a solid state disk control technology, in particular to a method for quickly reconstructing an unmapped table and a solid state disk.
Background
In the solid-state storage device, a host reads data, which data is read is identified according to a logical address (LBA) number, when the host reads data of an unwritten logical address (LBA), the solid-state storage device needs to return a special (for example, all 0) data of the host to indicate that the data is unwritten, an internal implementation of the solid-state storage device can indicate which logical addresses (LBAs) are unwritten through a mapping table, the data are referred to as no mapping data, and an operation of the host reading the no mapping data is referred to as no mapping read; some devices improve the performance of a host no mapping read by adding a mapping table. The principle of No mapping table is as follows: a mapping granule of a normal mapping table is read into a unit with a size of 4KB, that is, a physical address stored in 4KB data recorded in each piece of mapping information of the mapping table, and assuming that a host needs to read 4MB of data, a range of 4MB/4KB is 1024 mapping information to read all 4MB of data; and the no mapping table may enlarge the granularity of the mapping, for example: recording mapping information according to the granularity of 4MB, and when the host reads the mapping information of 4MB, obtaining the position of the data in the solid state disk by only reading one piece of mapping information; generally, the influence of the time spent on finding the mapping on the reading performance is less, a mapping mode of large-grain reading cannot be adopted for general reading and writing, but the influence on the no mapping reading performance is larger, the no mapping reading does not need to read data of nand flash, and the data can be obtained only by accessing the mapping table, so that the speed of accessing the data by the mapping table can influence the performance of the no mapping reading. Usually, the reconstruction of the no mapping table is reconstructed by scanning the whole mapping table during power-on, and when the mapping table is large, the reconstruction time of the whole scanning is long.
Disclosure of Invention
In view of the above drawbacks, the present invention aims at how to quickly reconstruct an unmapped table.
The invention provides a method for quickly reconstructing an unmapped table, which is characterized in that a solid state disk controller simultaneously creates an unmapped table in a cache of the solid state disk controller when creating a mapping table, simultaneously updates the mapping table to a nand flash and simultaneously synchronously updates the unmapped table to the nand flash, and reads unmapped table data from the nand flash when the solid state disk is electrified as initial data of the unmapped table in the cache of the solid state disk controller.
The method for quickly reconstructing the unmapped table is characterized in that the mapping unit of the unmapped table is larger than that of the mapping table.
The method for quickly reconstructing the unmapped table is characterized by further comprising a check code calculated according to the unmapped table and the mapping table, wherein the check code is used for judging whether the unmapped table and the mapping table are consistent or not.
The method for quickly reconstructing the unmapped table is characterized in that when the unmapped table and the unmapped table are updated into a nandflash, the unmapped table is updated firstly, then the updating is written, finally a writing ending mark is added, the ending mark is checked firstly when the solid state disk is electrified, and if the ending mark is correct, the unmapped table data is continuously read from the nand flash to serve as initial data of the unmapped table in a cache of the solid state disk controller; and if the end mark is abnormal, rescanning the mapping table to generate new initial data of the unmapped table, and updating unmapped table information in the nand flash.
A solid state disk is characterized in that a solid state disk controller creates an unmapped table in a cache of the solid state disk controller when creating a mapping table, updates the mapping table to a nand flash and simultaneously updates the unmapped table to the nand flash, and reads unmapped table data from the nand flash when the solid state disk is powered on as initial data of the unmapped table in the cache of the solid state disk controller.
The solid state disk is characterized in that the mapping unit of the unmapped table is larger than that of the mapped table.
The solid state disk is characterized by further comprising a check code calculated according to the unmapped table and the mapping table, wherein the check code is used for judging whether the unmapped table and the mapping table are consistent or not.
The solid state disk is characterized in that when a mapping table and an unmapped table are updated into a nand flash, the mapping table is updated firstly, then the updating is written, finally a writing ending mark is added, the ending mark is checked firstly when the solid state disk is powered on, and if the ending mark is correct, the data of the unmapped table is continuously read from the nand flash to be used as initial data of the unmapped table in a cache of the solid state disk controller; and if the end mark is abnormal, rescanning the mapping table to generate new initial data of the unmapped table, and updating unmapped table information in the nand flash.
The invention has the beneficial effects that: the no mapping table is written into the nand flash, so that the no mapping table is directly read from the nand flash after being electrified, the generation speed of the no mapping table is accelerated without traversing the whole mapping table.
Drawings
FIG. 1 is a diagram of an update refresh of a mapping table;
FIG. 2 is a general no mapping table generation diagram;
FIG. 3 is a diagram of a no mapping table fast reconstruction mode;
fig. 4 is a diagram of an update process of no mapping table.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a diagram illustrating the update and refresh of a mapping table, which is generally the update of the mapping table and the flow of writing nand flash, and the data write operation or TRI command of the host will result in the update of the mapping table, taking 128GB as an example, and the size of the mapping table is 128 MB. Only part of 128MB data can be updated each time, and when the updated amount reaches a certain threshold (namely, when the 128MB data exceeds the certain threshold, the data is modified), the mapping table is triggered to be written into the nand flash, so that the mapping table can be stored after power failure.
Fig. 2 is a diagram generated by a general no mapping table, which describes a generation manner of the no mapping table under a general condition, after power-on, the whole mapping table is divided into a plurality of intervals with the same size, values of all mapping tables in the intervals are traversed, if all the mapping tables are no mapping, a corresponding field of the no mapping table is set to be 1, otherwise, the corresponding field is set to be 0.
Fig. 3 is a diagram of a no mapping table fast reconstruction mode, which describes a new storage reconstruction mode of the no mapping table, where the whole no mapping table is stored and reconstructed together with a mapping table, the no mapping table is written into a nand flash when the mapping table is written into the nand flash, and the no mapping table is read when the mapping table is read from the nand flash.
Fig. 4 is a diagram of an update process of a no mapping table, which describes an update manner of the no mapping table, and the no mapping table needs to be written into a nand flash with a mapping table, so the no mapping table must be updated together with the mapping table, and the no mapping table needs to be updated in the process of updating the mapping table. The updating mode of the Nomapping table is simple, and the rule is as follows:
A) and if the old mapping information is no mapping and the new mapping information is valid, setting the corresponding no mapping table as false.
B) And scanning the whole mapping information corresponding to the no mapping table if the old mapping information is valid and the new mapping information is invalid, setting the no mapping table to true if all mapping information is invalid, and otherwise, setting false.
In other cases no modification is required.
While the invention has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (4)

1. A method for quickly rebuilding an unmapped table is characterized in that a solid state disk controller creates an unmapped table in a cache of the solid state disk controller when creating a mapping table, updates the mapping table to a nand flash and simultaneously updates the unmapped table to the nand flash synchronously, and reads unmapped table data from the nand flash when the solid state disk is powered on as initial data of the unmapped table in the cache of the solid state disk controller; the mapping unit of the unmapped table is larger than that of the mapping table; the method also comprises a check code calculated according to the unmapped table and the mapping table, wherein the check code is used for judging whether the unmapped table and the mapping table are consistent or not.
2. The method according to claim 1, wherein when updating the mapping table and the unmapped table into the nand flash, the mapping table is updated first, then the update is written, and finally the write-over flag is added, the write-over flag is checked first when the solid state disk is powered on, and if the write-over flag is correct, the unmapped table data is continuously read from the nand flash as the initial data of the unmapped table in the cache of the solid state disk controller; and if the end mark is abnormal, rescanning the mapping table to generate new initial data of the unmapped table, and updating unmapped table information in the nand flash.
3. A solid state disk is characterized in that a solid state disk controller creates an unmapped table in a cache of the solid state disk controller when creating a mapping table, and simultaneously updates the unmapped table to a nand flash while updating the mapping table to the nand flash, and reads unmapped table data from the nand flash when the solid state disk is powered on as initial data of the unmapped table in the cache of the solid state disk controller; the mapping unit of the unmapped table is larger than that of the mapping table; the method also comprises a check code calculated according to the unmapped table and the mapping table, wherein the check code is used for judging whether the unmapped table and the mapping table are consistent or not.
4. The solid state disk of claim 3, wherein when the mapping table and the unmapped table are updated into the nandflash, the mapping table is updated first, then the update is written, and finally the writing end flag is added, the end flag is checked when the solid state disk is powered on, and if the end flag is correct, the data of the unmapped table is continuously read from the nand flash to serve as initial data of the unmapped table in the cache of the solid state disk controller; and if the end mark is abnormal, rescanning the mapping table to generate new initial data of the unmapped table, and updating unmapped table information in the nand flash.
CN201711172395.3A 2017-11-22 2017-11-22 Method for quickly reconstructing unmapped table and solid state disk Active CN107832237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711172395.3A CN107832237B (en) 2017-11-22 2017-11-22 Method for quickly reconstructing unmapped table and solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711172395.3A CN107832237B (en) 2017-11-22 2017-11-22 Method for quickly reconstructing unmapped table and solid state disk

Publications (2)

Publication Number Publication Date
CN107832237A CN107832237A (en) 2018-03-23
CN107832237B true CN107832237B (en) 2020-09-01

Family

ID=61652361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711172395.3A Active CN107832237B (en) 2017-11-22 2017-11-22 Method for quickly reconstructing unmapped table and solid state disk

Country Status (1)

Country Link
CN (1) CN107832237B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549610B (en) * 2018-03-27 2021-02-23 深圳忆联信息系统有限公司 NVMe extension implementation method and solid state disk
US10846235B2 (en) * 2018-04-28 2020-11-24 International Business Machines Corporation Integrated circuit and data processing system supporting attachment of a real address-agnostic accelerator
CN109271329A (en) * 2018-09-01 2019-01-25 苏州韦科韬信息技术有限公司 A method of it improves and rebuilds non-mapping table efficiency
CN109375870A (en) * 2018-09-18 2019-02-22 深圳忆联信息系统有限公司 A kind of method and its system for accelerating SSD main control chip D2H to read without mapping
CN110399312A (en) * 2019-07-30 2019-11-01 深圳大普微电子科技有限公司 Improve method, solid state hard disk and the storage medium of solid state hard disk reading performance
CN111581007A (en) * 2020-05-11 2020-08-25 深圳忆联信息系统有限公司 SSD (solid State drive) quick reconstruction response method and device after power-on and computer equipment
CN113190472B (en) * 2021-05-27 2023-10-13 深圳忆联信息系统有限公司 Method and device for quickly reconstructing NOMAP information of solid-state storage equipment, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461387B (en) * 2014-12-02 2018-04-27 记忆科技(深圳)有限公司 It is a kind of to improve method of the solid state hard disc to the reading performance of non-mapping area
US10635596B2 (en) * 2015-10-02 2020-04-28 Sony Interactive Entertainment Inc. Information processing device, access controller, information processing method, and computer program for accessing memory having access units of different sizes
CN105975215B (en) * 2016-05-25 2019-03-08 深圳大学 A kind of stacked tile type magnetic substance storage translation layer mapping table management method based on Ondemand algorithm
CN106055279B (en) * 2016-06-12 2019-05-10 浪潮(北京)电子信息产业有限公司 Manage the method, apparatus and solid state hard disk of the address mapping table of solid state hard disk
CN106649129A (en) * 2016-09-28 2017-05-10 深圳市金泰克半导体有限公司 Solid state disk with function of version management based on FTL and implement method of solid state disk

Also Published As

Publication number Publication date
CN107832237A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN107832237B (en) Method for quickly reconstructing unmapped table and solid state disk
CN107632939B (en) Mapping table for storage device
KR101852668B1 (en) Address mapping
US8725936B2 (en) Storage system with flash memory, and storage control method
US11126544B2 (en) Method and apparatus for efficient garbage collection based on access probability of data
CN109643275B (en) Wear leveling apparatus and method for storage class memory
CN111752487B (en) Data recovery method and device and solid state disk
KR101813786B1 (en) System and method for copy on write on an ssd
US20170206033A1 (en) Mechanism enabling the use of slow memory to achieve byte addressability and near-dram performance with page remapping scheme
US10372382B2 (en) Methods and apparatus for read disturb detection based on logical domain
US20190188130A1 (en) Data Storage Device and Non-Volatile Memory Control Method
CN104461397A (en) Solid-state drive and read-write method thereof
WO2014074449A2 (en) Wear leveling in flash memory devices with trim commands
US20160224260A1 (en) Logical block address mapping for hard disk drives
US10459803B2 (en) Method for management tables recovery
CN113508382A (en) Selective erasure of data in an SSD
US11645006B2 (en) Read performance of memory devices
US10956065B2 (en) Solid state storage device with quick boot from NAND media
CN110109845B (en) Cache data management method and device, computer equipment and storage medium
CN103984506A (en) Method and system for data writing of flash memory storage equipment
JP2020144974A (en) Method for performing refresh management in memory device, related memory device, and controller thereof
CN105404468B (en) Green and non-solid state disk applications and drives therefor
CN111026678B (en) Cache design method and device based on solid state disk and computer equipment
LU101617B1 (en) Method for improving the efficiency of reconstructing no mapping tables
CN108958657B (en) Data storage method, storage device and 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