CN109446109B - Method for hybrid recording entity mapping table - Google Patents

Method for hybrid recording entity mapping table Download PDF

Info

Publication number
CN109446109B
CN109446109B CN201811253542.4A CN201811253542A CN109446109B CN 109446109 B CN109446109 B CN 109446109B CN 201811253542 A CN201811253542 A CN 201811253542A CN 109446109 B CN109446109 B CN 109446109B
Authority
CN
China
Prior art keywords
mapping table
page
flash memory
entity mapping
flash
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
CN201811253542.4A
Other languages
Chinese (zh)
Other versions
CN109446109A (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.)
Jiangsu Huacun Electronic Technology Co Ltd
Original Assignee
Jiangsu Huacun Electronic 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 Jiangsu Huacun Electronic Technology Co Ltd filed Critical Jiangsu Huacun Electronic Technology Co Ltd
Priority to CN201811253542.4A priority Critical patent/CN109446109B/en
Priority to PCT/CN2018/115516 priority patent/WO2020082455A1/en
Publication of CN109446109A publication Critical patent/CN109446109A/en
Application granted granted Critical
Publication of CN109446109B publication Critical patent/CN109446109B/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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for recording a physical mapping table in a mixed mode, which comprises the following steps: the method comprises the following steps: based on the space relation of the static random access memory, the entity mapping table is stored according to the size of the static random access memory; step two: recording the entity mapping unit of each flash memory page by taking each 4 bytes as a unit; step three: recording the entity mapping unit of each flash memory page in sequence until the space of the static random access memory is fully written; step four: when the requirement of the static random access memory is met, the user data and the entity mapping table are mixed into a flash memory page and are written into the flash memory block together.

Description

Method for hybrid recording entity mapping table
Technical Field
The invention relates to the technical field of hybrid recording entity mapping tables in a storage system, in particular to a method for hybrid recording entity mapping tables.
Background
Flash memory is a long-lived, non-volatile memory, data erasure is not in individual byte units but in fixed block units, the block size is typically 256KB to 20MB, flash memory is a variant of electrically erasable read-only memory (EEPROM), which, unlike EEPROM, can be erased and rewritten on a byte level rather than an entire chip, and most of the chips of flash memory require block erasure. Flash memory is commonly used to store setup information, such as BIOS (basic program) of a computer, PDA (personal digital assistant), digital camera, etc., because it can still store data when it is powered off.
In conventional flash memory storage systems, a Physical to Logical Table (Physical to Logical Table) of each flash memory page is stored in the remaining space (Meta data) of the entire flash memory page. When garbage collection is needed or the mapping table needs to be rebuilt after normal power failure, each page is read out in sequence and compared with the entity mapping table, and whether the flash memory page is a valid flash memory page or not can be obtained. In addition, the entity mapping table can also be arranged as a flash memory page to be stored in the last flash memory page of each flash memory block. Therefore, an improved technique for solving the problem in the prior art is needed to compare the valid page with the physical mapping table.
Disclosure of Invention
The present invention provides a method for recording a mixed physical mapping table, i.e. a method for combining user data with a physical mapping table and recording the user data in the same flash memory page, which not only can effectively use the space of the flash memory page, but also can reduce the number of times of writing in the flash memory page to achieve high-speed writing efficiency, and effectively use the flash memory space to solve the problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme: a method of hybrid recording a physical map table, comprising the steps of:
the method comprises the following steps: based on the space relation of the static random access memory, the entity mapping table is stored according to the size of the static random access memory;
step two: recording the entity mapping unit of each flash memory page by taking each 4 bytes as a unit;
step three: recording the entity mapping unit of each flash memory page in sequence until the space of the static random access memory is fully written;
step four: when the requirement of the static random access memory is met, the user data and the entity mapping table are mixed into a flash memory page and are written into the flash memory block.
Preferably, in the first step, the sram comprises a transistor, and the state of the sram is maintained until a change signal is received.
Preferably, in the first step, the address of the physical mapping table flash memory page is obtained by calculating the size of the random access memory.
Preferably, in the second step, a plurality of entity image units are recorded in the flash memory page.
Preferably, in the fourth step, each flash block stores a plurality of different physical mapping tables based on the size of the sram.
Compared with the prior art, the invention has the beneficial effects that:
a method for combining user data with entity mapping table and recording them in same flash memory page not only can effectively use the space of flash memory page, but also can reduce the times of writing in flash memory page so as to attain the high-speed writing efficiency and effectively use flash memory space.
Drawings
FIG. 1 is a schematic structural diagram of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Referring to fig. 1, the present invention provides a technical solution: a method of hybrid recording a physical map table, comprising the steps of:
the method comprises the following steps: based on the space relation of the static random access memory, the entity mapping table is stored according to the size of the static random access memory;
step two: recording the entity mapping unit of each flash memory page by taking each 4 bytes as a unit;
step three: recording the entity mapping unit of each flash memory page in sequence until the space of the static random access memory is fully written;
step four: when the requirement of the static random access memory is met, the user data and the entity mapping table are mixed into a flash memory page and are written into the flash memory block.
In addition, the minimum writing unit of the flash memory can be also planned as the addressing static random access memory space, and the unit of 4K, 8K or 16K is taken as the maximum space of the entity mapping table.
The address of the physical mapping table flash memory page is obtained by calculating the size of the random access memory. The calculation method is that the size of the random access memory has n1In the case of (1), one entity image unit is recorded every 4 bytes, however, one flash page can record n2A physical mapping unit, finally, calculating the address of the physical mapping table of the hybrid flash memory page,the address of the flash page where the entity mapping table is located can be obtained.
The formula is as follows: entity mapping table address = n1 / 4 / n2 & ( i - j )
Wherein:
i is the space of flash memory page
j is the random access memory space
Each flash block stores a number of distinct physical mapping tables based on the size of the SRAM.
In one embodiment, a flash memory with a capacity of 1GB is prepared, each flash page is 512 bytes in size, wherein flash page 1 stores 64 bytes of user data, flash page 2 stores 128 bytes of user data, and flash page 3 stores 256 bytes of user data, and then the entity mapping table is filled in every 4 bytes unit, wherein 448 bytes (112) of the entity mapping table are filled in flash page 1, 384 bytes (112) of the entity mapping table are filled in flash page 2, and 256 bytes (64) of the entity mapping table are filled in flash page 3, and the three-page write time is shortened by 45 μ s compared with the conventional write time.
In the second embodiment, a flash memory with a capacity of 1GB is prepared, each flash page has a size of 256 bytes, wherein flash page 1 stores 32 bytes of user data, flash page 2 stores 64 bytes of user data, and flash page 3 stores 128 bytes of user data, and then the entity mapping table is filled in every 4 bytes unit, wherein 224 bytes (56) of the entity mapping table are filled in flash page 1, 192 bytes (48) of the entity mapping table are filled in flash page 2, and 128 bytes (32) of the entity mapping table are filled in flash page 3, and the three-page write time is shortened by 30 μ s compared with the conventional write time.
In a third embodiment, a flash memory with a capacity of 512MB is prepared, each flash page has a size of 128 bytes, wherein flash page 1 stores 16 bytes of user data, flash page 2 stores 32 bytes of user data, and flash page 3 stores 64 bytes of user data, and then the entity mapping table is filled in every 4 bytes unit, wherein 112 bytes (28) of the entity mapping table are dropped into flash page 1, 96 bytes (24) of the entity mapping table are dropped into flash page 2, and 64 bytes (16) of the entity mapping table are dropped into flash page 3, and the three-page write time is shortened by 24 μ s compared with the conventional write time.
In the fourth embodiment, a flash memory with a capacity of 256MB is prepared, each flash page has a size of 64 bytes, wherein flash page 1 stores 8 bytes of user data, flash page 2 stores 16 bytes of user data, and flash page 3 stores 32 bytes of user data, and then the entity mapping table is filled in every 4 bytes unit, wherein 56 bytes (14) of the entity mapping table are dropped into flash page 1, 48 bytes (12) of the entity mapping table are dropped into flash page 2, and 32 bytes (8) of the entity mapping table are dropped into flash page 3, and the three-page write time is shortened by 15 μ s compared with the conventional write time.
In the fifth embodiment, a flash memory with a capacity of 128MB is prepared, each flash page has a size of 64 bytes, wherein flash page 1 stores 8 bytes of user data, flash page 2 stores 16 bytes of user data, and flash page 3 stores 32 bytes of user data, and then the entity mapping table is filled in every 4 bytes unit, wherein 56 bytes (14) of the entity mapping table are dropped into flash page 1, 48 bytes (12) of the entity mapping table are dropped into flash page 2, and 32 bytes (8) of the entity mapping table are dropped into flash page 3, and the three-page write time is shortened by 12 μ s compared with the conventional write time.
According to the first to fifth embodiments, the method of the present invention improves the write performance compared to the conventional method.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (5)

1. A method of hybrid recording a physical mapping table, comprising: the method comprises the following steps:
the method comprises the following steps: based on the space relation of the static random access memory, the entity mapping table is stored according to the size of the static random access memory;
step two: recording the entity mapping unit of each flash memory page by taking each 4 bytes as a unit;
step three: recording the entity mapping unit of each flash memory page in sequence until the space of the static random access memory is fully written;
step four: when the requirement of the static random access memory is met, the user data and the entity mapping table are mixed into a flash memory page and are written into the flash memory block.
2. The method of claim 1, wherein the method further comprises: in the first step, the sram is composed of transistors, and the state of the sram is maintained until a change signal is received.
3. The method of claim 1, wherein the method further comprises: in the first step, the address of the flash memory page of the physical mapping table is obtained by calculating the size of the random access memory.
4. The method of claim 1, wherein the method further comprises: in the second step, a plurality of entity mapping units are recorded in the flash memory page.
5. The method of claim 1, wherein the method further comprises: in the fourth step, each flash block stores a plurality of different physical mapping tables based on the size of the sram.
CN201811253542.4A 2018-10-25 2018-10-25 Method for hybrid recording entity mapping table Active CN109446109B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811253542.4A CN109446109B (en) 2018-10-25 2018-10-25 Method for hybrid recording entity mapping table
PCT/CN2018/115516 WO2020082455A1 (en) 2018-10-25 2018-11-14 Hybrid recording method for logical-to-physical mapping table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811253542.4A CN109446109B (en) 2018-10-25 2018-10-25 Method for hybrid recording entity mapping table

Publications (2)

Publication Number Publication Date
CN109446109A CN109446109A (en) 2019-03-08
CN109446109B true CN109446109B (en) 2021-06-29

Family

ID=65548447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811253542.4A Active CN109446109B (en) 2018-10-25 2018-10-25 Method for hybrid recording entity mapping table

Country Status (2)

Country Link
CN (1) CN109446109B (en)
WO (1) WO2020082455A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970669A (en) * 2013-02-06 2014-08-06 Lsi公司 Method for accelerating physical-to-logic address mapping of recycling operation in solid-state equipment
CN104750615A (en) * 2013-12-26 2015-07-01 慧荣科技股份有限公司 Data storage device and flash memory control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI417884B (en) * 2009-04-23 2013-12-01 Phison Electronics Corp Data accessing method for flash memory and storage system and controller using the same
US8364931B2 (en) * 2009-06-29 2013-01-29 Mediatek Inc. Memory system and mapping methods using a random write page mapping table
TWI570559B (en) * 2015-12-28 2017-02-11 點序科技股份有限公司 Flash memory and accessing method thereof
CN107832013B (en) * 2017-11-03 2019-10-25 中国科学技术大学 A method of management solid-state hard disc mapping table
CN108681509B (en) * 2018-04-20 2022-04-08 江苏华存电子科技有限公司 Method for quickly establishing flash memory mapping table

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970669A (en) * 2013-02-06 2014-08-06 Lsi公司 Method for accelerating physical-to-logic address mapping of recycling operation in solid-state equipment
CN104750615A (en) * 2013-12-26 2015-07-01 慧荣科技股份有限公司 Data storage device and flash memory control method

Also Published As

Publication number Publication date
CN109446109A (en) 2019-03-08
WO2020082455A1 (en) 2020-04-30

Similar Documents

Publication Publication Date Title
US11416391B2 (en) Garbage collection
US9645895B2 (en) Data storage device and flash memory control method
US11232041B2 (en) Memory addressing
US8046526B2 (en) Wear leveling method and controller using the same
US8407397B2 (en) Block management method for flash memory and controller and storage system using the same
US9304904B2 (en) Hierarchical flash translation layer
US8180955B2 (en) Computing systems and methods for managing flash memory device
CN109977034B (en) Data storage device and non-volatile memory operation method
US20120166709A1 (en) File system of flash memory
US20140129758A1 (en) Wear leveling in flash memory devices with trim commands
US8341336B2 (en) Region-based management method of non-volatile memory
US20090089484A1 (en) Data protection method for power failure and controller using the same
US8090900B2 (en) Storage device and data management method
US20170206170A1 (en) Reducing a size of a logical to physical data address translation table
US8127072B2 (en) Data storage device and method for accessing flash memory
CN102214143A (en) Method and device for managing multilayer unit flash memory, and storage equipment
US11733895B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
US20090132757A1 (en) Storage system for improving efficiency in accessing flash memory and method for the same
US8429339B2 (en) Storage device utilizing free pages in compressed blocks
US11809328B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
KR20090034135A (en) Flash memory mapping management method
CN102543184B (en) Memorizer memory devices, its Memory Controller and method for writing data
CN109446109B (en) Method for hybrid recording entity mapping table
US11113205B2 (en) Die addressing using a reduced size translation table entry
CN115525605A (en) Transmission system and method of file system

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