[go: up one dir, main page]

CN107066393B - A method for improving the density of mapping information in the address mapping table - Google Patents

A method for improving the density of mapping information in the address mapping table Download PDF

Info

Publication number
CN107066393B
CN107066393B CN201710022698.0A CN201710022698A CN107066393B CN 107066393 B CN107066393 B CN 107066393B CN 201710022698 A CN201710022698 A CN 201710022698A CN 107066393 B CN107066393 B CN 107066393B
Authority
CN
China
Prior art keywords
mapping
cache
mapping table
entry
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.)
Expired - Fee Related
Application number
CN201710022698.0A
Other languages
Chinese (zh)
Other versions
CN107066393A (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.)
Anhui University
Original Assignee
Anhui University
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 Anhui University filed Critical Anhui University
Priority to CN201710022698.0A priority Critical patent/CN107066393B/en
Publication of CN107066393A publication Critical patent/CN107066393A/en
Application granted granted Critical
Publication of CN107066393B publication Critical patent/CN107066393B/en
Expired - Fee Related 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
    • 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

Landscapes

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

Abstract

The invention discloses a method for improving mapping information density in an address mapping table, which can improve the hit rate of a cache mapping table in a page mapping scheme based on cache part mapping information, improve the read-write performance of a flash memory conversion layer, merge continuous and adjacent mapping records on a logic address and a physical address to generate a mapping entry on the premise of not increasing the number of entries in the cache mapping table in a memory, so that one mapping entry can represent the mapping relation between a plurality of logic addresses and physical addresses, one mapping entry is inserted into the cache mapping table instead of one mapping record which can only represent the mapping relation between one logic address and one physical address, thereby increasing the number of the mapping records stored in the cache mapping table on the premise of not increasing the occupation of the cache mapping table on the memory, and obviously increasing the hit rate of the cache mapping table, the read-write efficiency of the Flash conversion layer is improved, and the method can be widely applied to management of NAND Flash memories of various systems.

Description

提高地址映射表中映射信息密度的方法A method for improving the density of mapping information in the address mapping table

技术领域technical field

本发明涉及数据存储技术领域,尤其涉及一种提高地址映射表中映射信息密度的方法。The invention relates to the technical field of data storage, in particular to a method for improving the density of mapping information in an address mapping table.

背景技术Background technique

NAND Flash是一种具有非易失性的半导体存储器,不会因断电而造成丢失存储在上面的数据丢失,由于NAND Flash存储器的内部不存在机械部件,因此具有功耗低、发热小、重量轻、尺寸小、抗震好等传统的机械磁盘存储器不具有的优点,其随机读写性能更是远高于传统的机械磁盘存储器。随着闪存存储容量瓶颈的突破,性能的优化以及成本的下降,NAND Flash存储器已经变成非常重要的数字存储介质。NAND Flash is a kind of non-volatile semiconductor memory, which will not lose the data stored on it due to power failure. Since there are no mechanical parts inside the NAND Flash memory, it has low power consumption, low heat generation and weight. Light, small size, good shock resistance and other advantages that traditional mechanical disk storage does not have, its random read and write performance is much higher than traditional mechanical disk storage. With the breakthrough of flash memory storage capacity bottleneck, performance optimization and cost reduction, NAND Flash memory has become a very important digital storage medium.

NAND Flash由许多块(Block)组成,每个块又由若干页(Page)组成,其中页是读数据和写数据的最小单位,块是擦除的最小单位。在对NAND Flash进行写操作的时候,首先要将该页所在的块进行擦除,否则无法对该页进行写入操作。因此闪存有三种基本操作:读、写、擦除。NAND Flash is composed of many blocks (Block), and each block is composed of several pages (Page), wherein a page is the smallest unit of reading data and writing data, and a block is the smallest unit of erasing. When writing the NAND Flash, the block where the page is located must be erased first, otherwise the page cannot be written. So flash memory has three basic operations: read, write, and erase.

NAND Flash的三种操作有着不一样的性能,读的性能最好,写性能次之,擦除性能最差。读操作的速度最快,读取一个页大约需要几十微秒左右的时间,写操作速度慢于读操作,写入一个页大约需要几百微秒左右的时间,而擦除操作则非常耗时,擦除一个块大约需要几个毫秒时间。The three operations of NAND Flash have different performances. The reading performance is the best, the writing performance is the second, and the erasing performance is the worst. The speed of read operation is the fastest. It takes about tens of microseconds to read a page. The speed of write operation is slower than that of read operation. It takes about hundreds of microseconds to write a page, and the erase operation is very time-consuming. , erasing a block takes about a few milliseconds.

NAND Flash的块的擦除次数都是有限的,一旦超过了其最大的擦除次数,存储在上面的数据就可能变得不可靠。The erasing times of NAND Flash blocks are limited. Once the maximum erasing times are exceeded, the data stored on them may become unreliable.

更新NAND Flash的某个页中存储的数据时,必须要先使用擦除操作将该页所在的块进行擦除,擦除是毫秒级的操作,相对于微秒级的写操作是一个极为耗时的操作,因此如果同样采用本地更新(In-Place Update)的方式,会严重降低闪存的写速度。此外,如果某块上的数据被频繁地本地更新会导致该块因被不断擦除而迅速达到其使用极限。因此,在实际使用中,NAND Flash更新数据时采用异地更新(Out-Place Update)的方式,所有的更新数据不会被写入到原来页中,而是重新写入到其他被擦除的页(空闲页)中去。NANDFlash的存储资源是按照页编号为物理地址的方式分配管理的,随着有效数据在NANDFlash上存储位置发生变化,逻辑到物理的映射关系不可能通过建立表达式计算获得,需要通过建立映射表来提供文件系统对数据的寻址。因此,引入闪存转换层映(FlashTranslation Layer,FTL)、通过FTL来实现地址映射机制来记录逻辑地址和数据实际存储的物理地址之间的映射关系成为目前主流的闪存管理方案。When updating the data stored in a certain page of NAND Flash, you must first use the erase operation to erase the block where the page is located. Erase is a millisecond-level operation, which is a very expensive operation compared to a microsecond-level write operation. Therefore, if the local update (In-Place Update) method is also used, the writing speed of the flash memory will be seriously reduced. Additionally, frequent local updates of data on a block can cause the block to rapidly reach its limit of use due to constant erasure. Therefore, in actual use, NAND Flash adopts the method of Out-Place Update when updating data. All updated data will not be written to the original page, but will be rewritten to other erased pages. (free page). The storage resources of NANDFlash are allocated and managed according to the way that the page number is the physical address. With the change of the storage location of valid data on the NANDFlash, the logical-to-physical mapping relationship cannot be obtained by establishing an expression calculation, and it is necessary to establish a mapping table. Provides filesystem addressing of data. Therefore, introducing a Flash Translation Layer (FTL) and implementing an address mapping mechanism through FTL to record the mapping relationship between logical addresses and physical addresses where data is actually stored have become the current mainstream flash management solutions.

为了实现快速寻址,映射表一般被部分或全部缓存在内存之中称为缓存映射表,如何既能减少缓存映射表对内存的占用又能让请求可以通过缓存映射表完成直接寻址是闪存转换层需要解决的问题。In order to achieve fast addressing, the mapping table is generally partially or fully cached in the memory, which is called the cache mapping table. How to reduce the memory occupation of the cache mapping table and allow requests to complete direct addressing through the cache mapping table is flash memory The problem that the translation layer needs to solve.

根据地址映射粒度的不同,可以将建立缓存映射表方法分成四种:页映射(PageMapping)、块映射(Blocking Mapping)、混合映射(Hybrid Mapping)、基于缓存部分映射信息的页映射(Cached Page Mapping)。Depending on the granularity of address mapping, there are four methods for establishing cache mapping tables: PageMapping, Blocking Mapping, Hybrid Mapping, and Cached Page Mapping based on partial cache mapping information ).

页映射是以页为单位进行地址映射,在内存中保存基于页的映射表,每一个逻辑页都有一项与之对应的物理页,需要在映射表中用一条映射记录来保持,一条映射记录在映射表中占用一条映射表项,页映射方法灵活性高,但由于需要为每个逻辑页面建立地址映射表项,导致映射表占用内存大。Page mapping is to perform address mapping in units of pages, and store a page-based mapping table in memory. Each logical page has a corresponding physical page, which needs to be maintained by a mapping record in the mapping table, and a mapping record One mapping table entry is occupied in the mapping table, and the page mapping method is highly flexible, but since an address mapping table entry needs to be established for each logical page, the mapping table occupies a large amount of memory.

块映射则是以块为单位进行地址映射,逻辑块内的地址偏移与物理块内偏移保持一致。较之页映射表,映射表占用内存很小,但其缺点是在处理小数据更新时性能较差,一小块数据的更新会引起对整个块内容的复制。Block mapping is based on block-based address mapping, and the address offset in the logical block is consistent with the offset in the physical block. Compared with the page mapping table, the mapping table occupies less memory, but its disadvantage is that it has poor performance when processing small data updates, and the update of a small piece of data will cause the copy of the entire block content.

综合页映射与块映射的优缺点产生混合映射机制,混合映射将NAND Flash上的块在功能上分成数据块和日志块,日志块较少。当要对某个数据块中的数据进行更新时,新数据会写入日志块,当所有日志块的数量低于一定值时,需要将日志块和数据块中的数据进行合并,这种操作会导致性能明显下降。Synthesizing the advantages and disadvantages of page mapping and block mapping results in a hybrid mapping mechanism. The hybrid mapping functionally divides the blocks on the NAND Flash into data blocks and log blocks, with fewer log blocks. When the data in a data block is to be updated, the new data will be written to the log block. When the number of all log blocks is lower than a certain value, the data in the log block and the data block need to be merged. This operation will result in a significant drop in performance.

基于在内存中缓存部分映射信息的页映射方案是对页映射的改进,这种映射方式在NAND Flash上使用多个页存储完整映射表,这种页称为映射表存储页,在内存中缓存经常被请求的映射记录,缓存大小固定,即缓存映射表内的映射表项的数量设置有上限,可存储的映射记录数量和映射表项的数量相同,保证了缓存映射表内存占用不会过大。当读写请求来到,如果对应的映射记录不在缓存内,即没有命中缓存映射表,则从NAND Flash中读取映射记录,当缓存映射表中的映射记录的数量当达到上限时,将最久没有使用访问的映射记录从缓存中换出,如果被剔除的映射记录为脏就记录,即该映射记录存储的逻辑到物理页的映射关系在缓存中已经发生了变化,则需要回写到NAND Flash中的映射表中。映射记录的读取和换出导致了对NAND Flash的附加读写。The page mapping scheme based on caching part of the mapping information in the memory is an improvement to the page mapping. This mapping method uses multiple pages to store the complete mapping table on the NAND Flash. This page is called the mapping table storage page and is cached in the memory. For frequently requested mapping records, the cache size is fixed, that is, the number of mapping table entries in the cache mapping table is set to an upper limit, and the number of mapping records that can be stored is the same as the number of mapping table entries, which ensures that the memory usage of the cache mapping table will not exceed. big. When a read and write request comes, if the corresponding mapping record is not in the cache, that is, the cache mapping table is not hit, the mapping record is read from the NAND Flash. When the number of mapping records in the cache mapping table reaches the upper limit, the maximum The mapping record that has not been accessed for a long time is swapped out from the cache. If the deleted mapping record is dirty, it is recorded, that is, the mapping relationship between the logical and physical pages stored in the mapping record has changed in the cache, and it needs to be written back to the cache. in the mapping table in NAND Flash. The reading and swapping of map records results in additional reads and writes to the NAND Flash.

综上所述,页映射灵活且性能最好,而混合映射较差,而块映射性能最差。而基于缓存部分映射信息的页映射方案不会产生合并操作,因此其性能高于混合映射,和页映射方式的性能相近。但是由于缓存映射表只能存储有限的映射记录,导致部分请求无法命中缓存映射表无法完成直接寻址而需要和NAND Flash中的映射表进行映射记录交换,从而产生了非请求导致读取NAND Flash上映射表的附加读操作和将映射记录写入到NAND Flash上的附加写操作,映射记录写入NAND Flash还会产生因空闲块不足而产生的附加垃圾回收操作。这些附加擦着最终导致其性能比页映射低,命中率越低,性能越差。因此如何在不增加内存占用的前提下,在缓存映射表中缓存更多的映射表项,即提高缓存映射表存储密度以提高命中率是基于缓存部分映射信息的页映射方案需要重点解决的难点。To sum up, page mapping is flexible and has the best performance, while mixed mapping is poor, and block mapping is the worst. However, the page mapping scheme based on the partial mapping information of the cache does not generate a merge operation, so its performance is higher than that of the mixed mapping, and is similar to the performance of the page mapping method. However, because the cache mapping table can only store limited mapping records, some requests cannot hit the cache mapping table and cannot complete direct addressing, and need to exchange mapping records with the mapping table in NAND Flash, resulting in non-requests that lead to reading NAND Flash The additional read operation of the mapping table and the additional write operation of writing the mapping record to the NAND Flash, and the writing of the mapping record to the NAND Flash will also generate an additional garbage collection operation due to insufficient free blocks. These additional scratches ultimately lead to lower performance than page mapping, and the lower the hit rate, the worse the performance. Therefore, how to cache more mapping table entries in the cache mapping table without increasing the memory usage, that is, to increase the storage density of the cache mapping table to improve the hit rate is the difficulty that the page mapping scheme based on the partial mapping information of the cache needs to solve. .

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种提高地址映射表中映射信息密度的方法,可以提高缓存映射表内映射记录密度,达到提高FTL的读写性能的目的。The purpose of the present invention is to provide a method for improving the density of mapping information in the address mapping table, which can improve the density of mapping records in the cache mapping table and achieve the purpose of improving the read and write performance of the FTL.

本发明的目的是通过以下技术方案实现的:The purpose of this invention is to realize through the following technical solutions:

一种提高地址映射表中映射信息密度的方法,包括:A method for improving the density of mapping information in an address mapping table, comprising:

在写入数据时,将数据按页为单位进行分割,再按逻辑地址从低到高的顺序将数据依次写入存储器中具有多个连续空闲页的块内,存储后的每一页数据均对应一条映射记录,则根据这些映射记录生成一到多条映射条目;When writing data, the data is divided into page units, and then the data is written into the block with multiple consecutive free pages in the memory in order of logical address from low to high, and the data of each page after storage is Corresponding to a mapping record, one or more mapping entries are generated according to these mapping records;

在读数据时,将读请求地址按页为单位进行分割,并逐一检索内存中的缓存映射表,如果某一页的逻辑地址没有命中内存中的缓存映射表,则读取存储器中用于存储映射表的映射表存储页,从映射表存储页中获得所需的目标映射记录;并且同时,还在该映射表存储页中检索目标映射记录周边的映射记录,将符合条件的周边映射记录通过合并生成一条映射条目,检索过程如下:读取映射表存储页内容,即映射表片段,再以目标映射记录为起点向前后两个方向检索映射表片段,如果在某个方向中发现相邻的映射记录B与目标映射记录的逻辑地址值与物理地址值都相差1,则以相邻的映射记录B为起点向同样的方向继续检索映射表,直至两个相邻的映射记录不再连续,或者虽然连续但已经存在于缓存映射表为止,或者检索到映射表存储页中的第一条或最后一条映射记录;When reading data, the read request address is divided into pages, and the cache mapping table in the memory is retrieved one by one. If the logical address of a page does not hit the cache mapping table in the memory, the read memory is used to store the mapping table. In the mapping table storage page of the table, the required target mapping record is obtained from the mapping table storage page; and at the same time, the mapping records around the target mapping record are also retrieved in the mapping table storage page, and the eligible surrounding mapping records are merged by A mapping entry is generated, and the retrieval process is as follows: read the content of the mapping table storage page, that is, the mapping table fragment, and then use the target mapping record as the starting point to retrieve the mapping table fragment in the forward and backward directions. If adjacent mappings are found in a certain direction The logical address value and the physical address value of record B and the target mapping record are both different by 1, then continue to search the mapping table in the same direction with the adjacent mapping record B as the starting point, until the two adjacent mapping records are no longer consecutive, or Although it is continuous, it has existed in the cache mapping table, or the first or last mapping record in the storage page of the mapping table is retrieved;

将写入数据与读数据时,所生成的映射条目插入所述内存中的缓存映射表。When writing data and reading data, the generated mapping entry is inserted into the cache mapping table in the memory.

在写入数据时,如果写入数据的页数为N,存储器中具有多个连续空闲页的块中的连续空闲页数量为M,且N>M时,则需要跨块存储,即需要剩余的数据页按逻辑地址从低到高的顺序将数据依次写入其他具有多个连续空闲页的块内,直至所有数据页均被写入存储器中;When writing data, if the number of pages of the written data is N, the number of consecutive free pages in the block with multiple consecutive free pages in the memory is M, and when N>M, cross-block storage is required, that is, the remaining number of free pages is required. The data pages of the data are sequentially written into other blocks with multiple consecutive free pages in the order of logical addresses from low to high, until all data pages are written into the memory;

如果写入数据页时产生了S次跨块存储,则共生成了S个映射条目,每一映射条目中包含的映射记录的数据即为相应块中所存储数据页的数量。If S times of cross-block storage are generated when writing a data page, a total of S mapping entries are generated, and the data of the mapping record included in each mapping entry is the number of data pages stored in the corresponding block.

所述映射条目存储了若干个连续的映射记录;如果一条逻辑地址LBA为L的映射记录MPRec1,其物理地址PBA为P,如果另外一条逻辑地址LBA为L+1映射记录MPRec2,其物理地址PBA为P+1,则映射记录MPRec1和MPRec2是连续的,如果另外一条逻辑地址LBA为L+2映射记录MPRec3,其物理地址PBA为P+2,则映射记录MPRec1、MPRec2和MPRec3是连续的,以此类推,有N条映射记录,其逻辑地址LBA的值从低到高是按照L、L+1、L+2、…、L+N-1连续增长的,相邻映射记录中记录的逻辑地址的值相差1,而其物理地址PBA的值也是从低到高是按照P、P+1、P+2、…、P+N-1连续增长的,相邻映射记录中记录的物理地址的值相差1,这样的N条映射记录即为连续的映射记录。The mapping entry stores several consecutive mapping records; if a logical address LBA is a mapping record MPRec1 of L, its physical address PBA is P, and if another logical address LBA is an L+1 mapping record MPRec2, its physical address PBA If it is P+1, the mapping records MPRec1 and MPRec2 are continuous. If another logical address LBA is L+2, the mapping record MPRec3, and its physical address PBA is P+2, then the mapping records MPRec1, MPRec2 and MPRec3 are continuous. By analogy, there are N mapping records, and the value of the logical address LBA increases continuously from low to high according to L, L+1, L+2, ..., L+N-1, which are recorded in adjacent mapping records. The value of the logical address differs by 1, and the value of its physical address PBA also increases continuously from low to high according to P, P+1, P+2, ..., P+N-1. The physical address recorded in the adjacent mapping record The value of the address differs by 1, and such N mapping records are consecutive mapping records.

映射条目由该连续的N条映射记录中,具有最小逻辑地址那条映射记录中的逻辑地址和物理地址以及一个长度值N和一个脏标志位组成;The mapping entry consists of the logical address and physical address in the mapping record with the smallest logical address, a length value N and a dirty flag bit in the consecutive N mapping records;

其中映射条目的逻辑地址和物理地址所占的字节数,和相应映射记录中的逻辑地址和物理地址所占的字节数相同,在使用另外用一个字节来存储长度值N和脏标志位,脏标志位占用该字节的最高位,用来标识映射条目在缓存映射表的生存周期内是否被更改,如果发生了更改则赋值为1,否则值为0;条目的长度值保存在该字节的0到7位中。The number of bytes occupied by the logical address and physical address of the mapping entry is the same as the number of bytes occupied by the logical address and physical address in the corresponding mapping record, and another byte is used to store the length value N and the dirty flag. Bit, the dirty flag bit occupies the highest bit of the byte, which is used to identify whether the mapping entry has been changed during the lifetime of the cache mapping table. If it has changed, it is assigned a value of 1, otherwise the value is 0; in bits 0 to 7 of this byte.

将映射条目插入所述内存中的缓存映射表包括:Inserting mapping entries into the cache mapping table in the memory includes:

如果映射条目和缓存映射表中的既有条目产生因在逻辑地址上有交集而发生的冲突,则需要对相关映射条目进行分解并重新组合;If there is a conflict between the mapping entry and the existing entry in the cache mapping table due to the intersection of logical addresses, the related mapping entry needs to be decomposed and reassembled;

如果映射条目和缓存映射表中的既有条目是连续的,则需要对相关映射条目进行再次合并。If the mapping entry and the existing entry in the cache mapping table are continuous, the related mapping entry needs to be merged again.

当映射条目插入所述内存中的缓存映射表后,如果接收到的读请求命中映射条目,则直接计算出相应的物理地址,其步骤包括:After the mapping entry is inserted into the cache mapping table in the memory, if the received read request hits the mapping entry, the corresponding physical address is directly calculated, and the steps include:

检索缓存映射表,比对读请求中的逻辑地址LBA和各映射条目所表示的逻辑地址范围来判断该LBA是否落在某条映射记录所表示的逻辑地址范围内;Retrieve the cache mapping table, compare the logical address LBA in the read request and the logical address range represented by each mapping entry to determine whether the LBA falls within the logical address range represented by a mapping record;

对于某个长度为N的映射条目,其中存储的逻辑地址为LBA1,物理地址为PBA1,当LBA>=LBA1,且LBA<=LBA1+N-1,则表示请求中的包含的逻辑地址命中了缓存映射表中的映射条目,读请求中的逻辑地址LBA对应的物理地址PBA的计算方法为:PBA=PBA1+LBA-LBA1,通过计算即可完成对物理地址的寻址。For a mapping entry of length N, the stored logical address is LBA1 and the physical address is PBA1. When LBA>=LBA1, and LBA<=LBA1+N-1, it means that the logical address included in the request hits Cache the mapping entries in the mapping table, and the calculation method of the physical address PBA corresponding to the logical address LBA in the read request is: PBA=PBA1+LBA-LBA1, and the addressing of the physical address can be completed by calculation.

由上述本发明提供的技术方案可以看出,根据读写操作生成相应的映射记录并插入缓存映射表,可以在不占用更多内存资源的前提下,提高缓存映射表内映射记录密度,从而增加缓存映射表内映射记录数量、提高缓存映射表命中率。It can be seen from the above technical solutions provided by the present invention that the corresponding mapping records are generated according to the read and write operations and inserted into the cache mapping table, which can increase the density of mapping records in the cache mapping table without occupying more memory resources, thereby increasing the number of mapping records in the cache mapping table. The number of mapping records in the cache mapping table is increased, and the hit rate of the cache mapping table is improved.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1为本发明实施例提供的一种提高地址映射表中映射信息密度的方法的流程图;1 is a flowchart of a method for improving the density of mapping information in an address mapping table provided by an embodiment of the present invention;

图2为本发明实施例提供的产生的映射条目插入内存中的缓存映射表时对相关映射条目进行分解并重新组合的示意图;2 is a schematic diagram of decomposing and recombining a related mapping entry when a generated mapping entry provided by an embodiment of the present invention is inserted into a cache mapping table in the memory;

图3为本发明实施例提供的产生的映射条目插入内存中的缓存映射表时对相关映射条目进行合并的示意图;3 is a schematic diagram of merging related mapping entries when a generated mapping entry provided by an embodiment of the present invention is inserted into a cache mapping table in a memory;

图4为本发明实施例提供的产生的映射条目插入内存中的缓存映射表时对相关映射条目进行合并的示意图。FIG. 4 is a schematic diagram of merging related mapping entries when a generated mapping entry is inserted into a cache mapping table in a memory according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明的保护范围。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. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

本发明实施例提供一种提高地址映射表中映射信息密度的方法,如图1所示,其主要包括:An embodiment of the present invention provides a method for improving the density of mapping information in an address mapping table, as shown in FIG. 1 , which mainly includes:

1、判断多个逻辑地址上相邻的映射记录是否可合并成映射条目的条件1. Conditions for judging whether adjacent mapping records on multiple logical addresses can be merged into mapping entries

本发明实施例中,在写入数据与读数据时,都可以将符合条件的多个映射记录合并成映射条目,生成的映射条目中存储了若干个连续的映射记录;具体来说,如果一条逻辑地址LBA为L的映射记录MPRec1,其物理地址PBA为P,如果另外一条逻辑地址LBA为L+1映射记录MPRec2,其物理地址PBA为P+1,则映射记录MPRec1和MPRec2是连续的,如果另外一条逻辑地址LBA为L+2映射记录MPRec3,其物理地址PBA为P+2,则映射记录MPRec1、MPRec2和MPRec3是连续的,以此类推,有N条映射记录,其逻辑地址LBA的值从低到高是按照L、L+1、L+2、…、L+N-1连续增长的,相邻映射记录中记录的逻辑地址的值相差1,而其物理地址PBA的值也是从低到高是按照P、P+1、P+2、…、P+N-1连续增长的,相邻映射记录中记录的物理地址的值相差1,这样的N条映射记录即为连续的映射记录,这样的N条映射记录可合并成一条映射条目。In this embodiment of the present invention, when writing data and reading data, multiple mapping records that meet the conditions can be combined into mapping entries, and several consecutive mapping records are stored in the generated mapping entry; If the logical address LBA is the mapping record MPRec1 of L, and its physical address PBA is P, if another logical address LBA is the L+1 mapping record MPRec2, and its physical address PBA is P+1, then the mapping records MPRec1 and MPRec2 are continuous. If another logical address LBA is L+2 mapping record MPRec3, and its physical address PBA is P+2, then mapping records MPRec1, MPRec2 and MPRec3 are consecutive, and so on, there are N mapping records whose logical address LBA The value increases continuously from low to high according to L, L+1, L+2, ..., L+N-1. The values of the logical addresses recorded in the adjacent mapping records differ by 1, and the value of the physical address PBA is also From low to high, it increases continuously according to P, P+1, P+2, ..., P+N-1, and the values of physical addresses recorded in adjacent mapping records differ by 1. Such N mapping records are continuous. Mapping records, such N mapping records can be combined into a mapping entry.

对于连续的N条映射记录,可合并成映射条目:每条映射条目由该连续的N条映射记录中具有最小逻辑地址那条映射记录、长度值N以及脏标志位等三个部分组成;其中长度值N和脏标志位被存储在同一个字节内,脏标志位占用该字节的最高位,用来标识该映射条目在缓存映射表的生存周期内是否被更改,如果发生了更改则赋值为“1”,否则值为“0”,条目的长度值N保存在该字节的0到7位中。For consecutive N mapping records, they can be combined into mapping entries: each mapping entry consists of the mapping record with the smallest logical address in the consecutive N mapping records, the length value N, and the dirty flag bit; The length value N and the dirty flag bit are stored in the same byte. The dirty flag bit occupies the highest bit of the byte and is used to identify whether the mapping entry has been changed during the lifetime of the cache mapping table. The value is "1", otherwise the value is "0", and the length value N of the entry is stored in bits 0 to 7 of this byte.

2、在写入数据时,将数据按页为单位进行分割,再按逻辑地址从低到高的顺序将数据依次写入存储器(NAND Flash)中具有多个连续空闲页的块内,存储后的每一页数据均对应一条映射记录,可将这些连续的映射记录生成一到多条映射条目。2. When writing data, divide the data into pages, and then write the data into blocks with multiple consecutive free pages in the memory (NAND Flash) in the order of logical addresses from low to high. Each page of data corresponds to a mapping record, and one or more mapping entries can be generated from these consecutive mapping records.

在写入数据时,如果写入数据的页数为N,存储器中具有多个连续空闲页的块中的连续空闲页数量为M,且N>M时,则需要跨块存储,即需要剩余的数据页按逻辑地址从低到高的顺序将数据依次写入其他具有多个连续空闲页的块内,直至所有数据页均被写入存储器中。When writing data, if the number of pages of the written data is N, the number of consecutive free pages in the block with multiple consecutive free pages in the memory is M, and when N>M, cross-block storage is required, that is, the remaining number of free pages is required. The data pages of the data are sequentially written into other blocks with multiple consecutive free pages in the order of logical addresses from low to high, until all data pages are written into the memory.

本领域技术人员可以理解,在写入数据时,同样是以页为单位写入块中,块内页的写入顺序只能从低地址页向高地址页顺序写入而不能随机写入,因此逻辑地址低的数据被写入物理地址低的页,产生一条逻辑地址到物理地址的映射记录,逻辑地址次低的数据被写入物理地址次低的页,产生一条逻辑地址到物理地址的映射记录,直到本请求的数据被全部写入完成;如果在写入过程中本空闲块内的空闲页全部被写满而此请求仍然有部分页数据没有被写入NAND Flash则需要跨块写入数据,即分配一个新空闲块用于写入写请求中的数据,同样的,数据写入的顺序依然是低逻辑地址的数据写入低物理地址的页,产生一条逻辑地址到物理地址的映射记录,逻辑地址次低的数据被写入物理地址次低的页,产生一条逻辑地址到物理地址的映射记录。如此反复,直到写请求中所有数据被写入NAND Flash中。Those skilled in the art can understand that when writing data, it is also written into a block in units of pages, and the writing order of pages in a block can only be written sequentially from low-address pages to high-address pages, but cannot be written randomly. Therefore, the data with the lower logical address is written to the page with the lower physical address, and a mapping record between the logical address and the physical address is generated. Mapping records until all the data of this request is written; if all the free pages in this free block are full during the writing process and some page data is still not written to NAND Flash in this request, cross-block writing is required Enter data, that is, allocate a new free block for writing the data in the write request. Similarly, the order of data writing is still that the data of the low logical address is written to the page of the low physical address, and a logical address to the physical address is generated. In the mapping record, the data with the second-lowest logical address is written into the page with the second-lowest physical address, resulting in a mapping record from a logical address to a physical address. This is repeated until all the data in the write request is written into the NAND Flash.

因此写请求产生了N条映射记录,如果写入时没有产生跨块写入,则此N条映射记录是连续的。因此这N条映射记录可以合并成1条映射条目,条目长度为N。Therefore, the write request generates N mapping records. If no cross-block writing occurs during writing, the N mapping records are consecutive. Therefore, the N mapping records can be combined into one mapping entry, and the entry length is N.

如果写入时产生了跨块写入,则存储在同一个块内的数据对应的M条映射记录是连续的,因此这M条映射记录可以合并成1条映射条目,条目长度为M。如果写入数据页时产生了S次跨块存储,则共生成了S条映射条目,每一映射条目中包含的映射记录的数据即为相应块中所因本次请求而写入数据的页的数量。If cross-block writing occurs during writing, the M mapping records corresponding to the data stored in the same block are consecutive, so the M mapping records can be combined into one mapping entry, and the entry length is M. If S times of cross-block storage are generated when writing a data page, a total of S mapping entries are generated, and the data of the mapping record contained in each mapping entry is the page in the corresponding block to which the data is written due to this request. quantity.

3、在读数据时,将读请求地址范围按页为单位进行分割,并逐一检索内存中的缓存映射表,如果某一页的逻辑地址没有命中内存中的缓存映射表,则读取存储器中的映射表,用来保存映射表的闪存页称为映射表存储页。通过读取映射表存储页来获得所需数据的逻辑地址与物理地址的映射关系,即目标映射记录;在读取映射表存储页的内容后,在该内容中中检索目标映射记录周边的映射记录,将周边连续的映射记录合并成映射条目,检索过程如下:首先读取出映射表存储页的内容,即映射表片段,然后,以目标映射记录为起点向前后两个方向检索该映射表片段,如果在某个方向中发现相邻的映射记录B与映射记录的逻辑地址值与物理地址值都相差1,则以相邻的映射记录B为起点向同样的方向继续检索映射表。检索中止的条件为:a)两个相邻的映射记录不再连续(即逻辑地址值和物理地址值上不再都是相差1);b)已经检索到了该映射表片段中的第一个映射记录;c)已经检索到该映射表片段中的最后一个映射记录;d)遇到虽然连续但已经存在于缓存映射表的映射记录。3. When reading data, the read request address range is divided into pages, and the cache mapping table in the memory is retrieved one by one. If the logical address of a page does not hit the cache mapping table in the memory, read the cache mapping table in the memory. The mapping table, the flash page used to save the mapping table is called the mapping table storage page. By reading the storage page of the mapping table, the mapping relationship between the logical address and the physical address of the required data is obtained, that is, the target mapping record; after reading the content of the storage page of the mapping table, the mapping around the target mapping record is retrieved in the content. Record, merge the surrounding continuous mapping records into mapping entries, and the retrieval process is as follows: first, read the content of the mapping table storage page, that is, the mapping table fragment, and then use the target mapping record as the starting point to retrieve the mapping table in both forward and backward directions If it is found in a certain direction that the logical address value and the physical address value of the adjacent mapping record B and the mapping record differ by 1, the mapping table will continue to be searched in the same direction with the adjacent mapping record B as the starting point. The conditions for aborting the retrieval are: a) The two adjacent mapping records are no longer consecutive (that is, the logical address value and the physical address value are no longer different by 1); b) The first one in the mapping table fragment has been retrieved Map records; c) have retrieved the last map record in this map segment; d) encountered a map record that is contiguous but already exists in the cache map.

4、将写入数据与读数据时所生成的映射条目插入所述内存中的缓存映射表。4. Insert the mapping entries generated when writing data and reading data into the cache mapping table in the memory.

本发明实施例中,还将产生的映射条目插入内存中的缓存映射表,以充分利用请求的空间局部性和时间局部性,提高FTL的读写效率。映射条目插入缓存映射表时还根据具体情况采用如下两种不同处理方式:In the embodiment of the present invention, the generated mapping entry is also inserted into the cache mapping table in the memory, so as to make full use of the spatial locality and time locality of the request, and improve the reading and writing efficiency of the FTL. When the mapping entry is inserted into the cache mapping table, the following two different processing methods are adopted according to the specific situation:

如果待插入的映射条目和缓存映射表中既有的一到多个条目产生因在逻辑地址空间上有交集,则需要对相关映射条目进行分解并重新组合,两逻辑地址空间重合方式有多种,需要根据不同情况进行分别处理。示例性的,图2所示是其中的一种分解并重新组合的方法:当逻辑首地址为1136的映射条目插入缓存映射表时该条目和缓存映射表中的逻辑首地址为1135的映射条目在逻辑地址空间上有交集,需要进行重新组合,组合后产生3个新映射条目,其中逻辑首地址为1135的条目原位存储于缓存映射表,而其他两个条目此时处于游离状态,如果此时缓存映射表中有超过两个空表项,则可以将游离状态的两个映射条目直接插入缓存映射表。如果缓存映射表中空表项小于两个,则需要首先换出最久没有访问过的映射条目,然后将游离状态的新条目插入缓存映射表。If the mapping entry to be inserted and one or more existing entries in the cache mapping table are generated because there is an intersection in the logical address space, the related mapping entries need to be decomposed and recombined. There are many ways to overlap the two logical address spaces. , which need to be handled separately according to different situations. Exemplarily, Figure 2 shows one of the methods of decomposition and recombination: when the mapping entry whose logical first address is 1136 is inserted into the cache mapping table, this entry and the mapping entry whose logical first address is 1135 in the cache mapping table There is an intersection in the logical address space, which needs to be recombined. After the combination, three new mapping entries are generated. The entry whose logical first address is 1135 is stored in the cache mapping table in situ, while the other two entries are in a free state at this time. If In this case, if there are more than two empty entries in the cache mapping table, the two mapping entries in the free state can be directly inserted into the cache mapping table. If there are less than two empty entries in the cache mapping table, the mapping entry that has not been accessed for the longest time needs to be swapped out first, and then the new entry in the free state is inserted into the cache mapping table.

如果映射条目和缓存映射表中的既有条目是连续的,则需要对相关映射条目进行再次合并。示例性的,如图3,逻辑首地址为1132、长度为3的映射条目插入缓存时,可以与缓存中逻辑首地址为1135的条目进行合并,合并产生新的映射条目,新映射条目逻辑首地址和物理首地址分别为1132和517,映射条目长度变为7。如图4所示,逻辑首地址为1139、长度为3的映射条目插入缓存时,会与缓存中的首地址为1135长度为4的映射条目合并,合并后的映射条目依然原位保存在缓存中。If the mapping entry and the existing entry in the cache mapping table are continuous, the related mapping entry needs to be merged again. Exemplarily, as shown in Figure 3, when a mapping entry with a logical first address of 1132 and a length of 3 is inserted into the cache, it can be merged with an entry with a logical first address of 1135 in the cache, and the merge generates a new mapping entry. The logical head of the new mapping entry is The address and physical first address are 1132 and 517 respectively, and the length of the mapping entry becomes 7. As shown in Figure 4, when a mapping entry whose logical first address is 1139 and whose length is 3 is inserted into the cache, it will be merged with the mapping entry whose first address is 1135 and whose length is 4 in the cache, and the merged mapping entry is still stored in the cache in place. middle.

本发明实施例中,还提供了通过映射条目来计算目标映射记录的方法:In this embodiment of the present invention, a method for calculating target mapping records by mapping entries is also provided:

如果请求命中缓存映射表的某个映射条目,则可直接计算出相应的物理地址,其步骤包括:检索缓存映射表,比对读请求中的逻辑地址LBA和各映射条目所表示的逻辑地址范围来判断该LBA是否落在某条映射记录所表示的逻辑地址范围内;对于某个长度为N的映射条目,其中存储的逻辑地址为LBA1,物理地址为PBA1,当LBA>=LBA1,且LBA<=LBA1+N-1,则表示请求中的包含的逻辑地址命中了缓存映射表中的映射条目,读请求中的逻辑地址LBA对应的物理地址PBA的计算方法为:PBA=PBA1+LBA-LBA1,通过计算即可完成对物理地址的寻址。If the request hits a certain mapping entry in the cache mapping table, the corresponding physical address can be directly calculated, and the steps include: retrieving the cache mapping table, comparing the logical address LBA in the read request with the logical address range represented by each mapping entry To judge whether the LBA falls within the logical address range represented by a mapping record; for a mapping entry with a length of N, the stored logical address is LBA1 and the physical address is PBA1, when LBA>=LBA1, and LBA <=LBA1+N-1, it means that the logical address contained in the request hits the mapping entry in the cache mapping table, and the calculation method of the physical address PBA corresponding to the logical address LBA in the read request is: PBA=PBA1+LBA- LBA1, the addressing of the physical address can be completed by calculation.

本发明实施例的上述方案,可以提高缓存映射表的命中率,提高FTL的读写性能,本发明在不增加位于内存中的缓存映射表里表项数量的前提下,将连续的映射记录进行合并产生映射条目,这样每个映射条目可以表示多个逻辑地址到物理地址之间的映射关系,缓存映射表内的每个表项内存储的是一条条映射条目而不再是一条条只能表示一个逻辑地址到物理地址之间映射关系的映射记录,以此来增加缓存映射表中存储的映射记录数量,能显著增加缓存映射表的命中率,同时,由于映射条目能表达多个逻辑地址上连续的映射记录,可以有效利用请求的空间局部性,提高FTL的读写的效率,可广泛应用于各种系统的NAND Flash存储器的管理。The above solution of the embodiment of the present invention can improve the hit rate of the cache mapping table, and improve the read and write performance of the FTL. The present invention does not increase the number of entries in the cache mapping table located in the memory. Mapping entries are generated by merging, so that each mapping entry can represent the mapping relationship between multiple logical addresses and physical addresses. Each entry in the cache mapping table stores a mapping entry instead of a single entry. A mapping record that represents the mapping relationship between a logical address and a physical address, so as to increase the number of mapping records stored in the cache mapping table, which can significantly increase the hit rate of the cache mapping table. At the same time, because the mapping entry can express multiple logical addresses The continuous mapping record can effectively utilize the spatial locality of the request, improve the efficiency of FTL reading and writing, and can be widely used in the management of NAND Flash memory in various systems.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例可以通过软件实现,也可以借助软件加必要的通用硬件平台的方式来实现。基于这样的理解,上述实施例的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software or by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the above embodiments may be embodied in the form of software products, and the software products may be stored in a non-volatile storage medium (which may be CD-ROM, U disk, mobile hard disk, etc.), including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明披露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above description is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited to this. Substitutions should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (6)

1. A method for increasing mapping information density in an address mapping table, comprising:
when data is written, dividing the data by taking a page as a unit, sequentially writing the data into a block with a plurality of continuous free pages in a memory according to the sequence of logical addresses from low to high, wherein each stored page of data corresponds to one mapping record, and generating one to a plurality of mapping entries according to the mapping records; if cross-block writing is not generated during writing, the mapping records are continuous and can be combined into 1 mapping entry; if cross-block writing is generated during writing, mapping records corresponding to data stored in the same block are continuous, and all corresponding mapping records can be combined into 1 mapping entry; thus, if S times of cross-block storage is generated when writing data pages, S pieces of mapping entries are generated together;
when reading data, dividing the read request address by taking a page as a unit, searching cache mapping tables in the memory one by one, if the logical address of a certain page does not hit the cache mapping table in the memory, reading a mapping table storage page used for storing the mapping table in the memory, and obtaining a required target mapping record from the mapping table storage page; and meanwhile, the mapping records around the target mapping record are also searched in the mapping table memory page, and a mapping entry is generated by combining the surrounding mapping records meeting the conditions, wherein the searching process comprises the following steps: reading the content of a storage page of a mapping table, namely a mapping table segment, retrieving the mapping table segment from a target mapping record in a front direction and a rear direction, if the difference between the logical address value and the physical address value of the adjacent mapping record B and the target mapping record is found to be 1 in a certain direction, continuing to retrieve the mapping table from the adjacent mapping record B in the same direction until the two adjacent mapping records are not continuous or exist in a cache mapping table or a first mapping record or a last mapping record in the storage page of the mapping table is retrieved;
and when data is written and read, the generated mapping item is inserted into a cache mapping table in the memory.
2. The method of claim 1, wherein when writing data, if the number of pages of the written data is N, the number of consecutive free pages in a block with multiple consecutive free pages in the memory is M, and N > M, then cross-block storage is required, i.e. the remaining data pages are required to write data into other blocks with multiple consecutive free pages in order of logical addresses from low to high, until all data pages are written into the memory;
if cross-block storage occurs when a data page is written, the data of the mapping record contained in each mapping entry is the number of data pages stored in the corresponding block.
3. The method for increasing mapping information density in the address mapping table according to claim 1 or 2, wherein the mapping entries store a plurality of consecutive mapping records; if one mapping record MPRec1 with LBA as L and PBA as P is available for one logical address, if another mapping record MPRec2 with LBA as L +1 is available, the mapping records MPRec1 and MPRec2 are consecutive with a physical address PBA of P +1, if the other logical address LBA is L +2 mapping record MPRec3, the physical address PBA is P +2, the mapping records MPRec1, MPRec2 and MPRec3 are consecutive, and so on, there are N mapping records, the logical address LBA values of which successively increase from low to high in accordance with L, L +1, L +2, …, L + N-1, the logical address values recorded in adjacent mapping records differ by 1, the values of the physical addresses PBA are also increased from low to high according to P, P +1, P +2, … and P + N-1, the values of the physical addresses recorded in adjacent mapping records are different by 1, and such N mapping records are consecutive mapping records.
4. A method for increasing mapping information density in an address mapping table according to claim 3, wherein a mapping entry is composed of the logical address and the physical address in the mapping record with the smallest logical address, a length value N and a dirty flag bit in the N consecutive mapping records;
the logical address and the physical address of the mapping entry occupy the same number of bytes as the logical address and the physical address in the corresponding mapping record, and one byte is additionally used for storing a length value N and a dirty flag bit, wherein the dirty flag bit occupies the highest bit of the byte and is used for identifying whether the mapping entry is changed in the life cycle of the cache mapping table, if the mapping entry is changed, the mapping entry is assigned to be 1, otherwise, the mapping entry is assigned to be 0; the length value of the entry is stored in bits 0 to 7 of the byte.
5. The method as claimed in claim 1, wherein the step of inserting the mapping entry into the cache mapping table in the memory comprises:
if the mapping entries and the existing entries in the cache mapping table generate conflicts caused by intersection on the logical addresses, the relevant mapping entries need to be decomposed and recombined;
if the mapping entries and the existing entries in the cache mapping table are consecutive, the associated mapping entries need to be merged again.
6. The method as claimed in claim 1, wherein after the mapping entries are inserted into the cache mapping table in the memory, if the received read request hits the mapping entries, the corresponding physical addresses are directly calculated, and the step includes:
searching a cache mapping table, and comparing the logical address LBA in the read request with the logical address range represented by each mapping item to judge whether the LBA falls in the logical address range represented by a certain mapping record;
for a mapping entry with a length of N, where the stored logical address is LBA1, and the physical address is PBA1, when LBA > is LBA1, and LBA < ═ LBA1+ N-1, it indicates that the logical address included in the request hits the mapping entry in the cache mapping table, and the method for calculating the physical address PBA corresponding to the logical address LBA in the read request is as follows: PBA1+ LBA-LBA1, and the addressing of the physical address can be completed through calculation.
CN201710022698.0A 2017-01-12 2017-01-12 A method for improving the density of mapping information in the address mapping table Expired - Fee Related CN107066393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710022698.0A CN107066393B (en) 2017-01-12 2017-01-12 A method for improving the density of mapping information in the address mapping table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710022698.0A CN107066393B (en) 2017-01-12 2017-01-12 A method for improving the density of mapping information in the address mapping table

Publications (2)

Publication Number Publication Date
CN107066393A CN107066393A (en) 2017-08-18
CN107066393B true CN107066393B (en) 2020-06-09

Family

ID=59599191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710022698.0A Expired - Fee Related CN107066393B (en) 2017-01-12 2017-01-12 A method for improving the density of mapping information in the address mapping table

Country Status (1)

Country Link
CN (1) CN107066393B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671458A (en) * 2017-10-17 2019-04-23 联发科技股份有限公司 The method of management flash memory module and relevant flash controller
KR20190044968A (en) * 2017-10-23 2019-05-02 에스케이하이닉스 주식회사 Memory system and operating method thereof
CN108021511B (en) * 2017-11-22 2021-04-06 深圳忆联信息系统有限公司 SSD performance improving method and SSD
CN108037725B (en) * 2017-12-08 2019-09-03 中冶南方工程技术有限公司 A kind of method and apparatus for reading and writing plc data
CN108595349B (en) * 2017-12-28 2020-01-31 贵阳忆芯科技有限公司 Address translation method and device for mass storage device
CN109348456B (en) * 2018-10-17 2021-07-27 安徽大学 A Relation Mining Method Based on Short-Range Wireless Communication Data
CN111694770B (en) * 2019-03-15 2022-12-02 杭州宏杉科技股份有限公司 Method and device for processing IO (input/output) request
WO2020222727A1 (en) * 2019-04-29 2020-11-05 Hitachi Vantara Llc Optimizing storage and retrieval of compressed data
KR20220058944A (en) * 2019-09-10 2022-05-10 마이크론 테크놀로지, 인크. Memory Mapped Devices and Methods
CN110688155A (en) * 2019-09-11 2020-01-14 上海高性能集成电路设计中心 Merging method for storage instruction accessing non-cacheable area
CN111026678B (en) * 2019-12-23 2021-11-16 深圳忆联信息系统有限公司 Cache design method and device based on solid state disk and computer equipment
CN111143313B (en) * 2019-12-25 2023-07-25 成都三零嘉微电子有限公司 Method for improving log block read-write performance of hybrid mapping algorithm
US11144471B1 (en) 2020-05-07 2021-10-12 Micron Technology, Inc. Dual address encoding for logical-to-physical mapping
CN112486852B (en) * 2020-12-01 2024-05-14 合肥大唐存储科技有限公司 Solid state disk and address mapping method thereof
CN112631518B (en) * 2020-12-25 2022-07-26 苏州浪潮智能科技有限公司 Data storage method and equipment
WO2022140918A1 (en) * 2020-12-28 2022-07-07 Alibaba Group Holding Limited Method and system for in-memory metadata reduction in cloud storage system
CN112860596B (en) * 2021-02-07 2023-12-22 厦门壹普智慧科技有限公司 Data stream cache device of neural network tensor processor
WO2022193143A1 (en) * 2021-03-16 2022-09-22 Micron Technology, Inc. Validity mapping techniques
CN113419675B (en) * 2021-06-11 2023-03-03 联芸科技(杭州)股份有限公司 Write operation method and read operation method for memory
CN113590503B (en) * 2021-07-23 2024-03-22 合肥康芯威存储技术有限公司 Garbage recycling method and garbage recycling system for non-volatile memory
CN113590502B (en) * 2021-07-23 2024-03-22 合肥康芯威存储技术有限公司 Garbage recycling method and garbage recycling system for non-volatile memory storage equipment
CN114153384A (en) * 2021-11-09 2022-03-08 尧云科技(西安)有限公司 Storage method and device of hybrid cache
CN117370222A (en) * 2023-12-08 2024-01-09 成都佰维存储科技有限公司 Storage mapping method, storage mapping device, computer readable storage medium and electronic equipment
CN117806570B (en) * 2024-02-29 2024-05-03 深存科技(无锡)有限公司 Online memory expansion method, device, equipment and storage medium
CN117891415B (en) * 2024-03-18 2024-05-24 深圳星火半导体科技有限公司 P2L data management method and device of storage device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291194B2 (en) * 2009-11-16 2012-10-16 Mediatek Inc. Methods of utilizing address mapping table to manage data access of storage medium without physically accessing storage medium and related storage controllers thereof
CN105103137A (en) * 2013-03-15 2015-11-25 西部数据技术公司 Compression and formatting of data for data storage systems
CN105518631A (en) * 2014-08-08 2016-04-20 华为技术有限公司 Memory management method, device and system and network-on-chip
CN106021159A (en) * 2016-05-12 2016-10-12 北京匡恩网络科技有限责任公司 Logical block address-to-physical block address mapping method for high-capacity solid-state disk

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291194B2 (en) * 2009-11-16 2012-10-16 Mediatek Inc. Methods of utilizing address mapping table to manage data access of storage medium without physically accessing storage medium and related storage controllers thereof
CN105103137A (en) * 2013-03-15 2015-11-25 西部数据技术公司 Compression and formatting of data for data storage systems
CN105518631A (en) * 2014-08-08 2016-04-20 华为技术有限公司 Memory management method, device and system and network-on-chip
CN106021159A (en) * 2016-05-12 2016-10-12 北京匡恩网络科技有限责任公司 Logical block address-to-physical block address mapping method for high-capacity solid-state disk

Also Published As

Publication number Publication date
CN107066393A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
CN107066393B (en) A method for improving the density of mapping information in the address mapping table
US12265706B2 (en) Memory system with nonvolatile semiconductor memory
CN112395212B (en) Method and system for reducing garbage collection and write amplification in key-value separation storage systems
US10275361B2 (en) Managing multiple namespaces in a non-volatile memory (NVM)
US8516219B2 (en) Index cache tree
CN103136121B (en) Cache management method for solid-state disc
US8510500B2 (en) Device driver including a flash memory file system and method thereof and a flash memory device and method thereof
CN105930282B (en) A kind of data cache method for NAND FLASH
US20130198439A1 (en) Non-volatile storage
CN104166634A (en) Management method of mapping table caches in solid-state disk system
CN103019958A (en) Method for managing data in solid state memory using data attributes
CN108604165A (en) Storage device
CN106815152A (en) A kind of method for optimizing page level flash translation layer (FTL)
CN106294197A (en) A kind of page frame replacement method towards nand flash memory
US20230138215A1 (en) Memory system controlling nonvolatile memory
KR101936364B1 (en) Memory management system using flash memory and method thereof
CN108073359A (en) Operation method of data storage device
CN106776361B (en) Caching method and system for large-scale nonvolatile storage medium
CN108664217B (en) A caching method and system for reducing write performance jitter of solid state disk storage system
TW201040717A (en) Flash memory managing methods and computing systems utilizing the same
CN119678140A (en) Memory controller, memory system, method and storage medium for managing logical to physical mapping table
CN110968520A (en) Multi-stream storage device based on unified cache architecture
CN119201783A (en) Method for low-latency processing of read commands by DRAM-less storage device
CN119201784A (en) Method for managing storage medium of DRAM-free storage device
CN119201780A (en) Method for executing brush writing operation of DRAM-free storage device

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200609