# US 2025/0147880 A1 · Memory controller performing garbage collection, memory system, method, and storage medium thereof

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

- Number: US 2025/0147880 A1
- Document ID: US20250147880A1
- Status: Published application
- Kind: A1
- Application number: 18/537,193
- Filed: 2023-12-12
- Published: 2025-05-08
- Earliest claimed: 2023-11-03
- Assignees: Yangtze Memory Technologies Co., Ltd.
- Applicants: Yangtze Memory Technologies Co., Ltd.
- Inventors: Ruiyang Zhang; Qi Hu; Youxin He
- Web page: https://patentgrep.com/patent/US20250147880A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In certain aspects, a method for operating a memory controller is disclosed. The method includes determining a total used amount of a user data storage space of a memory device. The method also includes determining whether a garbage collection (GC) triggering condition is satisfied based on the total used amount of the user data storage space. The method further includes determining whether to perform a GC process on the memory device based on whether the GC triggering condition is satisfied.

## Claims

### Claim 1

A method for operating a memory controller, comprising:
determining a total number of used data blocks in a user data storage space of a memory device;
determining a total number of expected-used data blocks in the user data storage space:
determining whether a garbage collection (GC) triggering condition is satisfied at least based on whether the total number of used data blocks is greater than the total number of expected-used data blocks; and
determining whether to perform a GC process on the memory device based on whether the GC triggering condition is satisfied.

### Claim at position 2

2-3. (canceled)

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the total number of the used data blocks comprises a total number of virtual blocks in the user data storage space that are already used; and
the total number of the expected-used data blocks comprises a total number of virtual blocks in the user data storage space that are expected to be used.

### Claim 5

(canceled)

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
responsive to the total number of the used data blocks being greater than the total number of the expected-used data blocks, determining that the GC triggering condition is satisfied; or
responsive to the total number of the used data blocks being smaller than or equal to the total number of the expected-used data blocks, determining that the GC triggering condition is not satisfied.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining whether the GC triggering condition is satisfied further comprises:
determining valid page counts (VPCs) associated with the used data blocks in the user data storage space, respectively; and
determining whether a minimum VPC from the VPCs is not greater than a VPC threshold.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
responsive to the total number of the used data blocks being greater than the total number of the expected-used data blocks and the minimum VPC being not greater than the VPC threshold, determining that the GC triggering condition is satisfied; or
responsive to the total number of the used data blocks being not greater than the total number of the expected-used data blocks or the minimum VPC being greater than the VPC threshold, determining that the GC triggering condition is not satisfied.

### Claim 9 (depends on 1)

The method of claim 1, wherein determining the total number of the expected-used data blocks comprises:
determining a degree of logical saturation for the memory device to be a ratio between a total size of valid data in the user data storage space and a size of the user data storage space; and
determining the total number of the expected-used data blocks based on the degree of logical saturation.

### Claim 10 (depends on 9)

The method of claim 9, wherein the total size of the valid data in the user data storage space comprises a total number of valid pages in the user data storage space.

### Claim 11 (depends on 9)

The method of claim 9, wherein determining the total number of the expected-used data blocks based on the degree of logical saturation comprises:
responsive to the degree of logical saturation being not greater than a first saturation threshold, determining the total number of the expected-used data blocks to be a predetermined fixed value.

### Claim 12 (depends on 11)

The method of claim 11, wherein determining the total number of the expected-used data blocks based on the degree of logical saturation further comprises:
responsive to the degree of logical saturation being not smaller than a second saturation threshold, determining the total number of the expected-used data blocks to be a first saturation variable having a linear relationship with the degree of logical saturation.

### Claim 13 (depends on 12)

The method of claim 12, wherein determining the total number of the expected-used data blocks based on the degree of logical saturation further comprises:
responsive to the degree of logical saturation being greater than the first saturation threshold and being smaller than the second saturation threshold,
determining a first value of the first saturation variable when the degree of logical saturation is equal to the second saturation threshold;
determining a second saturation variable having a nonlinear relationship with the degree of logical saturation; and
determining the total number of the expected-used data blocks to be a minimum of the first value of the first saturation variable and the second saturation variable.

### Claim 14 (depends on 1)

The method of claim 1, wherein the GC process is a background GC process, and determining whether to perform the GC process on the memory device comprises:
responsive to the GC triggering condition being satisfied, performing the GC process on the memory device by:
determining valid page counts (VPCs) associated with the used data blocks in the user data storage space, respectively;
selecting, from the used data blocks, a first data block having a minimum VPC among the VPCs;
generating and sending a read command to instruct the memory device to read out data stored in a set of valid pages from the first data block;
receiving the data stored in the set of valid pages from the first data block of the memory device; and
generating and sending a program command to instruct the memory device to program the data stored in the set of valid pages to a second data block in the user data storage space.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
generating and sending an erase command to instruct the memory device to erase data stored in the first data block; and
updating the total number of the used data blocks.

### Claim 16 (depends on 14)

The method of claim 14, further comprising:
determining whether a GC termination condition is satisfied; and
responsive to the GC termination condition being satisfied, terminating the GC process.

### Claim 17 (depends on 16)

The method of claim 16, wherein determining whether the GC termination condition is satisfied comprises:
determining whether the total number of the used data blocks is smaller than or equal to the total number of the expected-used data blocks; and
responsive to the total number of the used data blocks being smaller than or equal to the total number of the expected-used data blocks, determining that the GC termination condition is satisfied.

### Claim 18 (depends on 16)

The method of claim 16, wherein determining whether the GC termination condition is satisfied comprises:
determining valid page counts (VPCs) associated with the used data blocks in the user data storage space, respectively;
determining whether a minimum VPC from the VPCs is greater than a VPC threshold; and
responsive to the minimum VPC being greater than the VPC threshold, determining that the GC termination condition is satisfied.

### Claim 19

A memory controller, comprising:
a memory configured to store instructions; and
a processor coupled to the memory and configured to execute the instructions to perform a process comprising:
determining a total number of used data blocks in a user data storage space of a memory device;
determining a total number of expected-used data blocks in the user data storage space:
determining whether a garbage collection (GC) triggering condition is satisfied at least based on whether the total number of used data blocks is greater than the total number of expected-used data blocks; and
determining whether to perform a GC process on the memory device based on whether the GC triggering condition is satisfied.

### Claim 20

A memory system, comprising:
a memory device; and
a memory controller operatively coupled to the memory device and configured to:
determine a total number of used data blocks in a user data storage space of the memory device;
determine a total number of expected-used data blocks in the user data storage space:
determine whether a garbage collection (GC) triggering condition is satisfied at least based on whether the total number of used data blocks is greater than the total number of expected-used data blocks; and
determine whether to perform a GC process on the memory device based on whether the GC triggering condition is satisfied.

### Claim 21 (depends on 19)

The memory controller of claim 19, wherein the process further comprises:
responsive to the total number of the used data blocks being greater than the total number of the expected-used data blocks, determining that the GC triggering condition is satisfied; or
responsive to the total number of the used data blocks being smaller than or equal to the total number of the expected-used data blocks, determining that the GC triggering condition is not satisfied.

### Claim 22 (depends on 19)

The memory controller of claim 19, wherein determining whether the GC triggering condition is satisfied further comprises:
determining valid page counts (VPCs) associated with the used data blocks in the user data storage space, respectively; and
determining whether a minimum VPC from the VPCs is not greater than a VPC threshold.

### Claim 23 (depends on 22)

The memory controller of claim 22, wherein the process further comprises:
responsive to the total number of the used data blocks being greater than the total number of the expected-used data blocks and the minimum VPC being not greater than the VPC threshold, determining that the GC triggering condition is satisfied; or
responsive to the total number of the used data blocks being not greater than the total number of the expected-used data blocks or the minimum VPC being greater than the VPC threshold, determining that the GC triggering condition is not satisfied.
