IP Library Granted Patent US 8,521,972
Granted Patent B1
US 8,521,972 · App. 12/827,931 · Granted Aug 27, 2013

System and method for optimizing garbage collection in data storage

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 8,521,972
App. No.
12/827,931
Granted
Aug 27, 2013
Kind
B1
Abstract

The present invention is directed to systems and methods for optimizing garbage collection in data storage. The data storage may be a shingled disk drive or a non-volatile solid-state memory device. Garbage collection is optimized by selectively saving data read from certain locations of the data storage in response to host read commands and using the saved data for subsequent garbage collection operations. The decision of whether to save data may be based on a number of criteria, including whether the data is located in an area of the data storage that is due to be garbage collected in the near future. In this manner, certain garbage collection operations can be performed without having to re-read the saved data.

Claims (47)

1. A method of performing garbage collection in a disk drive comprising control circuitry that reads and writes data in at least a portion of the disk drive as a circular buffer in response to commands from a host system, the method comprising:

reading data from a physical block address of the disk drive in response to a read command from the host system;

saving the data in temporary memory;

determining, based at least partly on if a distance between the physical block address and an end location of the circular buffer is shorter than a threshold, whether to retain data in the temporary memory for subsequent use in performing garbage collection; and

performing a garbage collection operation with the data in the temporary memory.

2. The method of claim 1 , wherein the threshold is based at least in part on a likelihood that a garbage collection operation will be needed.

3. The method of claim 1 , wherein retaining the data further comprises reading and saving additional data from an entire track in which the physical block address in located.

4. The method of claim 1 , wherein the temporary memory comprises a read cache and wherein retaining the data further comprises preventing the data from being flushed from the read cache.

5. The method of claim 1 , wherein retaining the data further comprises reading and saving additional data from an area in proximity to the physical block address.

6. The method of claim 1 , wherein the temporary memory is stored in flash memory.

7. The method of claim 1 , wherein the temporary memory is stored in non-volatile memory.

8. A data storage comprising:

a disk comprising a plurality of tracks, wherein each track comprises a plurality of data sectors each assigned a physical block address; and

control circuitry for reading and writing data in at least a portion of the data storage, the control circuitry configured to:

read and write data in at least a portion of the disk as a circular buffer;

in response to a read command from a host system, cause data to be read from a physical block address in the disk and saved in temporary memory;

determine, based at least partly on a location of the physical block address in the disk, whether to save the data in the temporary memory for subsequent use in performing garbage collection; and

perform a garbage collection operation with the data in the temporary memory.

9. The data storage of claim 8 , wherein the control circuitry is configured to determine if a distance between the physical block address and an end location of the circular buffer is shorter than a threshold.

10. The data storage of claim 9 , wherein the threshold is based at least in part on a likelihood that a garbage collection operation will be needed.

11. The data storage of claim 8 , wherein the control circuitry is further configured to read and write data into a plurality of zones of the disk in response to commands from the host system and to determine to save the data in the temporary memory by determining if the physical block address is located in a zone of the plurality of zones that has a number of invalid blocks that exceeds a minimum invalidity threshold.

12. The data storage of claim 8 , wherein the control circuitry is further configured to read and save additional data from an entire track in which the physical block address is located if the data is saved for subsequent use in performing garbage collection.

13. The data storage of claim 8 , wherein the temporary memory comprises a read cache and the control circuitry is further configured to save the data by preventing the data from being flushed from the read cache.

14. The data storage of claim 8 , wherein the control circuitry is further configured to read and save additional data from an area in proximity to the physical block address if the data is saved for subsequent use in performing garbage collection.

15. The data storage of claim 8 , wherein the temporary memory is stored in flash memory.

16. The data storage of claim 8 , wherein the temporary memory is stored in non-volatile memory.

17. A method of performing garbage collection in a data storage device comprising control circuitry that reads and writes data into a plurality of zones of the data storage device in response to commands from a host system, the method comprising:

reading data from a physical block address of the data storage device in response to a read command from the host system;

saving the data in temporary memory;

determining, based at least partly on if the physical block address is located in a zone of the plurality of zones that has a number of invalid blocks that exceeds a minimum invalidity threshold, whether to retain data in the temporary memory for subsequent use in performing garbage collection; and

performing a garbage collection operation with the data in temporary memory.

18. The method of claim 17 , wherein the data storage device comprises a solid state storage device.

19. The method of claim 17 , wherein the data storage device comprises a disk drive.

20. A method of performing garbage collection in a data storage device, the method comprising:

reading data from a physical block address of the data storage device in response to a read command from a host system;

saving the data in temporary memory;

determining, based at least partly on if the physical block address appears on a list of addresses that meet a minimum least recently used threshold, whether to retain data in the temporary memory for subsequent use in performing garbage collection; and

performing a garbage collection operation with the data in the temporary memory.

21. The method of claim 20 , wherein the data storage device comprises a solid state storage device.

22. The method of claim 20 , wherein the data storage device comprises a disk drive.

23. A data storage comprising:

control circuitry for reading and writing data in at least a portion of the data storage, the control circuitry configured to:

in response to a read command from a host system, cause data to be read from a physical block address in the data storage and saved in temporary memory;

determine, based at least partly on if the physical block address appears on a list of addresses that meet a minimum least recently used threshold, whether to save the data in the temporary memory for subsequent use in performing garbage collection; and

perform a garbage collection operation with the data in the temporary memory.

24. The data storage of claim 23 , wherein the data storage further comprises a solid state storage device.

25. The data storage of claim 23 , wherein the data storage further comprises a disk comprising a plurality of tracks, wherein each track comprises a plurality of data sectors each assigned a physical block address.

Assignments (13)
SECURITY AGREEMENT (SUPPLEMENTAL) Recorded Nov 14, 2024
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 069411/0208 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 11, 2024
From: SANDISK TECHNOLOGIES, INC.
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 069168/0273 →
PATENT COLLATERAL AGREEMENT Recorded Aug 23, 2024
From: SANDISK TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS THE AGENT
Reel/Frame 068762/0494 →
CHANGE OF NAME Recorded Jun 27, 2024
From: SANDISK TECHNOLOGIES, INC.
To: SANDISK TECHNOLOGIES, INC.
Reel/Frame 067982/0032 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 29, 2024
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: SANDISK TECHNOLOGIES, INC.
Reel/Frame 067567/0682 →
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 →
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 →
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: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 038744/0481 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 038744/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 2, 2010
From: BOYLE, WILLIAM B.; FALLONE, ROBERT M.
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 024775/0784 →