IP Library Granted Patent US 9,189,392
Granted Patent B1
US 9,189,392 · App. 13/174,708 · Granted Nov 17, 2015

Opportunistic defragmentation during garbage collection

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 9,189,392
App. No.
13/174,708
Granted
Nov 17, 2015
Kind
B1
Abstract

The present invention is directed to systems and methods for opportunistically defragmenting a data storage device during garbage collection. During garbage collection, valid data is identified and cached in a buffer assigned to the garbage collection process. When the buffer has been filled or reached a threshold, the valid data in the buffer is then coalesced and rewritten back to the data storage medium. In addition, a translation table is reduced by updating its entries to indicate the new locations of the coalesced valid data.

Claims (42)

1. A method of defragmenting a data storage device, said method comprising:

receiving a read command from a host;

reading a first block of data stored in non-volatile media of a data storage device in response to the read command from the host;

determining a timing of garbage collection for the first block in response to reading the first block of data;

caching valid data of the first block in response to said determination;

coalescing the valid data;

identifying invalid data in a second block of data stored in the non-volatile media; and

rewriting back the coalesced valid data to the second block.

2. The method of claim 1 , wherein rewriting back the coalesced valid data to the second block comprises writing back the coalesced valid data in a contiguous sequence on the non-volatile media according to logical block addresses assigned to the coalesced valid data.

3. The method of claim 1 , wherein the first block of data is part of a circular buffer on the non-volatile media.

4. The method of claim 3 , wherein said determining comprises determining that the first block is located within a threshold number of memory units of a tail of the circular buffer.

5. The method of claim 1 , further comprising updating a translation table at least in part by encoding a starting logical block address and run length for new physical locations associated with the coalesced data.

6. The method of claim 1 , wherein said caching the valid data comprises caching the valid data in a buffer designated for garbage collection until a threshold is reached.

7. The method of claim 6 , wherein said coalescing the valid data is initiated by the data storage device when the threshold has been reached and comprises reordering the valid data based on logical block addresses in a sequential order.

8. A data storage device comprising:

a non-volatile medium;

a memory providing at least one cache for storing data from read operations;

an interface configured for communications with a host; and

a controller configured by a plurality of instructions, which comprise instructions for:

receiving a read command from the host;

reading valid data from a first block of data stored in the non-volatile medium in response to the read command from the host;

determining a timing of garbage collection for the first block in response to reading the valid data from the first block of data;

caching the valid data of the first block in response to said determination;

coalescing the valid data;

identifying invalid data in a second block stored in the non-volatile medium; and

rewriting back the coalesced valid data to the second block.

9. The data storage device of claim 8 , wherein the controller is further configured to coalesce the valid data based on logical block addresses assigned to the valid data.

10. The data storage device of claim 8 , wherein the controller is further configured to coalesce the valid data based on when the cache reaches a threshold.

11. The data storage device of claim 10 , wherein the controller is further configured to coalesce the valid data based on when the cache is full.

12. The data storage device of claim 10 , wherein the controller is further configured to coalesce the valid data into a contiguous sequential order according to logical block addresses assigned to the valid data.

13. A method of optimizing a translation table stored in a memory of a data storage device, wherein the translation table dynamically maps logical block addresses used by a host to physical locations on the data storage device, said method comprising:

receiving a first block of data from one or more read operations performed on a data storage device;

determining a timing of garbage collection for the first block in response to receiving the first block of data;

caching valid data of the first block in response to said determination;

coalescing the valid data;

identifying invalid data stored in a second block of data;

rewriting back the coalesced valid data to the second block; and

updating a translation table to indicate new locations of the coalesced data that has been rewritten back to the data storage device.

14. The method of claim 13 , wherein updating the translation table comprises determining a starting logical block address for the cached valid data and a run length.

15. The method of claim 13 , further comprising compressing the translation table to reduce memory consumed by the translation table.

16. The method of claim 13 , wherein updating the translation table comprises reducing a number of translation nodes used by the translation table.

17. The method of claim 13 , wherein coalescing the valid data comprises coalescing the valid data when a cache has been filled with identified valid data from a garbage collection process.

Assignments (7)
PATENT COLLATERAL AGREEMENT - DDTL LOAN AGREEMENT Recorded Aug 21, 2023
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 067045/0156 →
PATENT COLLATERAL AGREEMENT - A&R LOAN AGREEMENT Recorded Aug 21, 2023
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 064715/0001 →
RELEASE OF SECURITY INTEREST AT REEL 038744 FRAME 0481 Recorded Feb 8, 2022
From: JPMORGAN CHASE BANK, N.A.
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 058982/0556 →
RELEASE OF SECURITY INTEREST Recorded Mar 5, 2018
From: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 045501/0714 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 038722/0229 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 038744/0281 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 038744/0481 →