Hierarchical storage device with host-accessible subdivisions
This disclosure provides techniques hierarchical address virtualization within a memory controller and configurable block device allocation. By performing address translation only at select hierarchical levels, a memory controller can be designed to have predictable I/O latency, with brief or otherwise negligible logical-to-physical address translation time. In one embodiment, address transition may be implemented entirely with logical gates and look-up tables of a memory controller integrated circuit, without requiring processor cycles. The disclosed virtualization scheme also provides for flexibility in customizing the configuration of virtual storage devices, to present nearly any desired configuration to a host or client.
1 . A storage device comprising:
at least one namespace;
flash memory having erase units organized into subdivisions, the subdivisions comprising respective, non-overlapping sets of erase units;
logic operable to cause the storage device to transmit to a host, responsive to receipt of at least one query from the host, information to identify a specific namespace of the at least one namespace, one or more of the subdivisions, and for each one of the one or more of the subdivisions, an associated subdivision size; and
logic operable to cause the storage device to receive write requests and, for a first one of the write requests, to:
derive, from address information associated with the first one of the write requests, a first address portion, a second address portion, and a third address portion,
identify, from the first address portion, the specific namespace,
identify, from the second address portion, an addressed subdivision of the one or more identified subdivisions,
identify an offset associated with the addressed subdivision, wherein the logic operable to cause the storage device to receive write requests is operable to cause the storage device to use at least one operation to subdivide the offset to identify a physical storage location within a specific erase unit of the set of erase units which is respective to the addressed subdivision,
program data associated with the first write request into the identified physical storage location, and
identify a logical block address from the third address portion;
wherein the storage device further comprises logic operable to cause the storage device to maintain a logical-to-physical look-up table and to, in response to receiving the first write request, update the logical-to-physical look-up table, such that the identified logical block address is indexed to the identified physical storage location; and
wherein each said logic comprises at least one of circuitry or instructions stored on a physical storage medium that, when executed, are to control circuitry of the storage device.
2 . The storage device of claim 1 , wherein the storage device further comprises logic operable to cause the storage device to:
track metadata corresponding to the addressed subdivision;
compare the metadata corresponding to the addressed subdivision with at least one criterion; and
responsive to satisfaction of the at least one criterion by the metadata corresponding to the addressed subdivision, automatically copy valid data from the specific erase unit to a new erase unit.
3 . The storage device of claim 2 , wherein the storage device further comprises logic operable to cause the storage device to:
in association with the copy of valid data from the specific erase unit, disassociate the specific erase unit from the set which is respective to the addressed subdivision; and
automatically control physical erasure of the specific erase unit.
4 . The storage device of claim 3 , wherein the storage device further comprises logic operable to cause the storage device to:
maintain a pool of free erase units; and
select the new erase unit from the pool of free erase units, and assign the new erase unit to the set which is respective to the addressed subdivision.
5 . The storage device of claim 3 , wherein the storage device further comprises logic operable to cause the storage device to:
track information representing defect status of one or more of the erase units of flash memory;
in association with the automatically-controlled physical erasure of the specific erase unit, detect an erasure error; and
responsively update the tracked information representing defect status to mark the specific erase unit as bad.
6 . The storage device of claim 2 , wherein:
the metadata comprises data validity information, tracked for at least one erase unit of the set respective to the addressed subdivision;
the at least one criterion comprises a criterion associated with data stored in individual ones of the erase units of the flash memory; and
the automatic copy is performed responsive to satisfaction, by the data validity information, of the criterion associated with data stored in individual ones of the flash memory.
7 . The storage device of claim 2 , wherein the metadata represents a time since data was programmed in at least one erase unit in the set which is respective to the addressed subdivision.
8 . The storage device of claim 2 , wherein the metadata indicates wear of the specific erase unit.
9 . The storage device of claim 2 , wherein the metadata indicates a data access frequency associated with logical block addresses mapped to the specific erase unit.
10 . The storage device of claim 1 , wherein the storage device further comprises logic operable to cause the storage device to:
receive a command from the host to release a logical block address corresponding to a storage location, in the specific erase unit, which holds stored data; and
update tracked data validity information, to mark as released, the storage location holding the stored data.
11 . The storage device of claim 10 , wherein the storage device further comprises logic operable to cause the storage device to:
in association with the update of the tracked data validity information, detect a condition where all storage locations of the specific erase unit having previously-written data are marked as released; and
automatically control physical erasure of the particular erase unit.
12 . The storage device of claim 1 , wherein the storage device further comprises a host interface and logic operable to cause the storage device to:
track metadata respective to different ones of the subdivisions;
receive, via the host interface, a second query from the host; and
responsive to the second query, transmit information, to the host, which is dependent on the tracked metadata.
13 . The storage device of claim 12 , wherein the information transmitted to the host identifies a given one of the subdivisions and indicates a quantity of available space, associated with the set of erase units which are respective to the given one of the subdivisions, which can currently be written to.
14 . The storage device of claim 12 , wherein the metadata represents a time since data was programmed into the respective subdivision.
15 . The storage device of claim 1 , wherein the storage device further comprises logic operable to cause the storage device to:
store a value representing a maximum number of the subdivisions; and
receive a second query; and
responsively transmit to the host information representing the maximum number of the subdivisions.
16 . The storage device of claim 1 , wherein:
the flash memory comprises flash memory dies;
the flash memory further comprises one or more die groups, each die group having a subset of one or more of the flash memory dies, the one or more of the flash memory dies in each die group being mutually-exclusive to the one or more of the flash memory dies in each other die group, wherein each die group is associated with an identifier (ID); and
the storage device further comprises logic operable to cause the storage device to receive a second query from the host, and to responsively transmit, to the host, information representing each ID associated with the one or more die groups.
17 . The storage device of claim 16 , wherein, for the one of the write requests, the logic is further operable to cause the storage device to perform a division operation, on the address information, to identify the ID which is associated with a specific die group of the one or more die groups.
18 . The storage device of claim 1 , wherein the storage drive further comprises logic operable to cause the storage device to:
receive a configuration command, from the host, and responsively establish a value of a setting; and
responsively update a quantity, of the one or more subdivisions, dependent on the value of the setting.
19 . The storage device of claim 1 , wherein:
the storage device further comprises logic operable to cause the storage device to receive a read request from the host, the read request being directed to the identified logical block address; and
the logic is further operable to cause the storage device to:
detect an error condition associated with reading of the programmed data;
responsively copy valid data from the specific erase unit to a new erase unit; and
update the logical-to-physical look-up table, such that the identified logical block address is indexed to a physical storage location within the new erase unit.
20 . The storage device of claim 19 , wherein the error condition corresponds to a bit error rate which exceeds a threshold.
21 . The storage device of claim 1 , wherein:
the storage device further comprises logic operable to cause the storage device to receive a read request, from the host, the read request being directed to the identified logical block address; and
the logic is further operable to cause the storage device to:
retrieve, from the logical-to-physical look-up table, a physical address of the identified physical storage location; and
retrieve, from the flash memory, the programmed data, and responsively transmit the programmed data to the host.
22 . The storage device of claim 1 , wherein the storage device further comprises logic operable to cause the storage device to maintain information identifying a next-available physical storage location for the addressed subdivision, and to automatically update, in association with the receipt of the first one of the write requests, the information identifying the next-available physical storage location.
23 . The storage device of claim 22 , wherein the storage device further comprises logic operable to cause the storage device to receive a second query from the host, and wherein the logic is further operable to cause the storage device to, in response to the second query, transmit, to the host, the information dependent on the next-available physical storage location, as updated.
24 . The storage device of claim 1 , wherein the logic is further operable to cause the storage device to:
for the first one of the write requests, perform a division operation on the offset, wherein a quotient of the division operation comprises at least one of a number of the erase units, or a number of pages, or a number of storage locations, and wherein a remainder of the division operation corresponds to a structural offset corresponding to a physical address in the flash memory.
25 . The storage device of claim 1 , wherein the associated subdivision size corresponds to at least a minimum amount of storage capacity to be physically reset by the storage device as part of a physical memory erasure operation.
26 . The storage device of claim 1 , wherein:
the storage device further comprises logic operable to cause the storage device to:
perform garbage collection; and
in connection with said garbage collection:
relocate all remaining valid data from any erase unit in the set respective to the addressed subdivision to one or more new erase units; and
automatically associate the set respective to the addressed subdivision with the one or more new erase units; and
each of the erase units of the flash memory, including the one or more new erase units, are associated with at most exactly one of the sets.
27 . The storage device of claim 1 , wherein the storage device further comprises logic operable to cause the storage device to receive, from the host, a second write request, the second write request being directed to the addressed subdivision and, in association with the second write request, to:
detect that insufficient free memory space remains in the set of erase units respective to the addressed subdivision;
assign a new erase unit to the set respective to the addressed subdivision;
identify a destination physical address associated with a storage location in the new erase unit;
store write data accompanying the second write request at the identified storage location in the new erase unit; and
update the logical-to-physical look-up table to index a logical block address, identified for the second write request, to the destination physical address.
28 . The storage device of claim 27 , wherein:
the logical block address identified for the second write request corresponds to the logical block address identified for the first one of the write requests; and
the logic is further operable to cause the storage device to update, in association with the storage of the write data accompanying the second write request at the identified storage location in the new erase unit, the logical-to-physical look-up table, so as to reindex the identified logical block address identified for the first one of the write requests to the destination physical address.