IP Library › Granted Patent US 11,494,299
Granted Patent B2
US 11,494,299 · App. 17/179,342 · Granted Nov 8, 2022

Garbage collection operation management with early garbage collection starting point

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,494,299
App. No.
17/179,342
Granted
Nov 8, 2022
Kind
B2
Abstract

A method of managing a garbage collection (GC) operation on a flash memory includes: setting a GC starting threshold, wherein the GC starting threshold indicates a predetermined spare block number that is higher than a target spare block number of spare blocks maintained by a flash translation layer (FTL) of the flash memory; determining whether to start the GC operation according to a current number of spare blocks in the flash memory and the GC starting threshold; and performing the GC operation on a source block in the flash memory when the current number of spare blocks is lower than or equal to the GC starting threshold.

Claims (30)

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

setting a GC starting threshold, wherein the GC starting threshold indicates a predetermined spare block number that is higher than a target spare block number of spare blocks maintained by a flash translation layer (FTL) of the flash memory;

determining whether to start the GC operation according to a current number of spare blocks in the flash memory and the GC starting threshold; and

performing the GC operation on a source block in the flash memory when the current number of spare blocks is lower than or equal to the GC starting threshold, comprising:

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

determining an adjustment factor according to the current number of spare blocks;

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;

wherein the adjustment factor is set as zero or set to be a value between zero and one if the current number of spare blocks in the flash memory is equal to the GC starting threshold; and the adjustment factor is set as one if the current number of spare blocks in the flash memory is equal to the target spare block number.

2. The method of claim 1 , wherein the adjustment factor and the current number of spare blocks have a negative correlation.

3. The method of claim 1 , further comprising:

setting a GC ending threshold that is higher than the GC starting threshold; and

ending the GC operation if the current number of spare blocks in the flash memory is higher than the GC ending threshold.

4. The method of claim 3 , wherein the adjustment factor is set as zero if the current number of spare blocks in the flash memory is equal to the GC ending threshold; the adjustment factor is set to be between zero and one if the current number of spare blocks in the flash memory is equal to the GC starting threshold; and the adjustment factor is set as one if the current number of spare blocks in the flash memory is equal to the target spare block number.

5. 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

a processing unit, arranged to execute program codes and information stored in the flash memory or in the storage unit so as to perform following operations of:

setting a GC starting threshold, wherein the GC starting threshold indicates a predetermined spare block number that is higher than a target spare block number of spare blocks that is maintained by a flash translation layer (FTL) of the flash memory;

determining whether to start the GC operation according to a current number of spare blocks in the flash memory and the GC starting threshold; and

performing the GC operation on a source block in the flash memory when the current number of spare blocks is lower than or equal to the GC starting threshold; and the processing unit performs operations of:

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

determining an adjustment factor according to the current number of spare blocks;

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;

wherein the adjustment factor is set as zero or set to be a value between zero and one if the current number of spare blocks in the flash memory is equal to the GC starting threshold; and the adjustment factor is set as one if the current number of spare blocks in the flash memory is equal to the target spare block number.

6. The controller of claim 5 , wherein the adjustment factor and the current number of spare blocks have a negative correlation.

7. The controller of claim 5 , further comprising:

setting a GC ending threshold that is higher than the GC starting threshold; and

ending the GC operation if the current number of spare blocks in the flash memory is higher than the GC ending threshold.

8. The controller of claim 7 , wherein the adjustment factor is set as zero if the current number of spare blocks in the flash memory is equal to the GC ending threshold; the adjustment factor is set to be between zero and one if the current number of spare blocks in the flash memory is equal to the GC starting threshold; and the adjustment factor is set as one if the current number of spare blocks in the flash memory is equal to the target spare block number.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 18, 2021
From: YANG, TZU-YI
To: SILICON MOTION, INC.
Reel/Frame 055326/0342 →
Continuity (1)
Related Publication 20220261342A1 · Aug 18, 2022