# US 9,354,955 B1 · Partial garbage collection for fast error handling and optimized garbage collection for the invisible band

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

- Number: US 9,354,955 B1
- Document ID: US9354955B1
- Status: Granted
- Kind: B1
- Application number: 14/250,000
- Filed: 2014-04-10
- Granted: 2016-05-31
- Earliest claimed: 2014-03-19
- Assignees: Western Digital Technologies, Inc.; Skyera, LLC
- Applicants: Western Digital Technologies, Inc.; Skyera, LLC
- Inventors: Justin Jones; Andrew J. Tomlin; Paul Sweazey; Johnny A. Lam; Rodney N. Mullendore
- Web page: https://patentgrep.com/patent/US9354955B1

## CPC

- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 11/073: {in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00)}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 12/00: Accessing, addressing or allocating within memory systems or architectures (digital input from, or digital output to record carriers, e.g. to disk storage units, G06F3/06)
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for managing garbage collection of memory locations in an DSD having a plurality of dies each having a plurality of memory blocks includes: selecting a physical region of memory to be garbage collected, the selected physical region being a subset of a block management region; and garbage collecting the selected physical region. The garbage collecting includes: determining one or more journals corresponding to the selected physical region, the journal comprising transaction entries indicating what logical data are written to memory locations in the selected physical region; determining whether the memory locations within the physical region contain valid data based on a comparison of information in the journal and a mapping table; and if valid data exists, copying valid data into memory locations in memory regions other than the selected physical region of memory. The selected physical region of memory is erased when the block management region is erased.

## Claims

### Claim 1

A method for managing garbage collection of memory locations in a data storage device (DSD) comprising a plurality of dies, each die comprising a plurality of memory blocks, the method comprising:
selecting a physical region of memory to be garbage collected, the selected physical region being a subset of a block management region; and
garbage collecting the selected physical region of memory, the garbage collecting comprising:
determining one or more journals corresponding to the selected physical region, the one or more journals comprising transaction entries indicating what logical data are written to memory locations in the selected physical region;
determining whether the memory locations within the physical region of memory contain valid data based on a comparison of information in the one or more journals and a mapping table;
if valid data exists, copying valid data into memory locations in memory regions other than the selected physical region of memory; and
alternating garbage collecting on an invisible band journal with garbage collecting the selected physical region of memory associated with one or more data band journals, wherein garbage collecting on the invisible band journal comprises mapping information transaction entries recording what logical data are mapped to a location designed for denoting that logical data has been invalidated,
wherein the selected physical region of memory is erased when the block management region is erased.

### Claim 2 (depends on 1)

The method of claim 1, wherein the block management region comprises one or more blocks from a plurality of dies in the DSD.

### Claim 3 (depends on 1)

The method of claim 1, wherein a smallest physical region of memory that can be selected to be garbage collected is a flash page (F-page).

### Claim 4 (depends on 1)

The method of claim 1, wherein the physical region is selected upon detection of a program error at a physical location in the selected physical region.

### Claim 5 (depends on 1)

The method of claim 1, wherein the physical region is selected upon detection of a high bit error count during a read operation.

### Claim 6 (depends on 1)

The method of claim 1, wherein the selected physical region of memory is in a data band and associated with one or more data band journals.

### Claim 7 (depends on 6)

The method of claim 6, wherein the selected physical region of memory in the data band stores at least one logical data segment that spans boundaries of the one or more data band journals.

### Claim 8 (depends on 1)

The method of claim 1, wherein the one or more data band journals and the invisible band journal are selected to contain substantially a same number of recorded mapping information transaction entries.

### Claim 9

A data storage device (DSD), comprising:
a controller; and
a plurality of dies, each die comprising a plurality of memory blocks,
wherein the controller is configured to:
select a physical region of memory to garbage collect, the selected physical region being a subset of a block management region; and
garbage collect the selected physical region of memory, wherein the garbage collecting comprising:
determine one or more journals corresponding to the selected physical region, the one or more journals comprising transaction entries indicating what logical data are written to memory locations in the selected physical region;
determine whether the memory locations within the physical region of memory contain valid data based on a comparison of information in the one or more journals and a mapping table; and
if valid data exists, copy valid data into memory locations in memory regions other than the selected physical region of memory; and
alternate garbage collecting on an invisible band journal with garbage collecting the selected physical region of memory associated with one or more data band journals, wherein garbage collecting on the invisible band journal comprises mapping information transaction entries recording what logical data are mapped to a location designed for denoting that logical data has been invalidated,
wherein the selected physical region of memory is erased when the block management region is erased.

### Claim 10 (depends on 9)

The DSD of claim 9, wherein the block management region comprises one or more blocks from a plurality of dies in the DSD.

### Claim 11 (depends on 9)

The DSD of claim 9, wherein the controller is further configured to select a flash page (F-page) as a smallest physical region of memory that can be selected to be garbage collected.

### Claim 12 (depends on 9)

The DSD of claim 9, wherein the physical region is selected upon detection of a program error at a physical location in the selected physical region.

### Claim 13 (depends on 9)

The DSD of claim 9, wherein the physical region is selected upon detection of a high bit error count during a read operation.

### Claim 14 (depends on 9)

The DSD of claim 9, wherein the controller is further configured to select the physical region of memory in a data band and associated with one or more data band journals.

### Claim 15 (depends on 14)

The DSD of claim 14, wherein the controller is further configured to store, in the selected physical region of memory in the data band, at least one logical data segment that spans boundaries of the one or more data band journals.

### Claim 16 (depends on 9)

The DSD of claim 9, wherein the controller is further configured to select the one or more data band journals and the invisible band journal to contain substantially a same number of recorded mapping information transaction entries.
