Using thin provisioning read zeros to optimize purge operations
A storage device may reduce overhead associated with executing purge-related operations on a memory device. The storage device includes a memory device including blocks to store data A controller on the storage device may categorize blocks on the memory device based on a thin provisioning read zeros (TPRZ) value. The controller may separate data stored in the blocks on the memory device according to the TPRZ value. When the storage device receives a purge command from a host, the controller may condition a purge operation on a first TPRZ value and perform the purge operation on the-blocks associated with the first TPRZ value.
1 . A storage device to reduce overhead associated with executing purge-related operations on a memory device, the storage device comprises:
a memory device including blocks to store data; and
a controller to categorize blocks on the memory device based on a thin provisioning read zeros (TPRZ) value, separate data stored in the blocks on the memory device according to the TPRZ value, receive a purge command from a host, condition a purge operation on a first TPRZ value, and perform the purge operation on the-blocks associated with the first TPRZ value.
2 . The storage device of claim 1 , wherein the controller associates a first category of blocks with a TPRZ value of zero and associates a second category of blocks with a TPRZ value of one.
3 . The storage device of claim 1 , wherein the controller receives a write command from the host and in processing the write command, the controller identifies the TPRZ value of a logical unit specified in the write command and stores data in the write command in a category of blocks associated with the TPRZ value.
4 . The storage device of claim 3 , wherein the controller programs data in the write command to a block in a first category when the logical unit specified in the write command has a TPRZ value of zero and programs data in the write command to a block in a second category when the logical unit specified in the write command has a TPRZ value of one.
5 . The storage device of claim 1 , wherein the controller executes background operations and during a background operation, the controller relocates data from a source block in a first category to a destination block in the first category and relocates data from a source block in a second category to a destination block in the second category.
6 . The storage device of claim 1 , wherein the controller executes the purge operation to enforce physical erasure of invalid data associated with logical units that have the first TPRZ value.
7 . The storage device of claim 1 , wherein during the purge operation, the controller does not physically erase invalid data associated with logical units that do not have the first TPRZ value.
8 . The storage device of claim 1 , wherein in executing the purge operation, the controller
executes a preparation operation;
determines that a validity count for a source block, in a category associated with the first TPRZ value, is between zero and one-hundred percent and marks the source block for relocation;
triggers background operations and relocates data in the source block to a destination block in the category associated with the first TPRZ value; and
physically erases the data from the source block and flash-fills the source blocks.
9 . The storage device of claim 8 , wherein the controller executes the purge operation on all blocks in the memory device associated with the first TPRZ value.
10 . The storage device of claim 1 , wherein a time saved during the purge operation is a relocation time saved multiplied by a validity count percentage, plus a sum of an erasure time and a flash fill time and multiplied by a number of meta-block with TPRZ value of zero.
11 . A method in a storage device for reducing overhead associated with executing purge-related operations on a memory device, the storage device comprises a controller to execute the method comprising:
categorizing blocks on a memory device based on a thin provisioning read zeros (TPRZ) value;
separating data stored in the-blocks on the memory device according to the TPRZ value;
receiving a purge command from a host;
conditioning a purge-operation on a first TPRZ value; and
performing the purge operation on the-blocks associated with the first TPRZ value.
12 . The method of claim 11 , further comprising associating a first category of blocks with a TPRZ value of zero and associating a second category of blocks with a TPRZ value of one.
13 . The method of claim 11 , further comprising receiving a write command from the host and in processing in processing a write command, identifying the TPRZ value of a logical unit specified in the write command and storing the data in the write command in a category of blocks associated with the TPRZ value.
14 . The method of claim 13 , further comprising programing data in the write command to a block in a first category when the logical unit specified in the write command has a TPRZ value of zero and programming data in the write command to a block in a second category when the logical unit specified in the write command has a TPRZ value of one.
15 . The method of claim 11 , further comprising executing background operations, and during the background operation, relocating data from a source block in a first category to a destination block in the first category and relocating data from a source block in a second category to a destination block in the second category.
16 . The method of claim 11 , further comprising executing the purge operation to enforce physical erasure of invalid data associated with logical units that have the first TPRZ value.
17 . The method of claim 11 , further comprising during the purge operation, not physically erasing invalid data associated with logical units that do not have the first TPRZ value.
18 . The method of claim 11 , further comprising during the purge operation,
executing a preparation operation;
determining that a validity count for a source block in a category associated with the first TPRZ value is between zero and one-hundred percent and marking the source block for relocation;
triggering background operations and relocating data in the source block to a destination block in the category associated with the first TPRZ value; and
physically erasing the data from the source block and flash-filling the source blocks.
19 . The method of claim 18 , further comprising executing the purge operation on all blocks in the memory device associated with the first TPRZ value.
20 . A method in a storage device for reducing overhead associated with executing purge-related operations on a memory device, the storage device comprises a controller to execute the method comprising:
categorizing blocks on a memory device based on a thin provisioning read zeros (TPRZ) value;
associating a first category of blocks with a TPRZ value of zero and associating a second category of blocks with a TPRZ value of one;
one of receiving a write command from a host and processing background operations to relocated data on the memory device;
programming data having the TPRZ value of zero in the first category of blocks and programming data having the TPRZ value of one in the second category of blocks;
receiving a purge command from the host;
conditioning a purge-operation on a first TPRZ value associated with the second category of blocks; and
performing the purge operation on the second category of blocks.