Storage system with namespaces and 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 system comprising:
a host having a host-side interface; and
a storage drive comprising:
a drive-side interface,
flash memory having subdivisions comprising respective, non-overlapping sets of erase units, and physical storage locations in the erase units, and
logic operable to cause the storage drive to transmit to the host, responsive to receipt, via the drive-side interface, of at least one query from the host, information to identify the subdivisions and associated subdivision size;
wherein the host comprises logic operable to cause the host to:
format write requests to be addressed to a logical namespace and a specific one of the subdivisions, and
transmit, via the host-side interface, the write requests to the storage drive;
wherein the storage drive further comprises logic operable to cause the storage drive to:
maintain a logical-to-physical look-up table;
for each one of the write requests addressed to the specific one of the subdivisions:
derive, from accompanying address information, a first address portion, a second address portion, and a third address portion,
identify, from the first address portion, the logical namespace,
identify, from the second address portion, the specific one of the subdivisions,
identify from the third address portion, a logical block address,
identify one of the physical storage locations which is respective to the specific one of the subdivisions,
store data associated with the one of the write requests in the identified physical storage location, and
update the logical-to-physical look-up table to associate the logical block address with the identified physical storage location;
wherein, further, the host comprises logic operable to transmit, to the storage drive, via the host-side interface, deallocate commands;
wherein, further, the storage drive comprises logic operable to:
track validity status for data stored in the flash memory;
responsive to receipt of the deallocate commands, update the tracked validity status for corresponding physical storage locations to indicate that the corresponding physical storage locations are released; and
automatically detect a condition where (1) one of the erase units, in one of the respective, non-overlapping sets, has at least a threshold amount of storage that has been released, and (2) all storage locations of the one of the erase units, are at least one of (2a) released, or (2b) contain no host-accessible valid data, and responsively control physical erasure of the one of the erase units; and
update metadata associated with the one of the erase units, the metadata indicating one of an erase count or wear information, in association with the physical erasure of the one of the erase units; and
in connection with the physical erasure of the one of the erase units, detect that the one of the erase units is bad, and responsively update data tracked by the storage drive to mark the one of the erase units as bad;
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 drive.
2 . The storage system of claim 1 , wherein:
the host further comprises logic operable to cause the host to transmit read requests to the storage drive, via the host-side interface, each of the read requests specifying a read logical block address; and
the storage drive further comprises logic operable to cause the storage drive to receive, via the drive-side interface, each of the read requests from the host, and to fulfill each given one of the read requests by:
retrieving, from the logical-to-physical look-up table, a read physical address which is mapped to the read logical block address specified by the given one of the read requests,
retrieving, from the flash memory, read data from a particular one of the physical locations of the flash memory which corresponds to the read physical address, and
transmitting the read data to the host.
3 . The storage system of claim 1 , wherein the storage drive further comprises logic operable to cause the storage drive to:
track second metadata respective to a given one of the subdivisions;
compare the second metadata with at least one criterion; and
responsive to satisfaction of the at least one criterion by the second metadata, automatically copy valid data from at least one erase unit, in the set respective to the given one of the subdivisions, to a new erase unit.
4 . The storage system of claim 3 , wherein the storage drive further comprises logic operable to cause the storage drive to:
in association with the copy of the valid data, disassociate the at least one erase unit from the set which is respective to the given one of the subdivisions; and
automatically control physical erasure of the at least one erase unit from the set which is respective to the given one of the subdivisions.
5 . The storage system of claim 4 , wherein the storage drive further comprises logic operable to cause the storage drive 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 given one of the subdivisions.
6 . The storage system of claim 4 , wherein the storage drive further comprises logic operable to cause the storage drive to:
track information representing defect status of each erase unit in the set which is respective to the given one of the subdivisions;
in association with the automatically-controlled physical erasure of the at least one erase unit, detect an erasure error in a given erase unit of the at least one erase unit; and
responsively update tracked information representing defect status to mark the given erase unit as bad.
7 . The storage system of claim 3 , wherein:
the metadata of the storage drive comprises data validity information, tracked for at least one erase unit of the set respective to the given one of the subdivisions;
the at least one criterion of the storage drive comprises a criterion associated with data stored in individual ones of the erase units in one of the respective, non-overlapping sets; and
the automatic copy of valid data is performed responsive to satisfaction, by the data validity information, of the criterion.
8 . The storage system of claim 3 , wherein the metadata represents times, respective to the subdivisions, since data was programmed into at least one corresponding erase unit.
9 . The storage system of claim 3 , wherein the metadata indicates wear of each erase unit in a corresponding one of the non-overlapping sets of erase units.
10 . The storage system of claim 3 , wherein the metadata indicates data access frequencies respective to the subdivisions.
11 . The storage system of claim 1 , wherein the storage drive further comprises logic operable to cause the storage drive to:
track second metadata respective to the subdivisions;
compare the second metadata with at least one criterion;
responsive to satisfaction of the at least one criterion by the second metadata for a given one of the subdivisions, automatically copy valid data, from at least one erase unit in the set respective to the given one of the subdivisions, to a new erase unit; and
automatically update tracked data validity status for an old physical storage location of the flash memory, corresponding to the automatically copied data, to indicate that the old physical storage location is released.
12 . The storage system of claim 1 , wherein:
the at least one query is at least one first query;
the host further comprises logic operable to cause the host to transmit a second query to the storage drive; and
the storage drive further comprises logic operable to cause the storage drive to:
track second metadata respective to the subdivisions,
receive, via the drive-side interface, the second query, and
responsive to receipt of the second query, transmit second information, via the drive-side interface, to the host, the second information being dependent on the tracked metadata.
13 . The storage drive of claim 12 , wherein the second information 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 drive of claim 12 , wherein the second metadata represents a time since data was programmed into the respective subdivision.
15 . The storage drive of claim 1 , wherein:
the host further comprises logic operable to cause the host to transmit, via the host-side interface, a second query to the storage drive; and
the storage drive further comprises logic operable to cause the storage drive to:
store a value representing a maximum number of subdivisions, and
receive, via the drive-side interface, the second query, and
responsively transmit to the host, via the drive-side interface, information representing the maximum number of the subdivisions.
16 . The storage system 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 a die group identifier (ID);
the host further comprises logic operable to cause the host to transmit, via the host-side interface, one or more second queries to the storage drive; and
the storage drive further comprises logic operable to cause the storage drive to receive the one or more second queries from the host, via the drive-side interface, and to responsively transmit to the host, via the drive-side interface, information representing each of the die group IDs.
17 . The storage system of claim 16 , wherein:
the host further comprises logic operable to cause the host to format each of the write requests to specify an ID associated with a specific die group of the one or more die groups; and
the storage drive further comprises logic operable to cause the storage drive to perform a division operation, on the address information associated each given one of the write requests, to identify a die group ID specified by the host in association with the given one of the write requests.
18 . The storage system of claim 1 , wherein:
the host further comprises logic operable to cause the host to transmit one or more second queries to the storage drive, via the host-side interface; and
the storage drive further comprises logic operable to cause the storage drive to receive the one or more second queries from the host, via the drive-side interface, and to transmit to the host, responsive to receipt of the one or more second queries, and via the drive-side interface, a data storage capacity associated with each one of the one or more subdivisions.
19 . The storage system of claim 1 , wherein:
the host further comprises logic operable to cause the host to transmit read requests to the storage drive, via the host-side interface; and
the storage drive further comprises logic operable to cause the storage drive to:
receive, via the drive-side interface, each of the read requests, wherein at least one of the read requests is directed to a particular logical block address,
detect an error condition associated with reading of data from the particular logical block address,
responsively copy valid data from one of the erase units, in one of the respective, non-overlapping sets, having a physical storage location corresponding to the particular logical block address, to a new erase unit, and
update the logical to physical look-up table to index the particular logical block address to a new physical address within the new erase unit.
20 . The storage drive of claim 19 , wherein the error condition corresponds to a bit error rate which exceeds a threshold.
21 . The storage system of claim 1 , wherein the storage drive further comprises logic operable to cause the storage drive to maintain information, respective to the subdivisions, identifying a next-available physical storage location for the respective subdivision, and to automatically update, in association with the receipt of a first one of the write requests, the information identifying the next-available physical storage location which is respective to the specific one of the subdivisions.
22 . The storage system of claim 21 , wherein:
the host further comprises logic operable to cause the host to transmit, to the storage drive, via the host-side interface, a second query, and
the storage drive further comprises logic operable to cause the storage drive to:
receive the second query from the host, via the drive-side interface, and
responsively transmit, to the host, via the drive-side interface, information which depends on the maintained information identifying the next-available physical storage location, as automatically updated, for at least one subdivision of the one or more subdivisions.
23 . The storage system of claim 1 , wherein the storage drive further comprises logic operable to cause the storage device to, for a write request which is directed to a given one of the subdivisions, perform a division operation on associated address information, 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.
24 . The storage system 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 drive as part of a physical memory erasure operation.
25 . The storage system of claim 1 , wherein:
the storage drive further comprises logic operable to cause the storage drive 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 a given one of the subdivisions to one or more new erase units, and
automatically associate the set respective to the given one of the subdivisions with the one or more new erase units;
each of the one or more new erase units are associated with at most exactly one of the sets.
26 . The storage system of claim 1 , wherein the storage drive further comprises logic operable to cause the storage drive to receive, from the host, via the drive-side interface, a second write request, the second write request being directed to a given one of the subdivisions 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 given one of the subdivisions;
assign a new erase unit to the set respective to the given one of the subdivisions;
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 storage location associated with the identified destination physical address; 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.
27 . The storage system of claim 26 , wherein:
the logical block address identified for the second write request corresponds to a logical block address identified for a first one of the write requests; and
the logic is further operable to cause the storage drive to update, in association with the storage of the write data accompanying the second write request at the storage location associated with the destination physical address, the logical-to-physical look-up table, so as to re-index a logical block address identified for the first one of the write requests to the destination physical address.
28 . The storage system of claim 1 , wherein:
the host further comprises logic operable to cause the host to transmit, to the storage drive, via the host-side interface, a configuration command accompanied with a setting; and
the storage drive further comprises logic operable to cause the storage drive to:
receive the configuration command from the host, via the drive-side interface; and
responsively update a quantity, of the subdivisions, dependent on the setting.
29 . The storage system of claim 1 , wherein:
the specific namespace is a first namespace;
the at least one namespace comprises a second namespace;
the write requests are first write requests;
the storage drive further comprises logic operable to cause the storage drive to the host, responsive to receipt, via the drive-side interface, of at least one query from the host, information to identify the second namespace, subdivisions which are associated with the second namespace and, for each one of the subdivisions associated with the second namespace, an associated subdivision size; and
the host further comprises logic operable to cause the host to format second write requests such that each of the second write requests are addressed to the second namespace and to a selected one of the subdivisions which are associated with the second namespace.
30 . The storage system of claim 1 , wherein:
the at least one namespace also comprises a second namespace;
the deallocate commands are first deallocate commands;
the first deallocate commands are addressed to the first namespace;
the storage drive comprises logic operable to:
receive, via the drive-side interface, second deallocate commands from the host, the second deallocate commands being addressed to the second namespace,
responsive to receipt of the second deallocate commands, update tracked validity status for corresponding physical storage locations associated with the second namespace to indicate that the corresponding physical storage locations associated with the second namespace are released; and
automatically detect a condition where (1) an erase unit associated with the second namespace has at least a threshold amount of storage that has been released, and (2) all storage locations of the second one of the erase units, are each at least one of (2a) released, or (2b) contain no host-accessible valid data, and to responsively and automatically control physical erasure of the erase unit associated with the second namespace; and
store metadata, for the erase unit associated with the second namespace, indicating one of an erase count or wear information, and, in association with the physical erasure of the erase unit associated with the second namespace, to update the metadata for the erase unit associated with the second namespace; and
in connection with the physical erasure of the erase unit associated with the second namespace, detect that the erase unit associated with the second namespace is bad, and to responsively update data tracked by the storage drive to mark the erase unit associated with the second namespace as bad.