# US 2020/0272332 A1 · Data storage device and control method for non-volatile memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0272332 A1
- Document ID: US20200272332A1
- Status: Published application
- Kind: A1
- Application number: 16/747,109
- Filed: 2020-01-20
- Published: 2020-08-27
- Earliest claimed: 2019-02-26
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Bo-Yan JHAN
- Web page: https://patentgrep.com/patent/US20200272332A1

## CPC

- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/064: {Management of blocks}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0658: {Controller construction arrangements}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A high-performance data storage device is disclosed, including a non-volatile memory, a controller, and a temporary storage. Sub mapping tables divided from a logical-to-physical address mapping table according to logical address groups are stored in mapping blocks allocated in the non-volatile memory. The controller limits the number of mapping blocks by garbage collection, and performs garbage collection on a source mapping block in sections. During each garbage collection section, the controller downloads valid sub mapping tables from the source mapping block to the temporary storage and then programs the valid sub mapping tables from the temporary storage to a destination mapping block. The temporary storage is repeatedly used to store valid sub mapping tables downloaded in the different garbage collection sections.

## Claims

### Claim 1

A data storage device, comprising:
a non-volatile memory, storing a plurality of sub mapping tables; and
a controller and a temporary storage,
wherein:
the sub mapping tables are divided from a logical-to-physical address mapping table according to logical address groups;
the controller sets an upper limit, x, for a total number of mapping blocks allocated in the non-volatile memory to store the plurality of sub mapping tables;
the controller performs garbage collection on a source mapping block in sections wherein the source mapping block is selected from the mapping blocks;
during each garbage collection section, the controller downloads valid sub mapping tables from the source mapping block to the temporary storage and then programs the valid sub mapping tables from the temporary storage to a destination mapping block which is planned as one of the mapping blocks; and
the temporary storage is repeatedly used to store valid sub mapping tables downloaded in the different garbage collection sections.

### Claim 2 (depends on 1)

The data storage device as claimed in claim 1, wherein:
the controller selects the source mapping block from the mapping blocks when the total number of mapping blocks reaches a critical amount, a; and
the controller sets a total section number, y, based on the upper limit, x, and the critical amount, a, to divide the garbage collection of the source mapping block into y sections.

### Claim 3 (depends on 2)

The data storage device as claimed in claim 2, wherein:
the controller sets the total section number, y, to (x−a)+1.

### Claim 4 (depends on 2)

The data storage device as claimed in claim 2, wherein:
based on a valid count, VC, and the total section number, y, the controller calculates an amount, M, to determine the number of valid sub mapping tables to be collected per garbage collection section;
the valid count, VC, is a total number of valid sub mapping tables of the source mapping block; and
the amount, M, is VC/y.

### Claim 5 (depends on 4)

The data storage device as claimed in claim 4, wherein:
when the amount, M, is not greater than an upper limit, z, the controller collects M valid sub mapping tables per garbage collection section; and
when the amount, M, is greater than the upper limit, z, the controller collects z valid sub mapping tables per garbage collection section.

### Claim 6 (depends on 5)

The data storage device as claimed in claim 5, wherein:
the upper limit, z, is (Total_G/x)y, where Total_G is a total number of logical address groups.

### Claim 7 (depends on 1)

The data storage device as claimed in claim 1, wherein:
after programming a first batch of valid sub mapping tables corresponding to a first garbage collection section to the destination mapping block and prior to downloading a second batch of valid sub mapping tables corresponding to a second garbage collection section to the temporary storage, the controller responds to a request from a host.

### Claim 8 (depends on 7)

The data storage device as claimed in claim 7, wherein:
for a target sub mapping table of garbage collection, the controller checks whether a newer version is stored in the temporary storage to avoid programming old sub mapping tables to the destination block.

### Claim 9 (depends on 1)

The data storage device as claimed in claim 1, wherein:
the controller establishes a mapping block list to point to the mapping blocks; and
from the mapping block list, the controller gets the total number of mapping blocks.

### Claim 10 (depends on 9)

The data storage device as claimed in claim 9, wherein:
physical blocks released by the garbage collection are listed in the mapping block list.

### Claim 11

A control method for a non-volatile memory, comprising:
storing a plurality of sub mapping tables in the non-volatile memory, wherein the sub mapping tables are divided front a logical-to-physical address mapping table according to logical address groups;
setting an upper limit, x, for the total number of mapping blocks allocated in the non-volatile memory to store the plurality of sub mapping tables;
performing garbage collection on a source mapping block in sections, wherein the source mapping block is selected from the mapping blocks; and
during each garbage collection section, downloading valid sub mapping tables from the source mapping block to the temporary storage and then programming the valid sub mapping tables from the temporary storage to a destination mapping block which is planned as one of the mapping blocks,
wherein the temporary storage is repeatedly used to store valid sub mapping tables downloaded in the different garbage collection sections.

### Claim 12 (depends on 11)

The control method as claimed in claim 11, further comprising:
selecting the source mapping block from the mapping blocks when the total number of mapping blocks reaches a critical amount, a; and
setting a total section number, y, based on the upper limit, x, and the critical amount, a, to divide the garbage collection of the source mapping block into y sections.

### Claim 13 (depends on 12)

The control method as claimed in claim 12, further comprising:
setting the total section number, y, to (x−a)+1.

### Claim 14 (depends on 12)

The control method as claimed in claim 12, further comprising:
calculating an amount, M, based on a valid count, VC, and the total section number, y, wherein the amount, M, is calculated to determine the number of valid sub mapping tables to be collected per garbage collection section;
wherein:
the valid count, VC, is the total number of valid sub mapping tables of the source mapping block; and
the amount, M, is VC/y.

### Claim 15 (depends on 14)

The control method as claimed in claim 14, further comprising:
collecting M valid sub mapping tables per garbage collection section when the amount, M, is not greater than an upper limit, z; and
collecting z valid sub mapping tables per garbage collection section when the amount, M, is greater than the upper limit, z.

### Claim 16 (depends on 15)

The control method as claimed in claim 15, wherein:
the upper limit, z, is (Total_G/x)/y, where Total_G is the total number of logical address groups.

### Claim 17 (depends on 11)

The control method as claimed in claim 11, further comprising:
responding to a request from a host after programming a first batch of valid sub mapping tables corresponding to a first garbage collection section to the destination mapping block and prior to downloading a second batch of valid sub mapping tables corresponding to a second garbage collection section to the temporary storage.

### Claim 18 (depends on 17)

The control method as claimed in claim 17, further comprising:
for a target sub mapping table of garbage collection, checking whether a newer version is stored in the temporary storage to avoid programming old sub mapping tables to the destination block.

### Claim 19 (depends on 11)

The control method as claimed in claim 11, further comprising:
establishing a mapping block list to point to the mapping blocks,
wherein the mapping block list further shows the total number of mapping blocks.

### Claim 20 (depends on 19)

The control method as claimed in claim 19, wherein:
physical blocks released by the garbage collection are listed in the mapping block list.
