Selecting memory blocks for relocation operations based on commit time
A data storage device includes a relocation analysis system that tracks and/or calculates a commit time associated with one or more memory blocks. When a relocation operation is to be performed, the relocation analysis system selects one or more memory blocks from a pool of memory blocks based on the commit time. The relocation analysis system also determines a validity count associated each memory block in the pool of memory blocks. The validity count of each memory block, along with the commit time of each memory block, may also be used to select one or more memory blocks that will be part of the relocation operation. When the one or more memory blocks have been selected, the relocation analysis system causes the relocation operation to be performed on the one or more memory blocks.
1 . A method, comprising:
initiating a relocation operation in a data storage device;
identifying a plurality of memory blocks for the relocation operation;
determining a commit time associated with each memory block of the plurality of memory blocks;
selecting at least one memory block of the plurality of memory blocks based, at least in part, on the commit time associated with the at least one memory block; and
performing the relocation operation using the at least one memory block.
2 . The method of claim 1 , further comprising determining a validity count associated with each memory block of the plurality of memory blocks.
3 . The method of claim 2 , wherein selecting at least one memory block of the plurality of memory blocks further comprises:
comparing the validity count of the at least one memory block to the validity count of another memory block of the plurality of memory blocks; and
selecting the at least one memory block if a difference between the validity count of the at least one memory block and the validity count of the another memory block is within a validity count difference threshold.
4 . The method of claim 1 , wherein determining the commit time associated with each memory block includes determining at least one of an amount of random data stored in each memory block and an amount of sequential data stored in each memory block.
5 . The method of claim 1 , wherein determining the commit time associated with each memory block includes determining a number of different group address table pages stored in each of the memory blocks.
6 . The method of claim 1 , wherein the at least one memory block of the plurality of memory blocks is selected based, at least in part, on a type of data being stored by the data storage device.
7 . The method of claim 1 , wherein the at least one memory block of the plurality of memory blocks is selected based, at least in part, on a power source associated with the data storage device.
8 . The method of claim 1 , wherein the at least one memory block has a higher validity count when compared with a non-selected memory block of the plurality of memory blocks.
9 . A data storage device, comprising:
a controller; and
a relocation analysis system associated with the controller and operable to:
identify a pool of memory blocks for a relocation operation;
determine a commit time associated with each memory block in the pool of memory blocks;
determine a validity count associated with each memory block in the pool of memory blocks;
select at least one memory block in the pool of memory blocks for the relocation operation based, at least in part, on the commit time associated with the at least one memory block and the validity count associated with the at least one memory block; and
cause the relocation operation to be performed.
10 . The data storage device of claim 9 , wherein the relocation analysis system selects the at least one memory block in the pool of memory blocks for the relocation operation when a difference between the validity count associated with the at least one memory block and the validity count associated with a non-selected memory block is within a validity count difference threshold.
11 . The data storage device of claim 9 , wherein the relocation analysis system is further operable to determine at least one of an amount of random data stored in each memory block and an amount of sequential data stored in each memory block.
12 . The data storage device of claim 9 , wherein determining the commit time associated with each memory block in the pool of memory blocks includes determining a number of different group address table pages stored in each of the memory blocks.
13 . The data storage device of claim 9 , wherein the relocation analysis system selects the at least one memory block in the pool of memory blocks based, at least in part, on a type of data being stored by the data storage device.
14 . The data storage device of claim 9 , wherein the relocation analysis system selects the at least one memory block in the pool of memory blocks based, at least in part, on a power source associated with the data storage device.
15 . The data storage device of claim 9 , wherein the at least one memory block has a higher validity count when compared with a non-selected memory block of the pool of memory blocks.
16 . A data storage device, comprising:
means for identifying a pool of memory blocks for a relocation operation;
means for determining a commit time associated with each memory block in the pool of memory blocks;
means for selecting at least one memory block in the pool of memory blocks based, at least in part, on the commit time associated with the at least one memory block; and
means for performing the relocation operation using the at least one memory block.
17 . The data storage device of claim 16 , further comprising means for determining a validity count associated with each memory block in the pool of memory blocks.
18 . The data storage device of claim 17 , further comprising means for comparing the validity count of the at least one memory block to the validity count of another memory block in the pool of memory blocks.
19 . The data storage device of claim 18 , wherein the means for selecting the at least one memory block in the pool of memory blocks selects the at least one memory block if a difference between the validity count of the at least one memory block and the validity count of the another memory block is within a validity count difference threshold.
20 . The data storage device of claim 16 , further comprising means for determining at least one of an amount of random data stored in each memory block and an amount of sequential data stored in each memory block.