US RE50,315 E1
Adaptive garbage collection including flash memory using age and staleness parameters
Silei Zhang, Fremont, CA (US)
Assigned to INNOVATIONS IN MEMORY LLC, Dover, DE (US)
Filed by INNOVATIONS IN MEMORY LLC, Dover, DE (US)
Filed on Sep. 10, 2021, as Appl. No. 17/471,336.
Application 17/471,336 is a reissue of application No. 14/965,339, filed on Dec. 10, 2015, granted, now 10,409,526, issued on Sep. 10, 2019.
Claims priority of provisional application 62/093,169, filed on Dec. 17, 2014.
Int. Cl. G06F 3/06 (2006.01); G06F 12/02 (2006.01)
CPC G06F 3/0679 (2013.01) [G06F 3/061 (2013.01); G06F 3/0616 (2013.01); G06F 3/0652 (2013.01); G06F 3/0688 (2013.01); G06F 12/0246 (2013.01); G06F 2212/1016 (2013.01); G06F 2212/1036 (2013.01); G06F 2212/7205 (2013.01); G06F 2212/7211 (2013.01)] 8 Claims
OG exemplary drawing
 
[ 5. A system comprising:
a processor; and
a flash memory comprising blocks of memory, wherein each of the blocks or memory comprises a plurality of pages for storing data;
the processor is configured to allocate a first number of blocks of the flash memory to store user data and a second number of blocks of the flash memory as an erased block pool;
the processor is configured to maintain a garbage collection parameter for a block, comprising at least an age parameter and a staleness parameter for the block, where the age parameter is representative of a number of times any block of the first number of blocks of memory has been erased since a last time the block has been erased, and a staleness parameter represents a number of stale (invalid) pages of the block; and,
the processor is configured to select for garbage collection, when an erased block is needed to replenish the erased block pool, a block from the blocks storing data having a highest garbage collection parameter value;
the processor is configured to determine a hot or cold status of the block being garbage collected by computing a heuristic value, and when the block is garbage collected, the processor is configured to designate all valid data of the block to be either hot data or cold data based on the heuristic value of the block, wherein hot data is data that is frequently modified and cold data is data that is not frequently modified;
the processor is configured to maintain a first write stream, a second write stream and a third write stream, such that data from the each of the first write stream, the second write stream and the third write stream is written to separate blocks of the flash memory;
the processor is configured to insert user written data in the first write stream, hot data in the second write stream and cold data in the third write stream;
the processor is configured to determine if a free page location is available for writing data of each of the first write stream, the second write stream or the third stream;
if no free page location is available for a selected stream of the first write stream, the second write stream or the third write stream, the processor is configured to select a block of memory from the erased block pool and associating the block of memory from the erased block pool with one of the streams requiring page locations for writing the data;
if a page is available for writing the data, the processor is configured to continue writing data from the stream until no page location is available;
the processor is configured to determine if a number of erased blocks in the erased block pool has been reduced to a predetermined number, and if this predetermined number is reached, the processor is configured to select the block of memory from the blocks of memory storing data having a highest garbage collection parameter for the garbage collection;
the processor is configured to move each valid page of data from the block being garbage collected to either the second write stream or the third write stream, depending on whether the block was determined to be hot or cold respectively, until all valid data has been moved from the block;
the processor is configured to erase the block; and
the processor is configured to allocate the erased block to the erased block pool.]