WO2020173428A1 - 一种减少ftl地址映射空间的方法及其*** - Google Patents

一种减少ftl地址映射空间的方法及其*** Download PDF

Info

Publication number
WO2020173428A1
WO2020173428A1 PCT/CN2020/076594 CN2020076594W WO2020173428A1 WO 2020173428 A1 WO2020173428 A1 WO 2020173428A1 CN 2020076594 W CN2020076594 W CN 2020076594W WO 2020173428 A1 WO2020173428 A1 WO 2020173428A1
Authority
WO
WIPO (PCT)
Prior art keywords
mpa
mpci
list
mapping
cache
Prior art date
Application number
PCT/CN2020/076594
Other languages
English (en)
French (fr)
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 深圳忆联信息***有限公司
Publication of WO2020173428A1 publication Critical patent/WO2020173428A1/zh
Priority to US17/037,156 priority Critical patent/US11429533B2/en

Links

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
    • 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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • 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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1041Resource optimization
    • G06F2212/1044Space efficiency improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/20Employing a main memory using a specific memory technology
    • G06F2212/202Non-volatile memory
    • G06F2212/2022Flash 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

  • This application relates to the technical field of solid-state hard disks, and in particular to a method and system for reducing FTL address mapping space.
  • the FTL (Flash Translation Layer) algorithm is the core part of the SSD (Sol id State Disk) firmware. Since NAND does not allow repeated writing on the page, the FTL needs to maintain a logical to physical address mapping. If the current SSD firmware adopts a page mapping method, it needs to maintain the mapping of all logical pages to physical pages in RAM, and the RAM resources in SSD are limited and expensive. If 4K is used as the unit of page mapping, assuming that a table option in the page mapping occupies 4B, a hard disk with a capacity of 128G needs 128M RAM space for storing the page mapping table, which undoubtedly increases the cost of the SSD.
  • One of the objectives of the embodiments of the present application is to provide a method and system for reducing the FTL address mapping space, which aims to reduce RAM overhead and save hardware costs.
  • a method for reducing FTL address mapping space which includes the following steps:
  • S2 it is determined whether the mpa is hit in the cache; if so, go to S6; if not, go to S3;
  • S3 determine whether mpa has been written into nand; if yes, go to S5; if not, go to S4;
  • S6 directly find the location mpci of mpa in the cache, and find the physical page address gppa in combination with offset;
  • S7 determine whether it is necessary to modify the logic-to-physical mapping; if so, go to S8; if not, then end;
  • S8 modify the mapping table in the cache corresponding to mpci, and mark the mp corresponding to mpci as dirty mp;
  • S9 determine whether to prompt mp to write nand condition; if yes, go to S10, if not, end;
  • a system for reducing the FTL address mapping space including a obtaining unit, a first judging unit, a second judging unit, a first loading unit, a second loading unit, a search unit, and a third judging unit Unit, modification marking unit, fourth judgment unit, and writing unit;
  • the obtaining unit is used to obtain mpa and offset according to the logical page address
  • the first judging unit is used to judge whether the mpa is hit in the cache
  • the second judgment unit is used to judge whether mpa has been written nand;
  • the first loading unit is used for a nomap loading operation and returns an invalid mapping
  • the second loading unit is used for map loading operations
  • the search unit is used to directly search for the location mpci of the mpa in the cache, and combine the offset to search for the physical page address gppa;
  • the third judging unit is used to judge whether the logical to physical mapping needs to be modified
  • the modification marking unit is used to modify the mapping table in the cache corresponding to mpci, and mark the m P corresponding to mpci as dirty mp;
  • the fourth judging unit is used to judge whether to prompt mp to write nand conditions
  • the writing unit is used to write dirty mp into nand.
  • a computer device including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor implements the computer program described in the first aspect when the processor executes the computer program. The steps of the method to reduce the FTL address mapping space.
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for reducing the FTL address mapping space described in the first aspect are implemented.
  • the method and system for reducing the FTL address mapping space provided by the embodiments of the present application have the following beneficial effects: the method of dynamically managing the address mapping table in the cache space is used instead of the method of loading all the address mapping tables in RAM, thereby reducing RAM overhead, Saving hardware costs; it is possible to reduce the FTL address mapping table space under the limited performance impact, reduce the RAM cost of the SSD, and better meet the demand.
  • FIG. 1 is a schematic diagram of one page mapping in a prior art address mapping method
  • FIG. 2 is a flow chart of a method for reducing FTL address mapping space according to this application
  • FIG. 3 is a schematic diagram of the application of a method for reducing the FTL address mapping space
  • FIG. 4 is a block diagram of a system for reducing the FTL address mapping space of this application.
  • FIG. 1 to FIG. 4 wherein, as shown in the prior art shown in FIG. 1, the most essential work of FTL is address mapping.
  • the current common address mapping of SSD firmware is divided into block mapping, Page mapping, mixed mapping; page mapping uses page as the mapping unit, and each logical page address corresponds to a physical page address; in order to pursue better random performance (the operating system is very concerned about this), many SSDs will use this mapping method.
  • flash memory has more pages than flash memory blocks, SSD requires more space to store the mapping table. Allocate a continuous space in RAM to store system tables such as 12p and VPC.
  • the m2p table records the position of the 12p table stored in nand.
  • the present application discloses a method for reducing the FTL address mapping space, which includes the following steps:
  • S1 Obtain mpa and offset according to the logical page address
  • S2 it is determined whether the mpa is hit in the cache; if so, go to S6; if not, go to S3;
  • S3 determine whether mpa has been written into nand; if yes, go to S5; if not, go to S4;
  • S6 directly find the location mpci of mpa in the cache, and find the physical page address gppa in combination with offset;
  • S7 determine whether it is necessary to modify the logical to physical mapping; if so, go to S8; if not, then end; [0057] S8, modify the mapping table in the cache corresponding to mpci, and mark the mp corresponding to mpci as dirty mp;
  • S9 determine whether to prompt mp to write nand condition; if yes, go to S10, if no, end;
  • the mp is a page mapping table and other tables are grouped and sorted according to a certain number of rules, and the mpa is a group number.
  • the nomap loading operation is to fetch the mpci from the head of the clean_list in the list node and put the mpci at the end of the list, and then write the cache&#1051293 corresponding to mcpi into the invalid mapping and update the mpas table ,
  • the index mpci is updated to a new mpa, and the mpci is marked as a dirty mp.
  • the map loading operation is to take out the mpci from the head of the clean_list in the list node and put the mpci at the end of the list, and then replace the cache &#1051293 corresponding to mcpi with the one loaded in nand Data, update the mpa table, and update the index mpci to the new mpa.
  • the table stores the address of mp in nand;
  • L2P_CACHE_BUF is a cache opened in RAM, which is retrieved by mpci
  • a linked list is used to link the mpci occupied by the loaded mp. According to the mpa, the corresponding mp may only be in one of the linked lists in X. Multiple linked lists are provided for faster table lookup; hash_node provides clean_l ist and dirty_l ist also links the loaded mpci, the index in clean has not been modified after being loaded, and dirty is the opposite.
  • the address mapping table is grouped and numbered, and a cache space is opened in the RAM to dynamically load the address mapping table, and the modified mp is written into the nand at a specified time; this method is compared with the address mapping table It is completely loaded into the RAM, and under the condition of limited performance impact, a large amount of RAM space is saved, which can effectively save the resource cost of the SSD.
  • the present application also discloses a system for reducing the FTL address mapping space, including a obtaining unit 10, a first judging unit 20, a second judging unit 30, a first loading unit 40, and a second Loading unit 50, The search unit 60, the third judgment unit 70, the modification marking unit 80, the fourth judgment unit 90, and the writing unit 100;
  • the obtaining unit 10 is configured to obtain mpa and offset according to the logical page address
  • the first judging unit 20 is used to judge whether the mpa is hit in the cache
  • the second determining unit 30 is used to determine whether mpa has been written into nand;
  • the first loading unit 40 is used for a nomap loading operation and returns an invalid mapping
  • the second loading unit 50 is used for map loading operations
  • the search unit 60 is used to directly search for the location mpci of mpa in the cache, and combine the offset to search for the physical page address gppa;
  • the third determining unit 70 is configured to determine whether to modify the logical to physical mapping
  • the modification marking unit 80 is used to modify the mapping table in the cache corresponding to mpci, and mark the mp corresponding to mpci as dirty mp;
  • the fourth judging unit 90 is used to judge whether to prompt mp to write nand conditions
  • the writing unit 100 is used to write dirty mps into nand.
  • the mp is a page mapping table and other tables are grouped and sorted according to a certain number of rules, and the mpa is a group number.
  • the first judgment unit calculates which linked list in hash_list to traverse according to mpa, traverses all mpcis under the linked list, combines the mpas table until the mpa is found, and records the current mpci. If not found, it means that Hit.
  • the nomap loading operation is to take the mpci from the head of the clean_list in the list node and put the mpci at the end of the list, and then put the cach e corresponding to mcpi 􀪝 Map, update the mpas table, update the index mpci to the new mpa, and mark the mpci as dirty mp.
  • the map loading operation is to take the mpci from the head of the clean_list in the list node and put the mpci at the end of the list, and then replace the cache&#1051293 corresponding to mcpi with the load in nand Update the mpas table and index mpci to the new mpa.
  • the address mapping table is dynamically managed by opening up the cache space instead of loading all the address mapping tables in R
  • AM AM; Develop a cache space that can load N mps, and establish a structure for management; when checking the table, you can first see whether the corresponding mp cache hits, if not, you can dynamically load it; mark the mp that is modified after loading, and Provide a mechanism to write NAND at a specified time; the firmware of the solid-state hard disk product uses the method of dynamically managing the address mapping table in the cache space instead of the method of loading all the address mapping table in the RAM, reducing RAM overhead, saving hardware costs, and achieving limited performance impact In this case, reducing the FTL address mapping table space and reducing the RAM cost of the SSD can better meet the demand.
  • the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the above methods when the computer program is executed. Steps in the embodiment.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the steps in the above method embodiments.
  • Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPR0M), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DR AM (SLDRAM), memory bus (Ram bus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

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)

Abstract

一种减少FTL地址映射空间的方法及其***;所述方法包括:根据逻辑页地址得出mpa和偏移(S1);判断mpa是否在cache中被命中(S2);判断mpa是否被写入过nand(S3); nomap加载操作,返回无效映射(S4); map加载操作(S5);直接查找mpa在cache中位置mpci,结合offset查找物理页地址gppa(S6);判断是否需要修改逻辑到物理映射(S7);修改mpci对应的cache中的映射表,并将mpci对应的mp标记为脏的mp(S8);判断是否促发mp写入nand条件(S9);将脏的mp写入nand(S10)。减少了FTL地址映射表空间和SSD的RAM成本。

Description

一种减少 FTL地址映射空间的方法及其***
[0001] 本申请要求于 2019年 2月 26日在中国专利局提交的、 申请号为 201910142830. 0
、 发明名称为“一种减少 FTL地址映射空间的方法及其***” 的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。
技术领域
[0002] 本申请涉及固态硬盘技术领域, 具体涉及一种减少 FTL地址映射空间的方法及 其***。
背景技术
[0003] FTL (Flash Translation Layer) 算法是 SSD ( Sol id State Disk) 固件的核 心部分, 由于 NAND不允许 page上重复写入, FTL需要维护逻辑到物理的地址映射 。 目前 SSD固件如果是采用页映射的方式, 需要在 RAM中维护所有逻辑页到物理 页的映射, 而在 SSD中 RAM资源又是有限并且昂贵的。 如果以 4K作为页映射的单 位, 假设页映射中一个表选项占用 4B, 容量 128G的硬盘需要 128M的 RAM空间用于 存放页映射表, 这无疑提高了 SSD的成本。
[0004] FTL最本质的工作便是地址映射, 目前 SSD固件常见的地址映射分为块映射、 页 映射、 混合映射; 页映射以 page作为映射单位, 每个逻辑页地址对应一个物理 页地址; 为了追求更好的随机性能 (操作***对这个很在意) , 很多 SSD会采用 这种映射方式, 但是由于闪存的页要比闪存块多的多, SSD需要更多的空间来存 放映射表, 为了存放这个映射表, 当前的主流 SSD—般会把缓冲数据和映射表统 统存放在 DRAM中, 优点是查找更新映射表迅速, 性能较好, 劣势是多了一个 DRA M, 成本和功耗上升; 而 DRAM价格比较高昂, 无法满足需求。
发明概述
技术问题
[0005] 本申请实施例的目的之一在于: 提供一种减少 FTL地址映射空间的方法及其系 统, 旨在减少 RAM开销, 节约硬件成本。
问题的解决方案 技术解决方案
[0006] 为解决上述技术问题, 本申请实施例采用的技术方案是:
[0007] 第一方面, 提供了一种减少 FTL地址映射空间的方法, 包括以下步骤:
[0008] S1, 根据逻辑页地址得出 mpa和偏移;
[0009] S2, 判断 mpa是否在 cache中被命中; 若是, 进入 S6; 若否, 则进入 S3;
[0010] S3, 判断 mpa是否被写入过 nand; 若是, 进入 S5; 若否, 则进入 S4;
[0011] S4, nomap加载操作, 返回无效映射, 跳转 S7;
[0012] S5, map加载操作;
[0013] S6, 直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理页地址 gppa;
[0014] S7, 判断是否需要修改逻辑到物理映射; 若是, 进入 S8; 若否, 则结束;
[0015] S8, 修改 mpci对应的 cache中的映射表, 并将 mpci对应的 mp标记为脏的 mp;
[0016] S9, 判断是否促发 mp写入 nand条件; 若是, 进入 S10, 若否, 则结束;
[0017] S10, 将脏的 mp写入 nancL
[0018] 第二方面, 提供了一种减少 FTL地址映射空间的***, 包括得出单元, 第一判 断单元, 第二判断单元, 第一加载单元, 第二加载单元, 查找单元, 第三判断 单元, 修改标记单元, 第四判断单元, 及写入单元;
[0019] 所述得出单元, 用于根据逻辑页地址得出 mpa和偏移;
[0020] 所述第一判断单元, 用于判断 mpa是否在 cache中被命中;
[0021] 所述第二判断单元, 用于判断 mpa是否被写入过 nand;
[0022] 所述第一加载单元, 用于 nomap加载操作, 返回无效映射;
[0023] 所述第二加载单元, 用于 map加载操作;
[0024] 所述查找单元, 用于直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理页 地址 gppa;
[0025] 所述第三判断单元, 用于判断是否需要修改逻辑到物理映射;
[0026] 所述修改标记单元, 用于修改 mpci对应的 cache中的映射表, 并将 mpci对应的 m P标记为脏的 mp;
[0027] 所述第四判断单元, 用于判断是否促发 mp写入 nand条件;
[0028] 所述写入单元, 用于将脏的 mp写入 nand。 [0029] 第三方面, 提供一种计算机设备, 包括存储器、 处理器及存储在存储器上并可 在处理器上运行的计算机程序, 所述处理器执行所述计算机程序时实现第一方 面所述的减少 FTL地址映射空间的方法的步骤。
[0030] 第四方面, 提供一种计算机可读存储介质, 其上存储有计算机程序, 所述计算 机程序被处理器执行时实现第一方面所述的减少 FTL地址映射空间的方法的步 骤。
[0031] 本申请实施例提供的减少 FTL地址映射空间的方法及其***的有益效果在于: 采用 cache空间动态管理地址映射表的方法取代将地址映射表全部加载在 RAM的 方法, 减少 RAM开销, 节约硬件成本; 实现了在性能影响有限情况下, 减少 FTL 地址映射表空间, 减少 SSD的 RAM成本, 能够更好地满足需求。
发明的有益效果
对附图的简要说明
附图说明
[0032] 为了更清楚地说明本申请实施例中的技术方案, 下面将对实施例或示范性技术 描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本申请的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。
[0033] 图 1为现有技术地址映射方式一页映射的示意图;
[0034] 图 2为本申请一种减少 FTL地址映射空间的方法流程图;
[0035] 图 3为本申请一种减少 FTL地址映射空间的方法使用示意图;
[0036] 图 4为本申请一种减少 FTL地址映射空间的***方框图。
[0037] 10 得出单元
[0038] 20 第一判断单元
[0039] 30 第二判断单元
[0040] 40 第一加载单元
[0041] 50 第二加载单元
[0042] 60 查找单元
[0043] 70 第三判断单元 [0044] 80 修改标记单元
[0045] 90 第四判断单元
[0046] 100 写入单元
发明实施例
本发明的实施方式
[0047] 为了使本申请的目的、 技术方案及优点更加清楚明白, 以下结合附图及实施例 , 对本申请进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅用以 解释本申请, 并不用于限定本申请。
[0048] 如图 1到图 4所示的具体实施例, 其中, 如图 1所示的现有技术; FTL最本质的工 作便是地址映射, 目前 SSD固件常见的地址映射分为块映射、 页映射、 混合映射 ; 页映射以 page作为映射单位, 每个逻辑页地址对应一个物理页地址; 为了追 求更好的随机性能 (操作***对这个很在意) , 很多 SSD会采用这种映射方式, 但是由于闪存的页要比闪存块多的多, SSD需要更多的空间来存放映射表。 在 RA M中分配一段连续空间存放 12p和 VPC等***表格, m2p表格记录 12p表存放在 nand 中的位置, 如果以 4K作为页映射的单位, 假设页映射中一个表选项占用 4B, 容 量 128G的硬盘需要 128M空间用于存放 12p页映射表, 这无疑提高了 SSD的成本; 为了存放这个映射表, 当前的主流 SSD—般会把缓冲数据和映射表统统存放在 DR AM中, 优点是查找更新映射表迅速, 性能较好, 劣势是多了一个 DRAM, 成本和 功耗上升; 而 DRAM价格比较高昂。
[0049] 如图 2至图 3所示, 本申请公开了一种减少 FTL地址映射空间的方法, 包括以下 步骤:
[0050] S1, 根据逻辑页地址得出 mpa和偏移;
[0051] S2, 判断 mpa是否在 cache中被命中; 若是, 进入 S6; 若否, 则进入 S3;
[0052] S3, 判断 mpa是否被写入过 nand; 若是, 进入 S5; 若否, 则进入 S4;
[0053] S4, nomap加载操作, 返回无效映射, 跳转 S7;
[0054] S5, map加载操作;
[0055] S6, 直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理页地址 gppa;
[0056] S7, 判断是否需要修改逻辑到物理映射; 若是, 进入 S8; 若否, 则结束; [0057] S8, 修改 mpci对应的 cache中的映射表, 并将 mpci对应的 mp标记为脏的 mp;
[0058] S9, 判断是否促发 mp写入 nand条件; 若是, 进入 S10, 若否, 则结束;
[0059] S10, 将脏的 mp写入 nancL
[0060] 其中, 所述 mp为页映射表以及其他表按照一定数量规律分组排序, 所述 mpa为 分组编号。
[0061] 其中, 在所述 S2中, 根据 mpa计算 hash_l ist中的哪个链表去遍历, 遍历该链表 下所有 mpci, 结合 mpas表直到找到 mpa, 记录当前的 mpci, 如果没有找到则代表 未命中。
[0062] 其中, 所述 S4中, nomap加载操作为从 l ist_node里的 clean_l ist的链表头处取 出 mpci放入链表尾, 然后将 mcpi对应的 cache&#1051293 ;容写入无效映射, 更新 mpas表格, 索引 mpci更新成新 mpa, 并将 mpci标记为脏的 mp。
[0063] 其中, 所述 S5中, map加载操作, 为从 l ist_node里的 clean_l ist的链表头处取 出 mpci放入链表尾, 然后将 mcpi对应的 cache&#1051293 ;容替换成 nand中加载出 的数据, 更新 mpas表格, 索引 mpci更新成新 mpa。
[0064] 如图 3所示, 其中 12p table、 VPC、 EC指的是存放在 nand中的表格, 并不连续 , 将他们每 512分组 (mp), 然后编号 (mpa) ; m2p
table存放 mp在 nand中的地址; L2P_CACHE_BUF是 RAM中开辟的 cache, 以 mpci索 弓 | cache块, 每个 cache块存放一个 mp数据; Mpas数组存放各个 mpci放的是哪个 m P; hash_node提供了 X个链表, 用于链接被加载的 mp占用的 mpci, 可以根据 mpa 知道对应 mp只可能会在 X中的某一个链表中, 提供多个链表是为了更快速查表; hash_node提供了 clean_l ist和 dirty_l ist同样链接被加载的 mpci, clean中索 引的代表被加载后没有被修改过, dirty则相反。
[0065] 本申请通过将地址映射表分组编号, 并在 RAM中开辟 cache空间动态加载地址映 射表, 并在指定时候将被修改的 mp写入 nand中; 这种方式相比于将地址映射表 完全加载到 RAM中, 在性能影响有限的情况下, 节省了很大的 RAM空间, 能够有 效节省了 SSD的资源成本。
[0066] 如图 4所示, 本申请还公开了一种减少 FTL地址映射空间的***, 包括得出单元 10, 第一判断单元 20, 第二判断单元 30, 第一加载单元 40, 第二加载单元 50, 查找单元 60, 第三判断单元 70, 修改标记单元 80, 第四判断单元 90, 及写入单 元 100;
[0067] 所述得出单元 10, 用于根据逻辑页地址得出 mpa和偏移;
[0068] 所述第一判断单元 20, 用于判断 mpa是否在 cache中被命中;
[0069] 所述第二判断单元 30, 用于判断 mpa是否被写入过 nand;
[0070] 所述第一加载单元 40, 用于 nomap加载操作, 返回无效映射;
[0071] 所述第二加载单元 50, 用于 map加载操作;
[0072] 所述查找单元 60, 用于直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理 页地址 gppa;
[0073] 所述第三判断单元 70, 用于判断是否需要修改逻辑到物理映射;
[0074] 所述修改标记单元 80, 用于修改 mpci对应的 cache中的映射表, 并将 mpci对应 的 mp标记为脏的 mp ;
[0075] 所述第四判断单元 90, 用于判断是否促发 mp写入 nand条件;
[0076] 所述写入单元 100, 用于将脏的 mp写入 nand。
[0077] 其中, 所述 mp为页映射表以及其他表按照一定数量规律分组排序, 所述 mpa为 分组编号。
[0078] 其中, 所述第一判断单元中, 根据 mpa计算 hash_l ist中的哪个链表去遍历, 遍 历该链表下所有 mpci, 结合 mpas表直到找到 mpa, 记录当前的 mpci, 如果没有找 到则代表未命中。
[0079] 其中, 所述第一加载单元中, nomap加载操作为从 l ist_node里的 clean_l ist的 链表头处取出 mpci放入链表尾, 然后将 mcpi对应的 cache&#1051293 ;容写入无效 映射, 更新 mpas表格, 索引 mpci更新成新 mpa, 并将 mpci标记为脏的 mp。
[0080] 其中, 所述第二加载单元中, map加载操作为从 l ist_node里的 clean_l ist的链 表头处取出 mpci放入链表尾, 然后将 mcpi对应的 cache&#1051293 ;容替换成 nand 中加载出的数据, 更新 mpas表格, 索引 mpci更新成新 mpa。
[0081] 本申请通过开辟 cache空间动态管理地址映射表取代将地址映射表全部加载在 R
AM; 开辟能够装载 N个 mp的 cache空间, 建立结构体管理起来; 查表时候能够先 看对应 mp是否 cache命中, 如果没有可以动态加载; 标记加载后被修改的 mp, 并 提供机制在指定时间写入 NAND; 固态硬盘产品的固件采用 cache空间动态管理地 址映射表的方法取代将地址映射表全部加载在 RAM的方法, 减少 RAM开销, 节约 硬件成本, 实现了在性能影响有限情况下, 减少 FTL地址映射表空间, 减少 SSD 的 RAM成本, 能够更好地满足需求。
[0082] 在一个实施例中, 本申请还提供了一种计算机设备, 包括存储器、 处理器及存 储在存储器上并可在处理器上运行的计算机程序, 处理器执行计算机程序时实 现以上各个方法实施例中的步骤。
[0083] 在一个实施例中, 本申请还提供了一种计算机可读存储介质, 其上存储有计算 机程序, 计算机程序被处理器执行时实现以上各个方法实施例中的步骤。
[0084] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可 以通过计算机程序来指令相关的硬件来完成, 所述的计算机程序可存储于一非 易失性计算机可读取存储介质中, 该计算机程序在执行时, 可包括如上述各方 法的实施例的流程。 其中, 本申请所提供的各实施例中所使用的对存储器、 存 储、 数据库或其他介质的任何引用, 均可包括非易失性和 /或易失性存储器。 非 易失性存储器可包括只读存储器 (ROM) 、 可编程 ROM (PROM) 、 电可编程 ROM ( EPROM) 、 电可擦除可编程 ROM (EEPR0M) 或闪存。 易失性存储器可包括随机存 取存储器 (RAM) 或者外部高速缓冲存储器。 作为说明而非局限, RAM以多种形 式可得, 诸如静态 RAM ( SRAM) 、 动态 RAM (DRAM) 、 同步 DRAM ( SDRAM) 、 双数 据率 SDRAM (DDRSDRAM) 、 增强型 SDRAM (ESDRAM) 、 同步链路 ( Synchlink) DR AM ( SLDRAM) 、 存储器总线 (Ram bus) 直接 RAM (RDRAM) 、 直接存储器总线动 态 RAM (DRDRAM) 、 以及存储器总线动态 RAM (RDRAM) 等。
[0085] 以上所述实施例仅表达了本申请的几种实施方式, 其描述较为具体和详细, 但 并不能因此而理解为对发明专利范围的限制。 应当指出的是, 对于本领域的普 通技术人员来说, 在不脱离本申请构思的前提下, 还可以做出若干变形和改进 , 这些都属于本申请的保护范围。 因此, 本申请专利的保护范围应以所附权利 要求为准。

Claims

权利要求书
[权利要求 1] 一种减少 FTL地址映射空间的方法, 其特征在于, 包括以下步骤:
S1, 根据逻辑页地址得出 mpa和偏移;
S2, 判断 mpa是否在 cache中被命中; 若是, 进入 S6; 若否, 则进入 S3
S3, 判断 mpa是否被写入过 nand; 若是, 进入 S5; 若否, 则进入 S4; S4, nomap加载操作, 返回无效映射, 跳转 S7;
S5, map加载操作;
S6, 直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理页地址 gp pa;
S7, 判断是否需要修改逻辑到物理映射; 若是, 进入 S8; 若否, 则结 束;
S8, 修改 mpci对应的 cache中的映射表, 并将 mpci对应的 mp标记为脏 的 mp;
S9, 判断是否促发 mp写入 nand条件; 若是, 进入 S10, 若否, 则结束
S10, 将脏的 mp写入 nand 0
[权利要求 2] 根据权利要求 1所述的一种减少 FTL地址映射空间的方法, 其特征在于 , 所述 mp为页映射表以及其他表按照一定数量规律分组排序, 所述 mp a为分组编号。
[权利要求 3] 根据权利要求 1所述的一种减少 FTL地址映射空间的方法, 其特征在于 , 所述 S2中, 根据 mpa计算 hash_l ist中的哪个链表去遍历, 遍历该链 表下所有 mpci, 结合 mpas表直到找到 mpa, 记录当前的 mpci, 如果没 有找到则代表未命中。
[权利要求 4] 根据权利要求 1所述的一种减少 FTL地址映射空间的方法, 其特征在于 , 所述 S4中, nomap加载操作为从 l ist_node里的 clean_l ist的链表头 处取出 mpci放入链表尾, 然后将 mcpi对应的 cache内容写入无效映射 , 更新 mpas表格, 索引 mpci更新成新 mpa, 并将 mpci标记为脏的 mp。 [权利要求 5] 根据权利要求 1所述的一种减少 FTL地址映射空间的方法, 其特征在于 , 所述 S5中, map加载操作, 为从 l ist_node里的 clean_l ist的链表头 处取出 mpci放入链表尾, 然后将 mcpi对应的 cache内容替换成 nand中 加载出的数据, 更新 mpas表格, 索引 mpci更新成新 mpa。
[权利要求 6] 一种减少 FTL地址映射空间的***, 其特征在于, 包括得出单元, 第 一判断单元, 第二判断单元, 第一加载单元, 第二加载单元, 查找单 元, 第三判断单元, 修改标记单元, 第四判断单元, 及写入单元; 所述得出单元, 用于根据逻辑页地址得出 mpa和偏移;
所述第一判断单元, 用于判断 mpa是否在 cache中被命中;
所述第二判断单元, 用于判断 mpa是否被写入过 nand;
所述第一加载单元, 用于 nomap加载操作, 返回无效映射;
所述第二加载单元, 用于 map加载操作;
所述查找单元, 用于直接查找 mpa在 cache中位置 mpci, 结合 off set查 找物理页地址 gppa;
所述第三判断单元, 用于判断是否需要修改逻辑到物理映射; 所述修改标记单元, 用于修改 mpci对应的 cache中的映射表, 并将 mpc i对应的 mp标记为脏的 mp ;
所述第四判断单元, 用于判断是否促发 mp写入 nand条件;
所述写入单元, 用于将脏的 mp写入 nand。
[权利要求 7] 根据权利要求 6所述的一种减少 FTL地址映射空间的***, 其特征在于 , 所述 mp为页映射表以及其他表按照一定数量规律分组排序, 所述 mp a 为分组编号。
[权利要求 8] 根据权利要求 6所述的一种减少 FTL地址映射空间的***, 其特征在于 , 所述第一判断单元中, 根据 mpa计算 hash_l ist中的哪个链表去遍历 , 遍历该链表下所有 mpci, 结合 mpas表直到找到 mpa, 记录当前的 mpc i, 如果没有找到则代表未命中。
[权利要求 9] 根据权利要求 6所述的一种减少 FTL地址映射空间的***, 其特征在于 , 所述第一加载单元中, nomap加载操作为从 l ist_node里的 clean_l i st的链表头处取出 mpci放入链表尾, 然后将 mcpi对应的 cache内容写 入无效映射, 更新 mpas表格, 索引 mpci更新成新 mpa, 并将 mpci标记 为脏的 mp。
[权利要求 10] 根据权利要求 6所述的一种减少 FTL地址映射空间的***, 其特征在于 , 所述第二加载单元中, map加载操作为从 l ist_node里的 clean_l ist 的链表头处取出 mpci放入链表尾, 然后将 mcpi对应的 cache内容替换 成 nand中加载出的数据, 更新 mpas表格, 索引 mpci更新成新 mpa。
[权利要求 11] 一种计算机设备, 包括存储器、 处理器及存储在存储器上并可在处理 器上运行的计算机程序, 其特征在于, 所述处理器执行所述计算机程 序时实现如下步骤:
S1, 根据逻辑页地址得出 mpa和偏移;
S2, 判断 mpa是否在 cache中被命中; 若是, 进入 S6; 若否, 则进入 S3
S3, 判断 mpa是否被写入过 nand; 若是, 进入 S5; 若否, 则进入 S4; S4, nomap加载操作, 返回无效映射, 跳转 S7;
S5, map加载操作;
S6, 直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理页地址 gp pa;
S7, 判断是否需要修改逻辑到物理映射; 若是, 进入 S8; 若否, 则结 束;
S8, 修改 mpci对应的 cache中的映射表, 并将 mpci对应的 mp标记为脏 的 mp;
S9, 判断是否促发 mp写入 nand条件; 若是, 进入 S10, 若否, 贝结束
S10, 将脏的 mp写入 nand 0
[权利要求 12] 根据权利要求 11所述的计算机设备, 其特征在于, 所述 mp为页映射表 以及其他表按照一定数量规律分组排序, 所述 mpa为分组编号。
[权利要求 13] 根据权利要求 11所述的计算机设备, 其特征在于, 所述 S2中, 根据 mp a计算 hash_l ist中的哪个链表去遍历, 遍历该链表下所有 mpci, 结合 mpas表直到找到 mpa, 记录当前的 mpci, 如果没有找到则代表未命中
[权利要求 14] 根据权利要求 11所述的计算机设备, 其特征在于, 所述 S4中, nomap 加载操作为从 l ist_node里的 clean_l ist的链表头处取出 mpci放入链 表尾, 然后将 mcpi对应的 cache内容写入无效映射, 更新 mpas表格, 索引 mpc i更新成新 mpa, 并将 mpc i标记为脏的 mp。
[权利要求 15] 根据权利要求 11所述的计算机设备, 其特征在于, 所述 S5中, map加 载操作, 为从 l ist_node里的 clean_l ist的链表头处取出 mpci放入链 表尾, 然后将 mcpi对应的 cache内容替换成 nand中加载出的数据, 更 新 mpas表格, 索引 mpci更新成新 mpa。
[权利要求 16] —种计算机可读存储介质, 其上存储有计算机程序, 其特征在于, 所 述计算机程序被处理器执行时实现如下步骤:
S1, 根据逻辑页地址得出 mpa和偏移;
S2, 判断 mpa是否在 cache中被命中; 若是, 进入 S6; 若否, 则进入 S3
S3, 判断 mpa是否被写入过 nand; 若是, 进入 S5; 若否, 则进入 S4; S4, nomap加载操作, 返回无效映射, 跳转 S7;
S5, map加载操作;
S6, 直接查找 mpa在 cache中位置 mpci, 结合 offset查找物理页地址 gp pa;
S7, 判断是否需要修改逻辑到物理映射; 若是, 进入 S8; 若否, 则结 束;
S8, 修改 mpci对应的 cache中的映射表, 并将 mpci对应的 mp标记为脏 的 mp;
S9, 判断是否促发 mp写入 nand条件; 若是, 进入 S10, 若否, 贝结束
S10, 将脏的 mp写入 nando [权利要求 17] 根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述 mp为 页映射表以及其他表按照一定数量规律分组排序, 所述 mpa为分组编 号。
[权利要求 18] 根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述 S2中 , 根据 mpa计算 hash_l ist中的哪个链表去遍历, 遍历该链表下所有 mp ci, 结合 mpas表直到找到 mpa, 记录当前的 mpci, 如果没有找到则代 表未命中。
[权利要求 19] 根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述 S4中 , nomap加载操作为从 l ist_node里的 clean_l ist的链表头处取出 mpci 放入链表尾, 然后将 mcpi对应的 cache内容写入无效映射, 更新 mpas 表格, 索引 mpci更新成新 mpa, 并将 mpci标记为脏的 mp。
[权利要求 20] 根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述 S5中 , map加载操作, 为从 l ist_node里的 clean_l ist的链表头处取出 mpci 放入链表尾, 然后将 mcp i对应的 cache内容替换成 nand中加载出的数 据, 更新 mpas表格, 索引 mpci更新成新 mpa
PCT/CN2020/076594 2019-02-26 2020-02-25 一种减少ftl地址映射空间的方法及其*** WO2020173428A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/037,156 US11429533B2 (en) 2019-02-26 2020-09-29 Method and system of reducing address mapping space of flash translation layer

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910142830.0 2019-02-26
CN201910142830.0A CN109918316B (zh) 2019-02-26 2019-02-26 一种减少ftl地址映射空间的方法及其***

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/037,156 Continuation-In-Part US11429533B2 (en) 2019-02-26 2020-09-29 Method and system of reducing address mapping space of flash translation layer

Publications (1)

Publication Number Publication Date
WO2020173428A1 true WO2020173428A1 (zh) 2020-09-03

Family

ID=66962368

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076594 WO2020173428A1 (zh) 2019-02-26 2020-02-25 一种减少ftl地址映射空间的方法及其***

Country Status (3)

Country Link
US (1) US11429533B2 (zh)
CN (1) CN109918316B (zh)
WO (1) WO2020173428A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918316B (zh) 2019-02-26 2021-07-13 深圳忆联信息***有限公司 一种减少ftl地址映射空间的方法及其***
CN110287129B (zh) * 2019-06-27 2021-07-13 深圳忆联信息***有限公司 基于固态硬盘的l2p表更新及写入管理方法和装置
CN110968529A (zh) * 2019-11-28 2020-04-07 深圳忆联信息***有限公司 无缓存固态硬盘的实现方法、装置、计算机设备及存储介质
CN114217750B (zh) * 2021-12-28 2023-07-04 深圳忆联信息***有限公司 Ssd低功耗优化方法、装置、计算机设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679440A (zh) * 2013-11-29 2015-06-03 深圳市国微电子有限公司 一种闪存阵列管理方法及装置
CN106354664A (zh) * 2016-08-22 2017-01-25 浪潮(北京)电子信息产业有限公司 一种固态硬盘数据传输方法及装置
US20170109089A1 (en) * 2015-10-16 2017-04-20 CNEXLABS, Inc. a Delaware Corporation Method and Apparatus for Providing Hybrid Mode to Access SSD Drive
CN106775466A (zh) * 2016-12-05 2017-05-31 深圳市金泰克半导体有限公司 一种无dram的ftl读缓存管理方法及装置
CN108153682A (zh) * 2017-12-12 2018-06-12 西安交通大学 一种利用闪存内部并行性进行闪存转换层地址映射的方法
CN109918316A (zh) * 2019-02-26 2019-06-21 深圳忆联信息***有限公司 一种减少ftl地址映射空间的方法及其***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136121B (zh) * 2013-03-25 2014-04-16 中国人民解放军国防科学技术大学 一种固态盘的缓存管理方法
CN107423232B (zh) * 2016-05-24 2020-10-16 北京忆芯科技有限公司 Ftl快速访问方法与装置
CN106598493A (zh) * 2016-11-30 2017-04-26 郑州云海信息技术有限公司 一种固态硬盘地址映射表管理方法
CN106815152B (zh) * 2016-12-27 2019-05-31 华中科技大学 一种优化页级闪存转换层的方法
KR101883637B1 (ko) * 2017-01-03 2018-07-31 한양대학교 산학협력단 캐시 매핑 테이블 관리 방법 및 장치
CN107423229B (zh) * 2017-03-16 2020-09-01 杭州电子科技大学 一种面向页级ftl的缓冲区改进方法
CN108647157B (zh) * 2018-03-14 2021-10-01 深圳忆联信息***有限公司 一种基于相变存储器的映射管理方法及固态硬盘

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679440A (zh) * 2013-11-29 2015-06-03 深圳市国微电子有限公司 一种闪存阵列管理方法及装置
US20170109089A1 (en) * 2015-10-16 2017-04-20 CNEXLABS, Inc. a Delaware Corporation Method and Apparatus for Providing Hybrid Mode to Access SSD Drive
CN106354664A (zh) * 2016-08-22 2017-01-25 浪潮(北京)电子信息产业有限公司 一种固态硬盘数据传输方法及装置
CN106775466A (zh) * 2016-12-05 2017-05-31 深圳市金泰克半导体有限公司 一种无dram的ftl读缓存管理方法及装置
CN108153682A (zh) * 2017-12-12 2018-06-12 西安交通大学 一种利用闪存内部并行性进行闪存转换层地址映射的方法
CN109918316A (zh) * 2019-02-26 2019-06-21 深圳忆联信息***有限公司 一种减少ftl地址映射空间的方法及其***

Also Published As

Publication number Publication date
US20210019265A1 (en) 2021-01-21
CN109918316A (zh) 2019-06-21
US11429533B2 (en) 2022-08-30
CN109918316B (zh) 2021-07-13

Similar Documents

Publication Publication Date Title
WO2020173428A1 (zh) 一种减少ftl地址映射空间的方法及其***
US10241919B2 (en) Data caching method and computer system
TWI744457B (zh) 對混合記憶體模組進行存取元資料的方法及混合記憶體模組
CN107193646B (zh) 一种基于混合主存架构的高效动态页面调度方法
US9104327B2 (en) Fast translation indicator to reduce secondary address table checks in a memory device
CN102981963B (zh) 一种固态盘的闪存转换层的实现方法
US20110231598A1 (en) Memory system and controller
US9063862B2 (en) Expandable data cache
US10740251B2 (en) Hybrid drive translation layer
JP2017138852A (ja) 情報処理装置、記憶装置およびプログラム
US20150058525A1 (en) Garbage collection in hybrid memory system
JP6088951B2 (ja) キャッシュメモリシステムおよびプロセッサシステム
JP2005301591A (ja) 不揮発性メモリを備えた装置及びメモリコントロ−ラ
CN104424110B (zh) 固态驱动器的主动回收
CN103309815B (zh) 一种提高固态盘有效容量和寿命的方法和***
JP6027562B2 (ja) キャッシュメモリシステムおよびプロセッサシステム
CN108647157B (zh) 一种基于相变存储器的映射管理方法及固态硬盘
KR20150010717A (ko) 메모리 디바이스의 보호
KR102321346B1 (ko) 대용량 ssd 장치를 위한 데이터 저널링 방법
US9268700B2 (en) Cache control device, cache control method, and program thereof
CN117234432A (zh) 一种混合内存***的管理方法、管理装置、设备及介质
KR101153688B1 (ko) 데이터 페이지들에 대해 무효화 기회를 부여하는 방법 및 이를 위한 낸드 플래시 메모리 시스템
KR101020781B1 (ko) 플래시 메모리를 기반으로 한 데이터베이스 시스템에 대한 로그 관리 방법
KR100874013B1 (ko) 플래시 메모리의 데이터 관리 방법 및 장치
KR101353967B1 (ko) 환형 구조의 비휘발성 메모리 캐쉬에 데이터를 읽고 쓰기 위한 데이터 처리 방법

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: 20762737

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20762737

Country of ref document: EP

Kind code of ref document: A1