CN116991757B - L2P table incremental data compression method and system - Google Patents

L2P table incremental data compression method and system Download PDF

Info

Publication number
CN116991757B
CN116991757B CN202311244552.2A CN202311244552A CN116991757B CN 116991757 B CN116991757 B CN 116991757B CN 202311244552 A CN202311244552 A CN 202311244552A CN 116991757 B CN116991757 B CN 116991757B
Authority
CN
China
Prior art keywords
lba
exp
address
increment
prediction
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
CN202311244552.2A
Other languages
Chinese (zh)
Other versions
CN116991757A (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.)
Sichuan Yunhai Core Microelectronics Technology Co ltd
Original Assignee
Sichuan Yunhai Core Microelectronics Technology 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 Sichuan Yunhai Core Microelectronics Technology Co ltd filed Critical Sichuan Yunhai Core Microelectronics Technology Co ltd
Priority to CN202311244552.2A priority Critical patent/CN116991757B/en
Publication of CN116991757A publication Critical patent/CN116991757A/en
Application granted granted Critical
Publication of CN116991757B publication Critical patent/CN116991757B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/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
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/40Specific encoding of data in memory or cache
    • G06F2212/401Compressed data
    • 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

Abstract

The invention discloses an L2P table incremental data compression method and system. The method comprises the steps of obtaining LBA address LBA_CURRENT to be written and a corresponding P4K address P4K_CURRENT from a superior module; acquiring the last piece of record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP; judging whether the last record of the current L2P increment table is invalid or not; if yes, an L2P increment record is newly added, and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP are recalculated; if not, judging whether LBA_CURRENT= LBA_EXP and P4K_CURRENT= P4K_EXP; if yes, updating the last count of the L2P increment table; if not, an L2P increment record is added, and the LBA predicted address LBA_EXP and the P4K predicted address P4K_EXP are recalculated. The invention can reduce the occupation of the L2P increment table to Nand Flash space and SSD service life loss caused by erasing.

Description

L2P table incremental data compression method and system
Technical Field
The present invention relates to the field of memory technologies, and in particular, to a method and a system for compressing incremental data of an L2P table.
Background
The solid state disk (Solid State Drivers, SSD) mostly adopts Nand Flash as a storage medium. Because Nand Flash is not capable of overwriting, erasing and writing are needed when writing again. And in order to improve write-in performance of Nand Flash. In the conventional flat address mode, the 4KB logical Block address (Logic Block Addr LBA) of the user is mapped to a Physical 4K Block address (P4K), i.e., a logical-to-Physical Block mapping table (Logic to Physical, L2P) is created, as shown in fig. 1. Only one blank block write is needed to be obtained when data is written each time, and the physical block address in the L2P table is updated, so that no additional erasing operation is needed, and the erasing operation is carried out when garbage is recovered.
In the conventional flat address mode, the logical capacity of the SSD and the DRAM space occupation of the L2P table are 1024:1. taking a 4TB SSD as an example, the L2P table occupies about 4GB. As capacity increases, the space requirements of L2P also increase. In addition, since the content in the DRAM is lost after power failure, the content of the L2P needs to be saved to Nand Flash before the hard disk is powered down. However, the power backup system of the SSD can only supply power for tens of milliseconds, which is insufficient to write L2P into NandFlash completely. It is therefore desirable to use an L2P delta table to record changing L2P entries.
A conventional L2P delta table structure is shown in fig. 2. The fixed bit size 128KB, each L2P delta entry contains one LBA address and one P4K address. Every time data is written, the LBA address of the user and the corresponding P4K address are recorded, and the data is written into Nand when 128KB is filled. Once SSD is powered down, the last L2P increment table is written into the Nand Flash, the L2P increment table can be recovered from the Nand Flash when the next power is on, and compared with full-scale writing, the power supply of the standby power system is only needed for tens of milliseconds.
With the use of SSD, the occupied Nand Flash space of the L2P increment table is gradually increased, and when the occupied Nand Flash space is increased to be equal to the L2P increment table, full replacement can be performed once, and the Nand Flash space is recovered so as to record the L2P increment again. It is not difficult to find that as the SSD capacity becomes larger, the space consumption for Nand Flash also becomes larger. In addition, the Nand space reserved for the system is limited, and the number of bad blocks caused by erasing Nand Flash is increased along with the use of SSD, so that the service life of SSD is reduced.
Disclosure of Invention
The invention aims to provide an L2P table incremental data compression method and system, which can reduce SSD service life loss caused by the occupation of Nand Flash space and erasure of an L2P incremental table.
In order to achieve the above object, the present invention provides the following solutions:
the L2P table incremental data compression method comprises the following steps:
s1: obtaining LBA address LBA_CURRENT to be written and a corresponding P4K address P4K_CURRENT from an upper module;
s2: acquiring the last piece of record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
s3: judging whether the last record of the current L2P increment table is invalid or not;
s4: if yes, an L2P increment record is newly added, and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP are recalculated;
s5: if not, judging whether LBA_CURRENT= LBA_EXP and P4K_CURRENT= P4K_EXP;
s6: if yes, the LBA and the P4K address are continuously maintained on the basis of the last processing, the merging condition is met, and the last count of the L2P increment table is updated;
s7: if not, at least one of the LBA and the P4K addresses is not continuous, the merging condition is not met, an L2P table increment record is newly added, and the LBA predicted address LBA_EXP and the P4K predicted address P4K_EXP are recalculated.
Optionally, the obtaining the last record data of the L2P delta table and the LBA prediction addresses lba_exp and p4k prediction address p4k_exp specifically includes:
the pointer is used to obtain the last piece of record data of the L2P increment table and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP.
Optionally, the recalculating the LBA prediction address lba_exp and the p4k prediction address p4k_exp specifically includes:
recalculating lba_exp using the formula lba_exp=lba_start+count 4 KB;
the p4k_exp prediction address is recalculated using the formula p4k_exp=p4k_start+count 4 KB.
Optionally, the L2P increment table is in the form of 10Bytes, and the expression is LBA (4B) +p4k (4B) +count (2B); the number of recordable bars is 13107, and the expression is 128 KB/10b=13107; the maximum recording capacity of a single table is 3276.7GB, the expression is 13107 x4 KB/x count=3276.7GB, and the Count is 65536; the single table recording capacity is minimum 51.199MB, the expression is 13107 x4 KB/bar=51.199mb, and count is 1; the number of increment tables needed by the whole disk is 750002 at most, and the expression is 3,840,000 MB/51.199 MB= 750002; the number of the increment tables needed by the whole disk is at most 2, and the expression is 3,840,000MB/3276.7 GB=2; the NAND space occupied is in the range of 256KB-9375MB.
An L2P table delta data compression system comprising:
the LBA address and P4K address acquisition module is used for acquiring an LBA address LBA_CURRENT to be written and a corresponding P4K address P4K_CURRENT from the upper module;
the LBA prediction address and P4K prediction address acquisition module is used for acquiring the last record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
the first judging module is used for judging whether the last record of the current L2P increment table is invalid or not;
the LBA prediction address and P4K prediction address recalculation module is used for adding an L2P increment record when the last record of the current L2P increment table is invalid, and recalculating LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
the second judging module is used for judging whether the LBA_CURRENT= LBA_EXP and the P4K_CURRENT= P4K_EXP are valid when the last record of the CURRENT L2P increment table is valid;
the last count updating module of the L2P increment table is configured to update the last count of the L2P increment table when lba_current= lba_exp and p4k_current= p4k_exp;
at LBA_CURRENT-! =lba_exp or p4k_current-! When=p4k_exp, the LBA predicted address and P4K predicted address recalculation module is returned.
Optionally, the LBA predicted address and P4K predicted address obtaining module specifically includes:
the LBA prediction address and P4K prediction address acquisition module is used for acquiring the last record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP by using pointers.
Optionally, the LBA prediction address and P4K prediction address recalculation module specifically includes:
the LBA prediction address recalculation unit is used for recalculating LBA_EXP by adopting a formula LBA_EXP=LBA_START+Count 4 KB;
and the P4K prediction address recalculation unit is used for recalculating the P4K_EXP prediction address by adopting the formula P4K_EXP=P4K_START+Count 4 KB.
Optionally, the L2P increment table is in the form of 10Bytes, and the expression is LBA (4B) +p4k (4B) +count (2B); the number of recordable bars is 13107, and the expression is 128 KB/10b=13107; the maximum recording capacity of a single table is 3276.7GB, the expression is 13107 x4 KB/x count=3276.7GB, and the Count is 65536; the single table recording capacity is minimum 51.199MB, the expression is 13107 x4 KB/bar=51.199mb, and count is 1; the number of increment tables needed by the whole disk is 750002 at most, and the expression is 3,840,000 MB/51.199 MB= 750002; the number of the increment tables needed by the whole disk is at most 2, and the expression is 3,840,000MB/3276.7 GB=2; the NAND space occupied is in the range of 256KB-9375MB.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
according to the invention, by judging whether the LBA_CURRENT= LBA_EXP and the P4K_CURRENT= P4K_EXP are continuous or not and combining continuous logic and physical blocks under the condition of continuous logic addresses and physical addresses, the data volume of an L2P increment table is reduced, the capacity of a single record is improved, the erasing times of NandFlash are effectively reduced, the occupation of the L2P increment table to the Nand Flash space and the SSD service life loss caused by erasing are reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a conventional flat address mode L2P table structure;
FIG. 2 is a conventional L2P delta table structure;
FIG. 3 is an L2P delta table data compression scenario;
FIG. 4 is an L2P compression increment table structure;
FIG. 5 is a flow chart of a method for L2P table delta data compression;
FIG. 6 is a block diagram of an L2P table delta data compression system.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide an L2P table incremental data compression method and system, which reduce the data volume of an L2P incremental table and improve the capacity of a single record by combining continuous logic and physical blocks, thereby reducing the SSD service life loss caused by the occupation of the L2P incremental table on Nand Flash space and erasure.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
From the foregoing background, it is known that the L2P increment table in the conventional manner generates a larger increase with use and increase in SSD disk capacity. The Nand Flash is frequently erased, so that the service life of the Nand of a reserved area of the system is reduced, and the service life of the SSD is further influenced.
The user data is buffered by the operating system and the file system, and finally the user data is relatively large blocks when being downloaded, from the perspective of the SSD disk, the LBA addresses corresponding to the user data are continuous, then the corresponding continuous physical blocks are also present in the SSD, the L2P increment table can be combined into one, as shown in FIG. 3, the LPA100-LPA105 blocks are continuous, and the corresponding P4K addresses are continuous, and then the starting address of the LBA, the starting address of the P4K and the continuous number can be recorded as one record.
According to the above thought, the invention designs an L2P compression increment table structure shown in fig. 4. Wherein the LBA address and the P4K address are identical to the L2P delta table field shown in FIG. 2, but have different meanings. The LBA address here indicates the starting address LBA_START of the LBA, and P4K is the starting address of the consecutive physical block, namely P4K_START. Count is the number of consecutive LBAs and P4K, length 2B, and a maximum of 65535 consecutive blocks can be recorded. In operation, the SSD controller software modifies the value of count appropriately according to whether the logical block address and the corresponding physical block address are consecutive, and the L2P compression increment table in operation is shown in FIG. 4.
Example 1
Fig. 5 is a flowchart of an L2P table incremental data compression method, and as shown in fig. 5, the present invention provides an L2P table incremental data compression method, where the L2P table incremental data compression method includes:
s1: obtaining LBA address LBA_CURRENT to be written and a corresponding P4K address P4K_CURRENT from an upper module;
s2: and acquiring the last piece of record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K_EXP.
S2 specifically comprises:
the pointer is used to obtain the last piece of record data of the L2P increment table and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP.
S3: judging whether the last record of the current L2P increment table is invalid or not;
s4: if yes, an L2P increment record is newly added, and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP are recalculated;
s5: if not, judging whether LBA_CURRENT= LBA_EXP and P4K_CURRENT= P4K_EXP;
s6: if yes, the LBA and the P4K address are continuously maintained on the basis of the last processing, the merging condition is met, and the last count of the L2P increment table is updated. I.e. keeping the contents of lba_start and p4k_start unchanged, the Count is incremented by 1.
S7: if not, at least one of the LBA and the P4K addresses is not continuous, the merging condition is not met, an L2P table increment record is newly added, and the LBA predicted address LBA_EXP and the P4K predicted address P4K_EXP are recalculated. I.e. the current LBA address and P4K address are taken as lba_start and p4k_start, and Count is set to 1.
In S7, the formula lba_exp=lba_start+count 4KB is used to recalculate the lba_exp, and the formula p4k_exp=p4k_start+count 4KB is used to recalculate the p4k_exp prediction address.
Illustrating: when both logical blocks and physical blocks are consecutive, for example, 100 logical blocks and physical blocks, one piece of data can be recorded using the LBA start address and the P4K start address and the number of consecutive blocks. The number of records which originally needed 100 records is reduced to 1 record.
The invention reduces the data volume of the L2P increment table, improves the capacity of single record, effectively reduces the erasing times of Nand Flash, and reduces the occupation of the L2P increment table on the Nand Flash space and the SSD service life loss caused by the erasing by combining continuous logic and physical blocks.
The L2P increment table is in the format of 10Bytes, and the expression is LBA (4B) +P4K (4B) +count (2B); the number of recordable bars is 13107, and the expression is 128 KB/10b=13107; the maximum recording capacity of a single table is 3276.7GB, the expression is 13107 x4 KB/x count=3276.7GB, and the Count is 65536; the single table recording capacity is minimum 51.199MB, the expression is 13107 x4 KB/=51.199mb, count 1; the number of increment tables needed by the whole disk is 750002 at most, and the expression is 3,840,000 MB/51.199 MB= 750002; the number of increment tables needed by the whole disk is at most 2, and the expression is 3,840,000MB/3276.7 GB=2; the NAND space occupied is in the range of 256KB-9375MB.
Example 2
Fig. 6 is a structural diagram of an L2P table incremental data compression system, and as shown in fig. 6, the present invention further provides an L2P table incremental data compression system, which includes:
the LBA address and P4K address obtaining module 101 is configured to obtain, from a higher module, an LBA address lba_current to be written and a corresponding P4K address p4k_current;
the LBA prediction address and P4K prediction address obtaining module 102 is configured to obtain last record data of the L2P delta table and LBA prediction addresses lba_exp and p4k prediction addresses p4k_exp;
a first judging module 103, configured to judge whether the last record of the current L2P incremental table is invalid;
the LBA prediction address and P4K prediction address recalculation module 104 is configured to newly add an L2P increment record when the last record in the current L2P increment table is invalid, and recalculate LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
a second determining module 105, configured to determine whether lba_current= lba_exp and p4k_current= p4k_exp when the last record of the CURRENT L2P increment table is valid;
an updating module 106 for updating the last count of the L2P increment table when lba_current= lba_exp and p4k_current= p4k_exp;
at LBA_CURRENT-! =lba_exp or p4k_current-! When=p4k_exp, the LBA predicted address and P4K predicted address recalculation module is returned.
The LBA prediction address and P4K prediction address obtaining module 102 specifically includes:
the LBA prediction address and P4K prediction address acquisition module is used for acquiring the last record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP by using pointers.
The LBA prediction address and P4K prediction address recalculation module 104 specifically includes:
the LBA prediction address recalculation unit is used for recalculating LBA_EXP by adopting a formula LBA_EXP=LBA_START+Count 4 KB;
and the P4K prediction address recalculation unit is used for recalculating the P4K_EXP prediction address by adopting the formula P4K_EXP=P4K_START+Count 4 KB.
The L2P increment table is in the format of 10Bytes, and the expression is LBA (4B) +P4K (4B) +count (2B); the number of recordable bars is 13107, and the expression is 128 KB/10b=13107; the maximum recording capacity of a single table is 3276.7GB, the expression is 13107 x4 KB/x count=3276.7GB, and the Count is 65536; the single table recording capacity is minimum 51.199MB, the expression is 13107 x4 KB/bar=51.199mb, and count is 1; the number of increment tables needed by the whole disk is 750002 at most, and the expression is 3,840,000 MB/51.199 MB= 750002; the number of the increment tables needed by the whole disk is at most 2, and the expression is 3,840,000MB/3276.7 GB=2; the NAND space occupied is in the range of 256KB-9375MB.
Example 3
The calculation of parameters, space occupation and compression effect used in the compression algorithm of the present invention will be described by calculating the fixed bit 128KB of the L2P delta table, which is 3,840,000MB, which is 3.84T SSD.
1. The traditional mode is as follows: the L2P increment table is in the form of LBA (4B) +P4K (4B) 8Bytes
The number of recordable bars is: 128 KB/8b=16384 (stripe)
The single table recording capacity is: 16384 x4 KB/bar=64 MB
Number of incremental tables required for the whole disc: 3,840,000 MB/64 mb=60000 (individual)
The NAND space occupied is: 60000 128 KB/each = 7500MB
2. Using the compression algorithm of the present invention: the L2P increment table is in the format of LBA (4B) +P4K (4B) +count (2B), 10Bytes in total
The number of recordable bars is: 128 KB/10b=13107 (stripe)
The maximum single table recording capacity (Count 65536) is: 13107 x4 KB/x Count (65536) = 3276.7GB
The minimum single table recording capacity (Count 1) is: 13107 x4 KB/bar = 51.199MB
The number of increment tables needed by the whole disc is the most: 3,840,000 MB/51.199 mb= 750002 (in number)
The number of increment tables needed by the whole disc is the most: 3,840,000MB/3276.7 gb=2 (in number)
The occupied NAND space is in the range of: 256KB-9375MB
3. Considering actual use, block writing is often required, taking write-once 1MB of data as an example.
A: the conventional approach requires the use of an incremental table entry number of 256 entries. Single table capacity: after 64MB, namely, each time 64MB of data is written, the 128KB increment table just runs out, and Nand Flash needs to be written once.
B: the method of the invention requires the use of 1 incremental bar. Single table capacity: the L2P increment table of 128KB is fully written after 12.8GB, namely 12.8GB of data is written, and Nand Flash is required to be written once at the moment.
C: taking the data volume corresponding to one table of the algorithm of the invention as an example, the capacity density of the single table is 12.8GB/64 MB=204 times of that of the traditional method. The Nand Flash erasing times are reduced by 204-1=203 times. The number of L2P incremental tables required for the entire disk at this time is 3840000 MB/12.8gb=300.
Therefore, the method reduces the data volume of the L2P increment table, improves the capacity of a single record, effectively reduces the erasing times of the NandFlash, and reduces the occupation of the L2P increment table to the Nand Flash space and the SSD service life loss caused by the erasing by combining continuous logic blocks and physical blocks.
Example 4
The present embodiment provides an electronic device including a memory for storing a computer program and a processor that runs the computer program to cause the electronic device to execute the L2P table delta data compression method of embodiment 1.
Alternatively, the electronic device may be a server.
In addition, the embodiment of the present invention also provides a computer readable storage medium storing a computer program, where the computer program when executed by a processor implements the L2P table incremental data compression method of embodiment 1.
Embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (8)

1. The L2P table incremental data compression method is characterized by comprising the following steps of:
s1: obtaining LBA address LBA_CURRENT to be written and a corresponding P4K address P4K_CURRENT from an upper module;
s2: acquiring the last piece of record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
s3: judging whether the last record of the current L2P increment table is invalid or not;
s4: if yes, an L2P increment record is newly added, and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP are recalculated;
s5: if not, judging whether LBA_CURRENT= LBA_EXP and P4K_CURRENT= P4K_EXP;
s6: if yes, the LBA and the P4K address are continuously maintained on the basis of the last processing, the merging condition is met, and the last count of the L2P increment table is updated;
s7: if not, at least one of the LBA and the P4K addresses is not continuous, the merging condition is not met, an L2P table increment record is newly added, and the LBA predicted address LBA_EXP and the P4K predicted address P4K_EXP are recalculated.
2. The method for compressing incremental data in an L2P table according to claim 1, wherein the step of obtaining the last record data in the L2P incremental table and the LBA prediction addresses lba_exp and p4k_exp specifically includes:
the pointer is used to obtain the last piece of record data of the L2P increment table and LBA predicted addresses LBA_EXP and P4K predicted addresses P4K_EXP.
3. The method for compressing incremental data of an L2P table according to claim 1, wherein said recalculating LBA prediction address lba_exp and p4k prediction address p4k_exp specifically comprises:
recalculating lba_exp using the formula lba_exp=lba_start+count 4 KB;
the p4k_exp prediction address is recalculated using the formula p4k_exp=p4k_start+count 4 KB.
4. The method for compressing incremental data of an L2P table according to claim 1, wherein the L2P incremental table is in the form of 10Bytes and the expression is LBA (4B) +p4k (4B) +count (2B); the number of recordable bars is 13107, and the expression is 128 KB/10b=13107; the maximum recording capacity of a single table is 3276.7GB, the expression is 13107 x4 KB/x count=3276.7GB, and the Count is 65536; the single table recording capacity is minimum 51.199MB, the expression is 13107 x4 KB/bar=51.199mb, and count is 1; the number of increment tables needed by the whole disk is 750002 at most, and the expression is 3,840,000 MB/51.199 MB= 750002; the number of increment tables needed by the whole disk is at most 2, and the expression is 3,840,000MB/3276.7 GB=2; the NAND space occupied is in the range of 256KB-9375MB.
5. An L2P table delta data compression system, the L2P table delta data compression system comprising:
the LBA address and P4K address acquisition module is used for acquiring an LBA address LBA_CURRENT to be written and a corresponding P4K address P4K_CURRENT from the upper module;
the LBA prediction address and P4K prediction address acquisition module is used for acquiring the last record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
the first judging module is used for judging whether the last record of the current L2P increment table is invalid or not;
the LBA prediction address and P4K prediction address recalculation module is used for adding an L2P increment record when the last record of the current L2P increment table is invalid, and recalculating LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP;
the second judging module is used for judging whether the LBA_CURRENT= LBA_EXP and the P4K_CURRENT= P4K_EXP are valid when the last record of the CURRENT L2P increment table is valid;
the last count updating module of the L2P increment table is configured to update the last count of the L2P increment table when lba_current= lba_exp and p4k_current= p4k_exp;
at LBA_CURRENT-! =lba_exp or p4k_current-! When=p4k_exp, the LBA predicted address and P4K predicted address recalculation module is returned.
6. The system of claim 5, wherein the LBA prediction address and P4K prediction address acquisition module specifically comprises:
the LBA prediction address and P4K prediction address acquisition module is used for acquiring the last record data of the L2P increment table and LBA prediction addresses LBA_EXP and P4K prediction addresses P4K_EXP by using pointers.
7. The system of claim 5, wherein the LBA-predicted address and P4K-predicted address recalculation module comprises:
the LBA prediction address recalculation unit is used for recalculating LBA_EXP by adopting a formula LBA_EXP=LBA_START+Count 4 KB;
and the P4K prediction address recalculation unit is used for recalculating the P4K_EXP prediction address by adopting the formula P4K_EXP=P4K_START+Count 4 KB.
8. The L2P table delta data compression system of claim 5, wherein the L2P delta table is in the form of 10Bytes expressed as LBA (4B) +p4k (4B) +count (2B); the number of recordable bars is 13107, and the expression is 128 KB/10b=13107; the maximum recording capacity of a single table is 3276.7GB, the expression is 13107 x4 KB/x count=3276.7GB, and the Count is 65536; the single table recording capacity is minimum 51.199MB, the expression is 13107 x4 KB/bar=51.199mb, and count is 1; the number of increment tables needed by the whole disk is 750002 at most, and the expression is 3,840,000 MB/51.199 MB= 750002; the number of increment tables needed by the whole disk is at most 2, and the expression is 3,840,000MB/3276.7 GB=2; the NAND space occupied is in the range of 256KB-9375MB.
CN202311244552.2A 2023-09-26 2023-09-26 L2P table incremental data compression method and system Active CN116991757B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311244552.2A CN116991757B (en) 2023-09-26 2023-09-26 L2P table incremental data compression method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311244552.2A CN116991757B (en) 2023-09-26 2023-09-26 L2P table incremental data compression method and system

Publications (2)

Publication Number Publication Date
CN116991757A CN116991757A (en) 2023-11-03
CN116991757B true CN116991757B (en) 2023-12-15

Family

ID=88534091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311244552.2A Active CN116991757B (en) 2023-09-26 2023-09-26 L2P table incremental data compression method and system

Country Status (1)

Country Link
CN (1) CN116991757B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445721A (en) * 2019-08-29 2021-03-05 美光科技公司 Enhanced efficiency obfuscated logical-to-physical mapping management
CN112631950A (en) * 2020-12-11 2021-04-09 苏州浪潮智能科技有限公司 L2P table saving method, system, device and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924631B2 (en) * 2011-09-15 2014-12-30 Sandisk Technologies Inc. Method and system for random write unalignment handling
US9383927B2 (en) * 2014-05-28 2016-07-05 SandDisk Technologies LLC Method and system for creating a mapping table cache from an interleaved subset of contiguous mapping data for a storage device
US10209897B2 (en) * 2016-12-01 2019-02-19 Toshiba Memory Corporation Storage device and control method of the same
TWI737189B (en) * 2019-02-23 2021-08-21 國立清華大學 Method for facilitating recovery from crash of solid-state storage device, computer system, and solid-state storage device
JP2024503956A (en) * 2021-12-21 2024-01-30 長江存儲科技有限責任公司 System and method for defragmentation of memory devices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445721A (en) * 2019-08-29 2021-03-05 美光科技公司 Enhanced efficiency obfuscated logical-to-physical mapping management
CN112631950A (en) * 2020-12-11 2021-04-09 苏州浪潮智能科技有限公司 L2P table saving method, system, device and medium

Also Published As

Publication number Publication date
CN116991757A (en) 2023-11-03

Similar Documents

Publication Publication Date Title
US10915475B2 (en) Methods and apparatus for variable size logical page management based on hot and cold data
US10067881B2 (en) Compression and caching for logical-to-physical storage address mapping tables
CN109240938B (en) Memory system and control method for controlling nonvolatile memory
JP6016137B2 (en) Solid state drive and method of operation thereof
US9477596B2 (en) LBA bitmap usage
JP5571691B2 (en) Maintaining mapping address tables in storage
US9229876B2 (en) Method and system for dynamic compression of address tables in a memory
CN105718530B (en) File storage system and file storage control method thereof
US10884630B2 (en) Storage system
US9792069B2 (en) Offline deduplication for solid-state storage devices
US20130275660A1 (en) Managing trim operations in a flash memory system
US20090228679A1 (en) Mapping management methods and systems
US10162561B2 (en) Managing backup of logical-to-physical translation information to control boot-time and write amplification
KR20100115090A (en) Buffer-aware garbage collection technique for nand flash memory-based storage systems
WO2016203612A1 (en) Storage apparatus
JP2019179455A (en) Storage device and computer system
CN106354658A (en) Method for reducing memory resource occupation of mapping tables in hybrid mapping algorithm
CN108073359B (en) Operation method of data storage device
EP2264602A1 (en) Memory device for managing the recovery of a non volatile memory
KR101077901B1 (en) Apparatus and method for managing flash memory using log block level mapping algorithm
CN116991757B (en) L2P table incremental data compression method and system
KR101020781B1 (en) A method for log management in flash memory-based database systems
CN114185492A (en) Solid state disk garbage recycling algorithm based on reinforcement learning
CN113703671B (en) Data block erasing method and related device
CN108334276A (en) The dynamic alignment data method of fast flash memory bank

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