CN107832237B - 一种快速重建未映射表的方法及固态硬盘 - Google Patents

一种快速重建未映射表的方法及固态硬盘 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
English (en)
Other versions
CN107832237A (zh
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/zh
Publication of CN107832237A publication Critical patent/CN107832237A/zh
Application granted granted Critical
Publication of CN107832237B publication Critical patent/CN107832237B/zh
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

本发明公开了一种快速重建未映射表的方法及固态硬盘,其特征在于固态硬盘控制器在创建映射表时同时在固态硬盘控制器的缓存中创建未映射表,并在将映射表更新到nand flash的同时同步将未映射表更新到nand flash中,固态硬盘上电时从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据。通过将未映射表(no mapping table)写入到nandflash中,使得上电后直接从nand flash读取生成未映射表(no mapping table),无须通过遍历整个映射表,加速了未映射表(no mapping table)生成速度。

Description

一种快速重建未映射表的方法及固态硬盘
技术领域
本发明涉及固态硬盘控制技术,特别涉及一种快速重建未映射表的方法及固态硬盘。
背景技术
在固态存储设备中,主机读取数据,是按照逻辑地址(LBA)编号来标识读取哪段数据,当主机读取一个没有写过的逻辑地址(LBA)的数据时,这时固态存储设备需要返回主机一个特殊(比如全0)的数据,用以表示这段数据没有写入过,固态设备内部实现可以通过映射表来表示哪些逻辑地址(LBA)没有写入过,这些数据我们称之为no mapping data,主机读取这些no mapping data的操作我们称之为no mapping读;有的设备通过增加nomapping table来提升提升主机no mapping read的性能。No mapping table的原理为:正常的映射表的映射颗粒读为4KB大小的单元,即该映射表每条映射信息记录的4KB数据存放的物理地址,假设主机需要读取4MB的数据,则需要范围4MB/4KB=1024个映射信息来读取全部4MB数据;而no mapping table可以将映射的颗粒度放大,例如:按照4MB的颗粒度去记录映射信息,当主机读取这4MB的映射信息时,只需要读取一条映射信息便可以得出该段数据在固态硬盘的位置;通常查找映射花费的时间的大小对读性能的影响较少,一般读写不会采用大颗粒读的映射方式,不过对no mapping读性能影响较大,这些no mapping读不需要读取nand flash的数据,只需要访问映射表即可以获取数据,因此映射表访问数据的快慢将会影响到no mapping读的性能高低。通常no mapping table的重建是在上电过程中通过扫描整个映射表来重建的,当映射表较大时,整个扫描的重建的时间较长。
发明内容
针对以上缺陷,本发明目的是如何快速重建未映射表。
为了解决以上问题本发明提出了一种快速重建未映射表的方法,其特征在于固态硬盘控制器在创建映射表时同时在固态硬盘控制器的缓存中创建未映射表,并在将映射表更新到nand flash的同时同步将未映射表更新到nand flash中,固态硬盘上电时从nandflash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据。
所述的快速重建未映射表的方法,其特征在于所述未映射表的映射单位比映射表的映射单位大。
所述的快速重建未映射表的方法,其特征在于还包括根据未映射表与映射表计算的校验码,所述校验码用于判断未映射表与映射表是否保持一致。
所述的快速重建未映射表的方法,其特征在于在将映射表和未映射表更新到nandflash中时,先更新映射表,再写入更新,最后增加写入结束标志,固态硬盘上电时先检查结束标志,如果结束标志正确则继续从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据;如果结束标志异常则重新扫描映射表生成新的未映射表的初始数据,并更新nand flash中的未映射表信息。
一种固态硬盘,其特征在于固态硬盘控制器在创建映射表时同时在固态硬盘控制器的缓存中创建未映射表,并在将映射表更新到nand flash的同时同步将未映射表更新到nand flash中,固态硬盘上电时从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据。
所述的固态硬盘,其特征在于所述未映射表的映射单位比映射表的映射单位大。
所述的固态硬盘,其特征在于还包括根据未映射表与映射表计算的校验码,所述校验码用于判断未映射表与映射表是否保持一致。
所述的固态硬盘,其特征在于在将映射表和未映射表更新到nand flash中时,先更新映射表,再写入更新,最后增加写入结束标志,固态硬盘上电时先检查结束标志,如果结束标志正确则继续从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据;如果结束标志异常则重新扫描映射表生成新的未映射表的初始数据,并更新nand flash中的未映射表信息。
本发明的有益效果是:通过将no mapping table写入到nand flash中,使得上电后直接从nand flash读取生成no mapping table,无须通过遍历整个映射表,加速了nomapping table生成速度。
附图说明
图1是映射表的更新刷新图示;
图2是一般no mapping table生成图;
图3是no mapping table快速重建方式图示;
图4是no mapping tableno mapping table的更新过程图示。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1是映射表的更新刷新图示,一般情况下的映射表的更新以及写入nand flash的流程,主机的数据写入操作或者TRI M命令会导致映射表的更新,以128GB为例,映射表的大小为128MB。每次更新只会更新这128MB的部分数据,当更新的量达到一定阈值时(即128MB的数据有超过一定阈值的数据被修改时)就会触发映射表写入到nand flash中,保证掉电后映射表能够保存起来。
图2是一般no mapping table生成图,描述了一般情况下no mapping table的生成方式,上电后将整个映射表划分为若干个一样大小的区间,遍历这些区间里所有映射表的值,如果全部为no mapping的,则设置no mapping table对应字段为1,否则为0。
图3是no mapping table快速重建方式图示,描述了no mapping table的新的存储重建方式,整个no mapping table同映射表一同存储重建,在将映射表写入nand flash时同时将nomapping table写入nand flash,从nand flash读取映射表时同时读取nomapping table。
图4是no mapping tableno mapping table的更新过程图示,描述了no mappingtable的更新方式,由于no mapping table需要同映射表写入nand flash,所以no mappingtable必须同映射表一起更新,故在更新映射表过程中需要更新no mapping table。Nomapping table的更新方式较简单,规则如下:
A)旧的映射信息为no mapping,新的映射信息为有效,则设置对应no mappingtable为false.
B)旧的映射信息为有效,新的映射信息为无效,扫描no mapping table对应整段映射信息,若全部为无效,则设置no mapping table为true,否则为false。
其它情况下不需要修改。
以上所揭露的仅为本发明一种实施例而已,当然不能以此来限定本之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于本发明所涵盖的范围。

Claims (4)

1.一种快速重建未映射表的方法,其特征在于固态硬盘控制器在创建映射表时同时在固态硬盘控制器的缓存中创建未映射表,并在将映射表更新到nandflash的同时同步将未映射表更新到nand flash中,固态硬盘上电时从nandflash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据;所述未映射表的映射单位比映射表的映射单位大;还包括根据未映射表与映射表计算的校验码,所述校验码用于判断未映射表与映射表是否保持一致。
2.根据权利要求1所述的快速重建未映射表的方法,其特征在于在将映射表和未映射表更新到nand flash中时,先更新映射表,再写入更新,最后增加写入结束标志,固态硬盘上电时先检查结束标志,如果结束标志正确则继续从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据;如果结束标志异常则重新扫描映射表生成新的未映射表的初始数据,并更新nand flash中的未映射表信息。
3.一种固态硬盘,其特征在于固态硬盘控制器在创建映射表时同时在固态硬盘控制器的缓存中创建未映射表,并在将映射表更新到nand flash的同时同步将未映射表更新到nand flash中,固态硬盘上电时从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据;所述未映射表的映射单位比映射表的映射单位大;还包括根据未映射表与映射表计算的校验码,所述校验码用于判断未映射表与映射表是否保持一致。
4.根据权利要求3所述的固态硬盘,其特征在于在将映射表和未映射表更新到nandflash中时,先更新映射表,再写入更新,最后增加写入结束标志,固态硬盘上电时先检查结束标志,如果结束标志正确则继续从nand flash中读取未映射表数据作为在固态硬盘控制器的缓存中的未映射表的初始数据;如果结束标志异常则重新扫描映射表生成新的未映射表的初始数据,并更新nand flash中的未映射表信息。
CN201711172395.3A 2017-11-22 2017-11-22 一种快速重建未映射表的方法及固态硬盘 Active CN107832237B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711172395.3A CN107832237B (zh) 2017-11-22 2017-11-22 一种快速重建未映射表的方法及固态硬盘

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711172395.3A CN107832237B (zh) 2017-11-22 2017-11-22 一种快速重建未映射表的方法及固态硬盘

Publications (2)

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

Family

ID=61652361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711172395.3A Active CN107832237B (zh) 2017-11-22 2017-11-22 一种快速重建未映射表的方法及固态硬盘

Country Status (1)

Country Link
CN (1) CN107832237B (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549610B (zh) * 2018-03-27 2021-02-23 深圳忆联信息***有限公司 一种NVMe扩展的实现方法及固态硬盘
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 (zh) * 2018-09-01 2019-01-25 苏州韦科韬信息技术有限公司 一种提高重建未映射表效率的方法
CN109375870A (zh) * 2018-09-18 2019-02-22 深圳忆联信息***有限公司 一种加速ssd主控芯片d2h无映射读取的方法及其***
CN110399312A (zh) * 2019-07-30 2019-11-01 深圳大普微电子科技有限公司 提高固态硬盘读性能的方法、固态硬盘及存储介质
CN111581007A (zh) * 2020-05-11 2020-08-25 深圳忆联信息***有限公司 Ssd上电后快速重建响应方法、装置和计算机设备
CN113190472B (zh) * 2021-05-27 2023-10-13 深圳忆联信息***有限公司 固态存储设备nomap信息快速重建方法、装置、计算机设备及存储介质
CN118155673A (zh) * 2024-05-09 2024-06-07 成都佰维存储科技有限公司 分段上电恢复方法、装置、计算机设备及可读存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461387B (zh) * 2014-12-02 2018-04-27 记忆科技(深圳)有限公司 一种提高固态硬盘对未映射区域的读性能的方法
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 (zh) * 2016-05-25 2019-03-08 深圳大学 一种基于Ondemand算法的叠瓦式磁质存储翻译层映射表管理方法
CN106055279B (zh) * 2016-06-12 2019-05-10 浪潮(北京)电子信息产业有限公司 管理固态硬盘的地址映射表的方法、装置及固态硬盘
CN106649129A (zh) * 2016-09-28 2017-05-10 深圳市金泰克半导体有限公司 一种基于ftl的具有版本管理功能的固态硬盘及其实现方法

Also Published As

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

Similar Documents

Publication Publication Date Title
CN107832237B (zh) 一种快速重建未映射表的方法及固态硬盘
CN107632939B (zh) 用于存储装置的映射表
KR101852668B1 (ko) 어드레스 매핑
US8725936B2 (en) Storage system with flash memory, and storage control method
CN109643275B (zh) 存储级存储器的磨损均衡设备和方法
US11126544B2 (en) Method and apparatus for efficient garbage collection based on access probability of data
CN111752487B (zh) 一种数据恢复方法、装置及固态硬盘
KR101813786B1 (ko) Ssd 상의 기록-시-복사를 위한 시스템 및 방법
US10372382B2 (en) Methods and apparatus for read disturb detection based on logical domain
US20170206033A1 (en) Mechanism enabling the use of slow memory to achieve byte addressability and near-dram performance with page remapping scheme
US20190188130A1 (en) Data Storage Device and Non-Volatile Memory Control Method
CN104461397A (zh) 一种固态硬盘及其读写方法
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 (zh) Ssd中数据的选择性擦除
US11645006B2 (en) Read performance of memory devices
CN110109845B (zh) 缓存数据管理方法、装置、计算机设备及存储介质
US10956065B2 (en) Solid state storage device with quick boot from NAND media
CN103984506A (zh) 闪存存储设备数据写的方法和***
JP2020144974A (ja) メモリデバイスにおけるリフレッシュ管理を実行するための方法、関連するメモリデバイス及びそのコントローラ
CN105404468B (zh) 绿能与非固态硬盘应用及其驱动器
CN111026678B (zh) 基于固态硬盘的缓存设计方法、装置及计算机设备
US20240069771A1 (en) Read operations for mixed data
LU101617B1 (en) Method for improving the efficiency of reconstructing no mapping tables

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