IP Library Granted Patent US 8,996,768
Granted Patent B2
US 8,996,768 · App. 13/524,913 · Granted Mar 31, 2015

Method and storage device for assessing execution of trim commands

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,996,768
App. No.
13/524,913
Granted
Mar 31, 2015
Kind
B2
Abstract

A method and storage device for assessing execution of trim commands are provided. In one embodiment, a trace of trim and write commands sent to a storage device are obtained. For each trim command in the trace, a subsequent write command to a same logical block address (LBA) as the trim command is identified, and an elapsed time between the trim and write commands is calculated. This information can be used to display a histogram and/or to optimize when the storage device executes trim commands and/or when the host device issues trim commands.

Claims (105)

1. A storage device comprising:

a host device interface through which the storage device can communicate with a host device; and

a controller in communication with host device interface, wherein the controller is configured to:

obtain a trace of trim and write commands sent to the storage device; and

for each trim command in the trace:

identify a subsequent write command to a same logical block address (LBA) as the trim command; and

calculate an elapsed time between the trim and write commands.

2. The storage device of claim 1 , wherein the controller is further configured to:

generate a histogram based on the calculated elapse time.

3. The storage device of claim 1 , wherein the controller is further configured to:

adjust when the storage device executes trim commands based on the calculated elapse time.

4. The storage device of claim 1 , wherein the controller is further configured to:

if a subsequent write command to the same LBA is not identified, determine whether another trim command was issued to the same LBA without an intervening write command.

5. The storage device of claim 4 , wherein the controller is further configured to:

if another trim command was issued to the same LBA without an intervening write command, log a double trim occurrence.

6. The storage device of claim 4 , wherein the controller is further configured to:

if another trim command was not issued to the same LBA without an intervening write command, log a never rewritten occurrence.

7. The storage device of claim 1 , wherein the controller is further configured to:

determine available physical blocks in the storage device.

8. The storage device of claim 7 , wherein the controller is further configured to:

adjust when the storage device executes trim commands based on the calculated elapse time and the available LBA space.

9. A method for assessing execution of trim commands, the method comprising:

performing the following in a storage device:

obtaining a trace of trim and write commands sent to the storage device; and

for each trim command in the trace:

identifying if there is a subsequent write command to a same logical block address (LBA) as the trim command; and

if there is a subsequent write command to the same LBA, calculating an elapsed time between the trim and write commands.

10. The method of claim 9 further comprising:

generating a histogram based on the calculated elapse time.

11. The method of claim 9 further comprising:

adjusting when the storage device executes trim commands based on the calculated elapse time.

12. The method of claim 9 further comprising:

if there is not a subsequent write command to the same LBA, determining whether another trim command was issued to the same LBA without an intervening write command.

13. The method of claim 12 further comprising:

if another trim command was issued to the same LBA without an intervening write command, logging a double trim occurrence.

14. The method of claim 12 further comprising:

if another trim command was not issued to the same LBA without an intervening write command, logging a never rewritten occurrence.

15. The method of claim 9 further comprising:

determining available physical blocks in the storage device.

16. The method of claim 15 further comprising:

adjusting when the storage device executes trim commands based on the calculated elapse time and the available LBA space.

17. A host device comprising:

a storage device interface through which the host device can communicate with a storage device; and

a controller in communication with storage device interface, wherein the controller is configured to:

obtain a trace of trim and write commands sent to the storage device; and

for each trim command in the trace:

identify a subsequent write command to a same logical block address (LBA) as the trim command; and

calculate an elapsed time between the trim and write commands.

18. The host device of claim 17 , wherein the controller is further configured to:

generate a histogram based on the calculated elapse time.

19. The host device of claim 17 , wherein the controller is further configured to:

adjust when the storage device executes trim commands based on the calculated elapse time.

20. The host device of claim 17 , wherein the controller is further configured to:

adjust when the host device issues trim commands based on the calculated elapse time.

21. The host device of claim 17 , wherein the controller is further configured to:

if a subsequent write command to the same LBA is not identified, determine whether another trim command was issued to the same LBA without an intervening write command.

22. The host device of claim 21 , wherein the controller is further configured to:

if another trim command was issued to the same LBA without an intervening write command, log a double trim occurrence.

23. The host device of claim 21 , wherein the controller is further configured to:

if another trim command was not issued to the same LBA without an intervening write command, log a never rewritten occurrence.

24. The host device of claim 17 , wherein the controller is further configured to:

determine available LBA space from host device data.

25. The host device of claim 24 , wherein the controller is further configured to:

adjust when the storage device executes trim commands based on the calculated elapse time and the available LBA space.

26. The host device of claim 24 , wherein the controller is further configured to:

adjust when the host device issues trim commands based on the calculated elapse time and the available LBA space.

27. The host device of claim 17 , wherein the controller is further configured to:

determine available physical blocks in the storage device.

28. The host device of claim 27 , wherein the controller is further configured to:

adjust when the storage device executes trim commands based on the calculated elapse time and the available LBA space.

29. The host device of claim 27 , wherein the controller is further configured to:

adjust when the host device issues trim commands based on the calculated elapse time and the available LBA space.

30. A method for assessing execution of trim commands, the method comprising:

performing the following in a device external to and in communication with a storage device:

obtaining a trace of trim and write commands sent to the storage device; and

for each trim command in the trace:

identifying if there is a subsequent write command to a same logical block address (LBA) as the trim command; and

if there is a subsequent write command to the same LBA, calculating an elapsed time between the trim and write commands.

31. The method of claim 30 further comprising:

generating a histogram based on the calculated elapse time.

32. The method of claim 30 further comprising:

adjusting when the storage device executes trim commands based on the calculated elapse time.

33. The method of claim 30 further comprising:

adjusting when the host device issues trim commands based on the calculated elapse time.

34. The method of claim 30 further comprising:

if there is not a subsequent write command to the same LBA, determining whether another trim command was issued to the same LBA without an intervening write command.

35. The method of claim 34 further comprising:

if another trim command was issued to the same LBA without an intervening write command, logging a double trim occurrence.

36. The method of claim 34 further comprising:

if another trim command was not issued to the same LBA without an intervening write command, logging a never rewritten occurrence.

37. The method of claim 30 further comprising:

determining available LBA space from host device data.

38. The method of claim 37 further comprising:

adjusting when the storage device executes trim commands based on the calculated elapse time and the available LBA space.

39. The method of claim 37 further comprising:

adjusting when the host device issues trim commands based on the calculated elapse time and the available LBA space.

40. The method of claim 30 further comprising:

determining available physical blocks in the storage device.

41. The method of claim 40 further comprising:

adjusting when the storage device executes trim commands based on the calculated elapse time and the available LBA space.

42. The method of claim 40 further comprising:

adjusting when the host device issues trim commands based on the calculated elapse time and the available LBA space.

43. The method of claim 42 , wherein the method is performed by the host device.

44. The method of claim 42 , wherein the method is performed by a device between the host and storage devices.

45. The method of claim 44 , wherein the device between the host and storage devices is a bus analyzer.

Assignments (5)
PARTIAL RELEASE OF SECURITY INTERESTS Recorded Apr 25, 2025
From: JPMORGAN CHASE BANK, N.A., AS AGENT
To: SANDISK TECHNOLOGIES, INC.
Reel/Frame 071382/0001 →
SECURITY AGREEMENT Recorded Apr 25, 2025
From: SANDISK TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 071050/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 31, 2024
From: SANDISK TECHNOLOGIES LLC
To: SANDISK TECHNOLOGIES, INC.
Reel/Frame 069796/0423 →
CHANGE OF NAME Recorded May 25, 2016
From: SANDISK TECHNOLOGIES INC
To: SANDISK TECHNOLOGIES LLC
Reel/Frame 038807/0898 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 15, 2012
From: COHEN, OREN; SOBOL, EYAL; GILRAD, OMER; HAHN, JUDAH G.
To: SANDISK TECHNOLOGIES INC.
Reel/Frame 028387/0380 →