Wear leveling in solid state drives
A computer storage device having: a host interface; a controller; non-volatile storage media having memory units of different types and having different program erase budgets; and firmware. The firmware instructs the controller to: generate an address map mapping logical addresses to physical addresses of the memory units the different types; and adjust the address map based at least in part on the program erase budgets to level wear across the memory units of the different types.
1. A solid state drive, comprising:
a host interface;
a controller;
a set of non-volatile memory units of different types that have different program erase budgets corresponding to the different types respectively; and
firmware containing instructions configured to instruct the controller to:
generate an address map mapping logical addresses to physical addresses of the memory units of the different types;
adjust the address map based at least in part on the program erase budgets to level wear across the memory units of the different types;
track degrees of wear of the memory units, wherein the degrees of wear are normalized to account for differences in the program erase budgets corresponding to the different types, wherein the degrees of wear are normalized using a largest one of the program erase budgets; and
track numbers of normalized program erase cycles of the memory units, wherein the numbers of normalized program erase cycles of the memory units are proportional to number of actual program erase cycles of the memory units and inversely proportional to program erase budgets of the memory units.
2. The solid state drive of claim 1 , wherein the types of the memory units include at least two of:
single level cell flash memory;
multi level cell flash memory;
triple level cell flash memory; and
quad level cell flash memory.
3. The solid state drive of claim 1 , wherein the instructions are further configured to instruct the controller to:
receive a request to write data in a logical address that is currently mapped by the address map to a first memory unit;
identify a second memory unit having less wear than the first memory unit;
change the address map to map the logical address to the second memory unit; and
write the data in the second memory unit.
4. The solid state drive of claim 3 , wherein the first memory unit and the second memory unit are of different types.
5. The solid state drive of claim 3 , wherein the first memory unit and the second memory unit have different program erase budgets.
6. A method implemented in a solid state drive, the method comprising:
providing a set of non-volatile memory units of different types that have different program erase budgets corresponding to the different types respectively;
generating an address map mapping logical addresses to physical addresses of the memory units of the different types;
adjusting the address map based at least in part on the program erase budgets to level wear across the memory units of the different types;
tracking data indicating degrees of wear of the memory units, wherein the degrees of wear are normalized according to the program erase budgets corresponding to the different types, wherein the degrees of wear are normalized using a largest one of the program erase budgets; and
tracking numbers of normalized program erase cycles of the memory units, wherein the numbers of normalized program erase cycles of the memory units are proportional to number of actual program erase cycles of the memory units and inversely proportional to program erase budgets of the memory units.
7. The method of claim 6 , wherein the types of the memory units include at least two of:
single level cell flash memory;
multi level cell flash memory;
triple level cell flash memory; and
quad level cell flash memory.
8. The method of claim 6 , further comprising:
receiving a request to write data in a logical address that is currently mapped by the address map to a first memory unit;
identifying a second memory unit having less wear than the first memory unit;
changing the address map to map the logical address to the second memory unit; and
writing the data in the second memory unit.
9. The method of claim 8 , wherein the first memory unit and the second memory unit are of different types.
10. The method of claim 8 , wherein the first memory unit and the second memory unit have different program erase budgets.
11. A non-transitory computer storage medium storing instructions which, when executed on a solid state drive, cause the solid state drive to perform a method, the method comprising:
providing data access to a set of non-volatile memory units of different types that have different program erase budgets corresponding to the different types respectively;
generating an address map mapping logical addresses to physical addresses of the memory units of the different types;
adjusting the address map based at least in part on the program erase budgets to level wear across the memory units of the different types;
tracking data indicating degrees of wear of the memory units, wherein the degrees of wear are normalized according to the program erase budgets corresponding to the different types, wherein the degrees of wear are normalized using a largest one of the program erase budgets; and
tracking numbers of normalized program erase cycles of the memory units, wherein the numbers of normalized program erase cycles of the memory units are proportional to number of actual program erase cycles of the memory units and inversely proportional to program erase budgets of the memory units.