# US 2020/0394133 A1 · Dynamically modifying garbage collection rates for a memory subsystem in a closed-loop system

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

- Number: US 2020/0394133 A1
- Document ID: US20200394133A1
- Status: Published application
- Kind: A1
- Application number: 16/438,355
- Filed: 2019-06-11
- Published: 2020-12-17
- Earliest claimed: 2019-06-11
- Assignees: Micron Technology, Inc.
- Applicants: Micron Technology, Inc.
- Inventors: Chris Carpenter
- Web page: https://patentgrep.com/patent/US20200394133A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0644: {Management of space entities, e.g. partitions, extents, pools}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 2212/1016: Performance improvement
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7208: Multiple device management, e.g. distributing data over multiple flash devices
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In a closed-loop garbage collection system a comparator receives a first target time indicating when a first superblock of memory is expected to be filled based on a first write rate for a first write cursor writing data units into the first superblock. The comparator further receives a negative loop feedback based on one or more elements from the garbage collection process. The comparator determines a first garbage collection rate based on the first target time and the negative loop feedback, where the first garbage collection rate is calculated to provide a free empty superblock to the first write cursor within a range of time of the first target time. The comparator sends instructions to a garbage collection manager to perform a garbage collection process at the first garbage collection rate, wherein an outcome of the garbage collection process is incorporated into the negative loop feedback sent to the comparator.

## Claims

### Claim 1

A method comprising:
receiving, at a comparator in a closed-loop garbage collection system, a first target time, the first target time indicating when a first superblock of memory is expected to be filled based on a first write rate for a first write cursor writing data units into the first superblock;
receiving, at the comparator, a negative loop feedback;
determining, by the comparator, a first garbage collection rate based on the first target time and the negative loop feedback, the first garbage collection rate calculated to provide a free empty superblock to the first write cursor within a range of time of the first target time; and
sending instructions to a garbage collection manager to perform a garbage collection process at the first garbage collection rate, wherein an outcome of the garbage collection process is incorporated into the negative loop feedback sent to the comparator.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving, by the comparator from a write cursor collision detector, an indication that a second target time is within a collision range of the first target time, the second target time indicating when a second superblock is expected to be filled based on a second write rate for a second write cursor writing data units into the second superblock; and
modifying the first garbage collection rate to a second garbage collection rate based on the first target time and the second target time to provide a first empty superblock to the first write cursor prior to the first target time and a second empty superblock to the second write cursor prior to the second target time.

### Claim 3 (depends on 1)

The method of claim 1, wherein the negative loop feedback includes an integrated value of a difference between a number of free empty superblocks generated based on the first garbage collection rate and a number of required free empty superblocks.

### Claim 4 (depends on 1)

The method of claim 1, wherein the negative loop feedback includes an adjustable empty superblock delivery time indicating a first amount of time prior to the first target time to deliver the free empty superblock to the first write cursor, and wherein the adjustable empty superblock delivery time includes a second amount of time to erase the data units from a first garbage collection superblock to produce the free empty superblock.

### Claim 5 (depends on 1)

The method of claim 1, where determining the first garbage collection rate based on the first target time and the negative loop feedback further comprises:
calculating a raw garbage collection rate; and
sending the raw garbage collection rate through a loop filter to generate the first garbage collection rate.

### Claim 6 (depends on 1)

The method of claim 1, wherein the negative loop feedback includes a count of a number of valid data units in a first garbage collection superblock selected for the garbage collection process.

### Claim 7 (depends on 6)

The method of claim 6, wherein the first garbage collection superblock is selected for the garbage collection process from a pipeline of garbage collection superblocks.

### Claim 8

A non-transitory computer-readable medium storing instructions, which when executed by a processing device, cause the processing device to:
receive, at a comparator in a closed-loop garbage collection system, a first target time, the first target time indicating when a first superblock of memory is expected to be filled based on a first write rate for a first write cursor writing data units into the first superblock;
receive, at the comparator, a negative loop feedback;
determine, by the comparator, a first garbage collection rate based on the first target time and the negative loop feedback, the first garbage collection rate calculated to provide a free empty superblock to the first write cursor within a range of time of the first target time; and
send instructions to a garbage collection manager to perform a garbage collection process at the first garbage collection rate, wherein an outcome of the garbage collection process is incorporated into the negative loop feedback sent to the comparator.

### Claim 9 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the instructions further cause the processing device to:
receive, by the comparator from a write cursor collision detector, an indication that a second target time is within a collision range of the first target time, the second target time indicating when a second superblock is expected to be filled based on a second write rate for a second write cursor writing data units into the second superblock; and
modify the first garbage collection rate to a second garbage collection rate based on the first target time and the second target time to provide a first empty superblock to the first write cursor prior to the first target time and a second empty superblock to the second write cursor prior to the second target time.

### Claim 10 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the negative loop feedback includes an integrated value of a difference between a number of free empty superblocks generated based on the first garbage collection rate and a number of required free empty superblocks.

### Claim 11 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the negative loop feedback includes an adjustable empty superblock delivery time indicating a first amount of time prior to the first target time to deliver the free empty superblock to the first write cursor, and wherein the adjustable empty superblock delivery time includes a second amount of time to erase data units from a first garbage collection superblock to produce the free empty superblock.

### Claim 12 (depends on 8)

The non-transitory computer-readable medium of claim 8, where determining the first garbage collection rate based on the first target time and the negative loop feedback further comprises:
calculating a raw garbage collection rate; and
sending the raw garbage collection rate through a loop filter to generate the first garbage collection rate.

### Claim 13 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the negative loop feedback includes a count of a number of valid data units in a first garbage collection superblock selected for the garbage collection process.

### Claim 14

A method comprising:
receiving a first indication a first write cursor is writing data units at a first write rate into a first superblock within an allocated portion of memory composed of a plurality of superblocks;
determining a first target time when the first superblock is expected to be filled based on the first write rate;
determining a first garbage collection rate for a set of superblocks designated for garbage collection within the allocated portion of memory based on the first target time;
receiving a second indication the first write cursor is writing data units at a second write rate into the first superblock, the second write rate being different from the first write rate;
determining a second target time when the first superblock is expected to be filled based on the second write rate; and
modifying the first garbage collection rate for the set of superblocks designated for garbage collection within the allocated portion of memory to a second garbage collection rate based on the second target time.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
receiving a third indication a second write cursor is writing data units at a third write rate into a second superblock within the allocated portion of memory; and
determining a third target time when the second superblock is expected to be filled based on the third write rate.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
determining that the second target time is within a collision range of the third target time; and
in response to determining that the second target time is within the collision range of the third target time, modifying the second garbage collection rate to a third garbage collection rate based on the second target time and the third target time to provide a first empty superblock to the first write cursor prior to the second target time and a second empty superblock to the second write cursor prior to the third target time.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
determining a fourth target time when a third superblock is expected to be filled based on the second write rate of the first write cursor;
determining a fifth target time when a fourth superblock is expected to be filled based on the third write rate of the second write cursor;
determining that the fourth target time is not within the collision range of the fifth target time;
determining that the fourth target time is earlier in time than the fifth target time; and
allocating a third empty superblock to the first write cursor in response to determining that the fourth target time is earlier in time than the fifth target time.

### Claim 18 (depends on 14)

The method of claim 14, wherein determining the first garbage collection rate for the set of superblocks designated for garbage collection within the allocated portion of memory based on the first target time comprises:
determining an average valid data unit count for the set of superblocks designated for garbage collection;
calculating an average garbage collection rate for the set of superblocks designated for garbage collection based on the determined average valid data unit count, wherein the average garbage collection rate indicates a number of superblocks from the set of superblocks for garbage collection;
selecting the number of superblocks from the set of superblocks;
determining an average valid data unit count for the number of superblocks; and
calculating the first garbage collection rate for the number of superblocks based on the determined average valid data unit count for the number of superblocks to complete the garbage collection of the number of superblocks within a predetermined range prior to the first target time.

### Claim 19 (depends on 14)

The method of claim 14, wherein determining the first garbage collection rate for the set of superblocks designated for garbage collection within the allocated portion of memory based on the first target time comprises:
calculating a first garbage collection read rate for the set of superblocks designated for garbage collection to complete the set of superblocks designated for garbage collection in a predetermined range prior to the first target time;
calculating a first garbage collection write rate based on the first garbage collection read rate; and
performing the garbage collection of the superblocks based on the first garbage collection read rate and the first garbage collection write rate.

### Claim 20 (depends on 14)

The method of claim 14, wherein the garbage collection is performed in a closed-loop garbage collection system, and wherein the method further comprises:
determining the first garbage collection rate based on the first target time and a negative loop feedback, the first garbage collection rate calculated to provide a free empty superblock to the first write cursor within a range of time of the first target time, and
sending instructions to a garbage collection manager to perform the garbage collection at the first garbage collection rate, wherein an outcome of the garbage collection is incorporated into the negative loop feedback sent to a comparator.
