CPC G06F 12/0253 (2013.01) [G06F 12/0246 (2013.01); G06F 2212/7205 (2013.01)] | 15 Claims |
1. A method of managing a garbage collection (GC) operation, comprising:
selecting a source block and at least one candidate source block from the flash memory;
calculating an overall valid page percentage according to a number of valid pages in the source block and the at least one candidate source block, comprising:
determining a weight for each of the source block and the at least one candidate source block, where the weight of the source block is greater than the weight of the at least one candidate source block;
calculating a valid page percentage for each of the source block and the at least one candidate source block; and
obtaining the overall valid page percentage by calculating a weighted average of percentages of valid pages of the source block and the at least one candidate source block based on the weights of the source block and the at least one candidate source block;
determining a GC-to-host base ratio according to the overall valid page percentage; and
performing the GC operation on the source block according to at least the GC-to-host base ratio.
|