CN106844229B - Organization method, system and device of solid state disk firmware mapping table - Google Patents

Organization method, system and device of solid state disk firmware mapping table Download PDF

Info

Publication number
CN106844229B
CN106844229B CN201710011569.1A CN201710011569A CN106844229B CN 106844229 B CN106844229 B CN 106844229B CN 201710011569 A CN201710011569 A CN 201710011569A CN 106844229 B CN106844229 B CN 106844229B
Authority
CN
China
Prior art keywords
sector
logic
mapping table
logical
page
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
CN201710011569.1A
Other languages
Chinese (zh)
Other versions
CN106844229A (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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent 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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201710011569.1A priority Critical patent/CN106844229B/en
Publication of CN106844229A publication Critical patent/CN106844229A/en
Application granted granted Critical
Publication of CN106844229B publication Critical patent/CN106844229B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension

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 (AREA)

Abstract

The invention relates to the field of computer flash memory storage, in particular to a method, a system and a device for organizing a mapping table in a solid-state disk. In order to achieve the purpose, the invention is realized by the following technical scheme: the invention provides an organization method of a firmware mapping table of a solid state disk, which comprises the following steps: organizing a plurality of physical pages into logical pages; splitting each logical sector into a plurality of small units; organizing an address mapping table of a logical sector; and establishing a position conversion matrix of the logic sector.

Description

Organization method, system and device of solid state disk firmware mapping table
Technical Field
The invention relates to the field of computer flash memory storage, in particular to a method, a system and a device for organizing a mapping table in a solid-state disk.
Background
With the development of technologies such as internet, cloud computing, internet of things and the like, solid state disks are widely used as a new generation of storage. The storage medium 2D NAND Flash has gradually become the past, and 3D NAND has been developed, in NAND Flash, data reading and writing are performed in units of pages, data erasing is performed in units of blocks, sector is a basic unit of Flash operation, and due to the characteristics of Flash, a storage signal can only be changed from 1 to 0, so that new writing must be erased again, and erasing operation is performed in units of sector. The 3D NAND requires a higher error correction capability. More error correction capability requires more check Data, with user Data (Data sectors such as 4K) and check Data grouped together into one or more ECC chunks stored sequentially. A Data Sector is generally stored in a physical page and is easy to read out at one time during reading, and an excessively large Data Sector causes that an integral multiple of Data sectors cannot be stored in the physical page of a NAND flash. The remaining space is wasted because the entire Data Sector is not stored.
In order to improve space utilization rate and error correction capability, a Data Sector is split into a plurality of fine-grained ECC chunks, and a physical page can store a plurality of integral-time ECC chunks conveniently. And simultaneously combining a plurality of physical pages into one logical page for use. From the logical page perspective, the number of Data sectors stored is calculated. Thus, the space wasted by each physical page is reduced. Without splitting the Data Sector into multiple fine-grained ECC chunks, it is possible that 1K of space is wasted per physical page. With this approach, 1K of space may be wasted by one logical page. Thus, the effects of improving the error correction capability and fully utilizing the space are achieved. The usage of one Data Sector across two pages requires additional metadata to describe which two physical pages the Data sectors of the cross-page are respectively located in, and what the forward and backward offsets are. If each Data Sector needs a copy of metadata to describe, the metadata becomes more, a larger memory is needed to describe each Data Sector, and the memory occupancy and the memory amount under the no-page-crossing mode are increased by about one fourth.
This results in increased cost per disk, and in addition, there is a proportional relationship between the maximum capacity of the disk and the capacity of the memory on the disk. The occupation of the extra metadata can reduce the available memory of the mapping table and the disk capacity.
In order to fully utilize the method for storing Data sectors across pages without increasing metadata, the following mapping table organization method is proposed.
Disclosure of Invention
In view of this, the method, system and device for organizing a mapping table in a solid-state disk provided by the present method, by organizing a plurality of physical pages as a whole and splitting a logical sector into a plurality of small units to store in a logical page, make full use of the space utilization in the physical page, and improve the error correction capability at the same time.
In order to achieve the purpose, the invention is realized by the following technical scheme:
the invention provides an organization method of a firmware mapping table of a solid state disk, which comprises the following steps:
organizing a plurality of physical pages into logical pages;
splitting each logical sector into a plurality of small units;
organizing an address mapping table of a logical sector;
and establishing a position conversion matrix of the logic sector.
Wherein, split every logic sector into a plurality of cell, include:
each logical sector is split into a number of small units of fixed size.
Wherein, organizing the address mapping table of the logical sector includes:
and establishing a mapping relation from the logic sector to the logic page, and generating an address mapping table.
The establishing of the mapping relationship from the logical sector to the logical page and the generation of the address mapping table include:
the logical page number and the logical sector number in the logical page are recorded in the address mapping table.
Further, after organizing the address mapping table of the logical sector, the method further includes:
and storing the logic sector into a logic page according to the address mapping table.
Further, establishing a position transformation matrix of the logic sector, including:
and establishing a position conversion matrix of the logic sector according to the corresponding relation between the logic sector and the physical page.
The invention also provides an organization system of the solid state disk firmware mapping table, which comprises a plurality of physical pages, an address mapping table, a position conversion matrix and a logic sector, wherein: the method comprises the steps that a plurality of physical pages are organized into a logical page, and each logical sector is divided into a plurality of small units and stored in the logical page; and generating an address mapping table according to the corresponding relation between the logic sector and the logic page, and generating a position conversion matrix according to the corresponding relation between the logic sector and the physical page.
Wherein the logical sector is split into a plurality of fixed-size small units.
The address mapping table comprises a logical page number and the number of a logical sector in a logical page; preferably, the position conversion matrix records the position information of all logical sectors in the physical page.
The invention also provides an organizing device of the firmware mapping table of the solid state disk, which is characterized by comprising the following components:
the logical page organization module is used for organizing a plurality of physical pages into a logical page;
the logic sector splitting module is used for splitting each logic sector into a plurality of small units;
the address mapping table creating module is used for generating an address mapping table according to the corresponding relation between the logic sector and the logic page;
and the position conversion matrix creating module is used for generating a position conversion matrix according to the corresponding relation between the logic sector and the physical page.
The invention provides an organization method of a firmware mapping table of a solid state disk, which has the following beneficial effects:
1. the invention organizes a plurality of physical pages into an integral logical page, and divides each logical sector into a plurality of ECC chunks to be stored in the logical page, when determining the size of the ECC chunks, an integral multiple of the ECC chunks are stored in one physical page as much as possible, under the condition, a plurality of ECC chunks belong to one logical sector, but are stored in different physical pages respectively, because the size of the ECC chunks is far smaller than that of the logical sectors, the space in the physical pages is fully utilized;
2. in the prior art, a logic Sector needs additional metadata to describe which two physical pages the logic Sector of the page crossing is respectively located in, and the forward and backward offsets are what, if each logic Sector needs a copy of metadata to describe, the metadata becomes more, a larger memory is needed to describe each logic Sector, and the memory occupancy and the memory capacity under the no-page-crossing mode are increased by about one fourth; the method comprises the steps of establishing a mapping relation from a logic sector to a logic page, generating an address mapping table, recording a logic page number and the logic sector number in the logic page in the address mapping table, and establishing a position conversion matrix of the logic sector according to the corresponding relation between the logic sector and a physical page, wherein the conversion from a logic address LBA to a PBA can be realized by using only one common conversion matrix without adding metadata information for each sector;
3. if the error correction capability is modified, the ECC chunk size will change, and the information in the conversion matrix only needs to be updated to switch to a new mapping mode.
The beneficial effects of the organization system and the device of the solid state disk firmware mapping table are similar to the organization method of the solid state disk firmware mapping table, and are not described again.
Description of the drawings:
fig. 1 is a schematic flowchart of an organization system of a firmware mapping table of a solid state disk according to an embodiment of the present invention;
fig. 2 is a block diagram of an organization system of a firmware mapping table of a solid state disk according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an organization apparatus for a firmware mapping table of a solid state disk according to an embodiment of the present invention;
the specific implementation mode is as follows:
for ease of understanding, some of the terms appearing in the present invention are explained below:
the solid state disk uses a 3D NAND Flash as a storage medium, data reading and writing are carried out by taking a page as a unit in the NAND Flash, data erasing is carried out by taking a block as a unit, and sector is a basic unit operated in the NAND Flash, wherein the page is a page, the block is a block, and the sector is a sector or a magnetic area.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an organization method of a firmware mapping table of a solid state disk, which comprises the following steps:
organizing a plurality of physical pages into logical pages;
splitting each logical sector into a plurality of small units;
organizing an address mapping table of a logical sector;
and establishing a position conversion matrix of the logic sector.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an organization system of a firmware mapping table of a solid state disk according to an embodiment of the present invention; the embodiment provides an organization method of a firmware mapping table of a solid state disk, which comprises the following steps:
step S101, a plurality of physical pages are organized into a logical page;
in this embodiment, a plurality of physical pages are combined into one logical page for use, and the number of sectors stored in the logical page is calculated, so that the wasted space of each physical page is reduced, and on average, each physical page is wasted by only 1K space.
Step S102, dividing each logic sector into a plurality of small units;
in the present embodiment, each logical sector is split into a plurality of small units of fixed size. Because the logical sector needs to be stored across physical pages, the logical sector is split to realize the storage across physical pages, meanwhile, the size of the logical sector is generally the same, the logical sector is split into small units with fixed sizes, that is, the sizes of the small units split by all the logical sectors are the same, at this time, the small units of the logical sector are sequentially stored in the logical pages according to the size of the physical pages, and the arrangement condition of each small unit of the logical sector in the logical pages can be obtained only by simple calculation, so that an address mapping table between the logical sector and the physical pages and the logical pages is generated.
As an implementation manner, the logic sector may be split into a plurality of check data ECC chunks, so as to implement the error correction capability of the 3D NAND Flash, where the ECC chunks are equal in size. When the error correction capability is modified, only the size of the ECC chunk needs to be modified.
Step S103, organizing an address mapping table of the logic sector;
in this embodiment, a mapping relationship from a logical sector to a logical page is established, and an address mapping table is generated; the logical page number and the logical sector number in the logical page are recorded in the address mapping table.
Step S104, storing the logic sector into a logic page according to an address mapping table;
step S105, establishing a position conversion matrix of the logic sector;
wherein, the matrix needs to include the following information: 1) whether sector spans two physical pages; 2) which 1 or 2 physical pages of a logical page the sector is in; 3) how much space the sector occupies inside the two physical pages respectively; 4) sector is the starting address inside two physical pages.
In an original mapping table organization method, a management sector converts from a logical address (LBA) to a NAND physical address (PBA), when a user writes data, firmware searches for an idle block through a rear-end NAND management module, writes the data into a corresponding physical block, then changes mapping information, and points the LBA to the written PBA; when reading data, the corresponding PBA is found through the LBA value input by the user, and then the data on the NAND is taken out and returned to the user. In the traditional mapping table organization mode, the mapping relation is expressed by the length of 32-bit, and different bits express the bit domain information which can be positioned to a specific physical sector. In this embodiment, the conversion from the LBA to the PBA can be achieved by using the position conversion matrix, metadata does not need to be added to each sector, and when a sector is written, the sector is addressed according to a logical page, and the logical sectors are placed on the logical page in sequence. For example, in the logical page shown in fig. 2, sector 3, sector 6, sector7 appear across physical pages. According to the mapping relation from the logical sector to the logical page and the position conversion matrix, the specific position information and the length of the sector 3, the sector 6 and the sector7 in the logical page can be quickly positioned, so that the specific positions of the sector 3, the sector 6 and the sector7 in the physical page are obtained. The whole firmware only needs to establish a public position conversion matrix, and the public position conversion matrix is used when the internal logic Sector of the logic page is converted into the physical address.
As an embodiment, if there are different error correction capability requirements in a firmware or system, one or more switching matrices may be set to meet the requirements.
The embodiment of the present invention further provides an organization system for a firmware mapping table of a solid state disk, including a plurality of physical pages, an address mapping table, a position translation matrix, and a logic sector, where: the method comprises the steps that a plurality of physical pages are organized into a logical page, and each logical sector is divided into a plurality of small units and stored in the logical page; and generating an address mapping table according to the corresponding relation between the logic sector and the logic page, and generating a position conversion matrix according to the corresponding relation between the logic sector and the physical page.
Referring to fig. 2, fig. 2 is a frame diagram of an organization system of a firmware mapping table of a solid state disk according to an embodiment of the present invention; the embodiment provides an organization system of a firmware mapping table of a solid state disk, which includes a plurality of physical pages, an address mapping table, a position translation matrix and a logic sector, wherein: the method comprises the steps that a plurality of physical pages are organized into a logical page, and each logical sector is divided into a plurality of small units and stored in the logical page; and generating an address mapping table according to the corresponding relation between the logic sector and the logic page, and generating a position conversion matrix according to the corresponding relation between the logic sector and the physical page.
Wherein the logical sector is split into a plurality of fixed-size small units.
The address mapping table comprises a logical page number and the number of a logical sector in a logical page; preferably, the position conversion matrix records the position information of all logical sectors in the physical page.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an organizing apparatus of a firmware mapping table of a solid state disk according to an embodiment of the invention; the embodiment provides an organizing apparatus for a firmware mapping table of a solid state disk, comprising:
a logical page organizing module 301 configured to organize a plurality of physical pages into one logical page;
a logical sector splitting module 302 configured to split each logical sector into a plurality of small units;
an address mapping table creating module 303, configured to generate an address mapping table according to a correspondence between a logical sector and a logical page;
and a location transformation matrix creating module 304, configured to generate a location transformation matrix according to the corresponding relationship between the logical sector and the physical page.
The above description is only an exemplary embodiment of the present invention, and should not be taken as limiting the scope of the present invention, and any equivalent changes and modifications made by those skilled in the art without departing from the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for organizing a firmware mapping table of a solid state disk is characterized by comprising the following steps:
organizing a plurality of physical pages into logical pages;
splitting each logical sector into a plurality of small units;
organizing an address mapping table of a logical sector;
establishing a position conversion matrix of a logic sector;
an address mapping table for organizing logical sectors, comprising:
establishing a mapping relation from a logic sector to a logic page, and generating an address mapping table;
establishing a position conversion matrix of the logic sector, comprising:
establishing a position conversion matrix of the logic sector according to the corresponding relation between the logic sector and the physical page; and the position conversion matrix is used for realizing the conversion from the logic address LBA to the PBA, addressing is carried out according to the logic pages when the sector is written, and the logic sectors are uniformly placed on the logic pages in sequence.
2. The method of organizing the firmware mapping table of the solid state disk according to claim 1, wherein splitting each logical sector into a plurality of small units comprises:
each logical sector is split into a number of small units of fixed size.
3. The method for organizing the firmware mapping table of the solid state disk according to claim 1, wherein the step of creating a mapping relationship from a logical sector to a logical page to generate an address mapping table comprises:
the logical page number and the logical sector number in the logical page are recorded in the address mapping table.
4. The method for organizing the firmware mapping table of the solid state disk according to claim 1, wherein after organizing the address mapping table of the logical sector, the method further comprises:
and storing the small unit of the logic sector into a logic page according to the address mapping table.
5. The system for organizing the firmware mapping table of the solid state disk is characterized by comprising a plurality of physical pages, an address mapping table, a position conversion matrix and a logic sector, wherein: the method comprises the steps that a plurality of physical pages are organized into a logical page, and each logical sector is divided into a plurality of small units and stored in the logical page; generating an address mapping table according to the corresponding relation between the logic sector and the logic page, and generating a position conversion matrix according to the corresponding relation between the logic sector and the physical page; and the position conversion matrix is used for realizing the conversion from the logic address LBA to the PBA, addressing is carried out according to the logic pages when the sector is written, and the logic sectors are uniformly placed on the logic pages in sequence.
6. The system of organizing solid state disk firmware mapping tables of claim 5, wherein the logical sector is split into a plurality of fixed-size small units.
7. The system for organizing the firmware mapping tables of the solid state disk according to claim 5, wherein the address mapping table comprises a number of a logical page and a number of a logical sector in the logical page; preferably, the position conversion matrix records the position information of all logical sectors in the physical page.
8. An organization device of a firmware mapping table of a solid state disk, comprising:
the logical page organization module is used for organizing a plurality of physical pages into a logical page;
the logic sector splitting module is used for splitting each logic sector into a plurality of small units;
the address mapping table creating module is used for generating an address mapping table according to the corresponding relation between the logic sector and the logic page;
the position conversion matrix creating module is used for generating a position conversion matrix according to the corresponding relation between the logic sector and the physical page; and the position conversion matrix is used for realizing the conversion from the logic address LBA to the PBA, addressing is carried out according to the logic pages when the sector is written, and the logic sectors are uniformly placed on the logic pages in sequence.
CN201710011569.1A 2017-01-07 2017-01-07 Organization method, system and device of solid state disk firmware mapping table Active CN106844229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710011569.1A CN106844229B (en) 2017-01-07 2017-01-07 Organization method, system and device of solid state disk firmware mapping table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710011569.1A CN106844229B (en) 2017-01-07 2017-01-07 Organization method, system and device of solid state disk firmware mapping table

Publications (2)

Publication Number Publication Date
CN106844229A CN106844229A (en) 2017-06-13
CN106844229B true CN106844229B (en) 2020-01-03

Family

ID=59117378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710011569.1A Active CN106844229B (en) 2017-01-07 2017-01-07 Organization method, system and device of solid state disk firmware mapping table

Country Status (1)

Country Link
CN (1) CN106844229B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110390969B (en) * 2019-06-28 2021-03-09 苏州浪潮智能科技有限公司 Method and system for realizing atomic writing
CN110287131B (en) * 2019-07-01 2021-08-20 潍柴动力股份有限公司 Memory management method and device
CN114415972B (en) * 2022-03-28 2022-07-15 北京得瑞领新科技有限公司 Data processing method and device of SSD, storage medium and SSD device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727976A (en) * 2008-10-15 2010-06-09 晶天电子(深圳)有限公司 Multi-layer flash-memory device, a solid hard disk and a truncation non-volatile memory system
CN102880553A (en) * 2012-09-18 2013-01-16 武汉虹信通信技术有限责任公司 Read-write method of off-chip flash file system based on micro control unit (MCU)
CN105103234A (en) * 2012-11-20 2015-11-25 查尔斯·I·派德尔 Solid state drive architectures

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10013177B2 (en) * 2015-04-20 2018-07-03 Hewlett Packard Enterprise Development Lp Low write amplification in solid state drive

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727976A (en) * 2008-10-15 2010-06-09 晶天电子(深圳)有限公司 Multi-layer flash-memory device, a solid hard disk and a truncation non-volatile memory system
CN102880553A (en) * 2012-09-18 2013-01-16 武汉虹信通信技术有限责任公司 Read-write method of off-chip flash file system based on micro control unit (MCU)
CN105103234A (en) * 2012-11-20 2015-11-25 查尔斯·I·派德尔 Solid state drive architectures

Also Published As

Publication number Publication date
CN106844229A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
US10067684B2 (en) File access method and apparatus, and storage device
US10303599B2 (en) Memory system executing garbage collection
US10761977B2 (en) Memory system and non-transitory computer readable recording medium
US9298384B2 (en) Method and device for storing data in a flash memory using address mapping for supporting various block sizes
US8516219B2 (en) Index cache tree
KR101554084B1 (en) Logical address translation
US8341336B2 (en) Region-based management method of non-volatile memory
TWI494761B (en) Method of partitioning physical block and memory system thereof
US9891825B2 (en) Memory system of increasing and decreasing first user capacity that is smaller than a second physical capacity
TWI385517B (en) Storage device and data management method
US11200159B2 (en) System and method for facilitating efficient utilization of NAND flash memory
US20170206170A1 (en) Reducing a size of a logical to physical data address translation table
JP2013544414A (en) Transaction log restore
US11868246B2 (en) Memory system and non-transitory computer readable recording medium
CN106844229B (en) Organization method, system and device of solid state disk firmware mapping table
KR20210003946A (en) Logical-physical data structure
CN109976664A (en) The daily record data tissue of solid storage device
US20230281118A1 (en) Memory system and non-transitory computer readable recording medium
KR20210028729A (en) Logical vs. physical table fragments
CN114036079B (en) Mapping table compression method and system, memory controller, solid state disk and data reading method
Rizvi et al. Data storage framework on flash memory based SSD RAID 0 for performance oriented applications
CN111949222A (en) Method for data migration in garbage recovery in full-flash disk array
CN110515562A (en) A kind of disk access method and device
US11113205B2 (en) Die addressing using a reduced size translation table entry
CN110096452A (en) Non-volatile random access memory and its providing method

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
TA01 Transfer of patent application right

Effective date of registration: 20191204

Address after: 215000 Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: Suzhou Wave Intelligent Technology Co., Ltd.

Address before: 450000 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: Zhengzhou Yunhai Information Technology Co. Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant