IP Library › Granted Patent US 11,809,312
Granted Patent B2
US 11,809,312 · App. 17/206,137 · Granted Nov 7, 2023

Garbage collection operation management based on overall spare area

Inventor: Tzu-Yi Yang (Hsinchu County, TW)
Assignee: Silicon Motion, Inc.
G06F12/0253G06F12/0246G06F2212/7205
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,809,312
App. No.
17/206,137
Granted
Nov 7, 2023
Kind
B2
Abstract

A method of managing a garbage collection (GC) operation on a flash memory includes: calculating an overall spare area in a flash memory, which includes a spare area in a plurality of spare blocks in the flash memory and at least two of a spare area in one or more target blocks corresponding to writing of user data based on host write commands, a spare area in one or more destination blocks corresponding to writing of valid data based on the GC operation and a spare area in a source block corresponding to reading of valid data based on the GC operation; determining an adjustment factor according to the overall spare area; and performing the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor.

Claims (62)

1. A method of managing a garbage collection (GC) operation on a flash memory, comprising:

calculating an overall spare area in a flash memory, which includes a spare area in a plurality of spare blocks in the flash memory and at least two of: a spare area in one or more target blocks to which user data of host write commands is being written, a spare area in one or more destination blocks to which valid data of the GC operation is being written and a spare area in a source block from which valid data of the GC operation is being read; wherein the overall spare area indicates spare areas in both erased blocks and non-erased blocks;

determining an adjustment factor according to the overall spare area; and

performing the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor, wherein the adjustment factor and a size of the overall spare area have a negative correlation.

2. The method claim 1 , wherein the step of calculating the overall spare area in the flash memory comprises:

calculating the spare area in the source block according to a ratio of a data amount of data in the source block that has been copied to a destination block based on the GC operation to a valid page percentage of the source block.

3. The method claim 1 , wherein the step of calculating the overall spare area in a flash memory comprises:

calculating the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more target blocks and the spare area in the one or more destination blocks;

calculating the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more target blocks, the spare area in the one or more destination blocks and the spare area in the source block;

calculating the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more destination blocks and the spare area in the source block; or

calculating the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more target blocks and the spare area in the source block.

4. The method of claim 1 , wherein the step of performing GC operation comprises:

calculating the GC-to-host base ratio according to a valid page percentage of the source block;

determining a GC-to-host write ratio according to a product of the GC-to-host base ratio and the adjustment factor, where the GC-to-host write ratio indicates a ratio of a write amount of valid data based on the GC operation to a write amount of user data based on host write commands; and

performing writing of valid data based on the GC operation according to the GC-to-host write ratio, while performing writing of user data based on the host write commands.

5. A method of managing a garbage collection (GC) operation on a flash memory, comprising:

calculating an overall spare area in a flash memory according to a spare area in a plurality of spare blocks in the flash memory and a spare area in one or more target blocks to which user data of host write commands is being written; wherein the overall spare area indicates spare areas in both erased blocks and non-erased blocks;

determining an adjustment factor according to the overall spare area; and

performing the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor, wherein the adjustment factor and a size of the overall spare area have a negative correlation.

6. A controller for use in a flash memory to control the flash memory and manage a garbage collection (GC) operation on the flash memory, comprising:

a storage unit, arranged to store information and program codes;

a processing unit, operable to execute the program codes to be arranged to:

calculate an overall spare area in a flash memory, which includes a spare area in a plurality of spare blocks in the flash memory and at least two of: a spare area in one or more target blocks to which user data of host write commands is being written, a spare area in one or more destination blocks to which valid data of the GC operation is being written and a spare area in a source block from which valid data of the GC operation is being read; wherein the overall spare area indicates spare areas in both erased blocks and non-erased blocks;

determine an adjustment factor according to the overall spare area; and

perform the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor, wherein the adjustment factor and a size of the overall spare area have a negative correlation.

7. The controller claim 6 , wherein processing unit is arranged to:

calculate the spare area in the source block according to a ratio of a data amount of data in the source block that has been copied to a destination block based on the GC operation to a valid page percentage of the source block.

8. The controller claim 6 , wherein processing unit is arranged to:

calculate the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more target blocks and the spare area in the one or more destination blocks;

calculate the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more target blocks, the spare area in the one or more destination blocks and the spare area in the source block;

calculate the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more destination blocks and the spare area in the source block; or

calculate the overall spare area according to a summation of the spare area in the spare blocks, the spare area in the one or more target blocks and the spare area in the source block.

9. The controller of claim 6 , wherein processing unit is arranged to:

calculate the GC-to-host base ratio according to a valid page percentage of the source block;

determine a GC-to-host write ratio according to a product of the GC-to-host base ratio and the adjustment factor, where the GC-to-host write ratio indicates a ratio of a write amount of valid data based on the GC operation to a write amount of user data based on host write commands; and

perform writing of valid data based on the GC operation according to the GC-to-host write ratio, while performing writing of user data based on the host write commands.

10. A controller for use in a flash memory to control the flash memory and manage a garbage collection (GC) operation on the flash memory, comprising, comprising:

a storage unit, arranged to store information and program codes;

a processing unit, operable to execute the program codes to be arranged to:

calculate an overall spare area in a flash memory according to a spare area in a plurality of spare blocks in the flash memory and a spare area in one or more target blocks to which user data of host write commands is being written; wherein the overall spare area indicates spare areas in both erased blocks and non-erased blocks;

determine an adjustment factor according to the overall spare area; and

perform the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor, wherein the adjustment factor and a size of the overall spare area have a negative correlation.

11. The controller claim 10 , wherein processing unit is arranged to:

calculate the spare area in the source block according to a ratio of a data amount of data in the source block that has been copied to a destination block based on the GC operation to a valid page percentage of the source block.

12. The controller claim 10 , wherein processing unit is arranged to:

calculate the overall spare area according to a summation of the spare area in the spare blocks in the flash memory and the spare area in the one or more target blocks corresponding to writing of user data based on host write commands.

13. The controller of claim 10 , wherein processing unit is arranged to:

calculate the GC-to-host base ratio according to a valid page percentage of the source block;

determine a GC-to-host write ratio according to a product of the GC-to-host base ratio and the adjustment factor, where the GC-to-host write ratio indicates a ratio of a write amount of valid data based on the GC operation to a write amount of user data based on host write commands; and

perform writing of valid data based on the GC operation according to the GC-to-host write ratio, while performing writing of user data based on the host write commands.

14. A storage system, comprising:

a flash memory; and

a controller for controlling the flash memory and managing a garbage collection (GC) operation on the flash memory, the controller arranged to:

calculate an overall spare area in a flash memory, which includes a spare area in a plurality of spare blocks in the flash memory and at least two of: a spare area in one or more target blocks to which user data of host write commands is being written, a spare area in one or more destination blocks to which valid data of the GC operation is being written and a spare area in a source block from which valid data of the GC operation is being read; wherein the overall spare area indicates spare areas in both erased blocks and non-erased blocks;

determine an adjustment factor according to the overall spare area; and

perform the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor, wherein the adjustment factor and a size of the overall spare area have a negative correlation.

15. A storage system, comprising:

a flash memory; and

a controller for controlling the flash memory and managing a garbage collection (GC) operation on the flash memory, the controller arranged to:

calculate an overall spare area in a flash memory according to a spare area in a plurality of spare blocks in the flash memory and a spare area in one or more target blocks to which user data of host write commands is being written; wherein the overall spare area indicates spare areas in both erased blocks and non-erased blocks;

determine an adjustment factor according to the overall spare area; and

perform the GC operation on the source block according to a GC-to-host base ratio and the adjustment factor, wherein the adjustment factor and a size of the overall spare area have a negative correlation.

Continuity (2)
Continuation 17179342 · Feb 18, 2021
Related Publication 20220261343A1 · Aug 18, 2022
Cited By (1)
US 12,693,971