Some file systems force certain areas, such as where file-system tables are kept, to be rewritten very frequently. In a solid state data storage device, such as a Flash memory device, the rewriting may generate extra wear which may reduce reliability and performance. In addition, multi-level cell (MLC) Flash memory is less tolerant of wear and has a slower access time than single level cell Flash memory and may encounter even greater problems if it is storing frequently written file-system tables. Thus, a new system that addresses at least these issues is needed.
In one embodiment, a data storage device may include a multi-level address mapping system. The multi-level address mapping system may be implemented completely independent of a host computer and a host computer operating system. Also, the multi-level mapping system may be stored to allow each level, or subsets of each level, to be re-written independently of the other levels or the other subsets.
In another embodiment, a device may comprise a non-volatile data storage medium, an interface to receive commands and data from a host computer, and a control circuit coupled to the interface and data storage medium. The control circuit may be adapted to implement a multi-level address mapping system within the device and independent of the host computer.
In yet another embodiment, a device may comprise a control circuit adapted to implement a multi-level address mapping system within a data storage device and independent of any host computer. The control circuit may be adapted to determine a first pointer from a first level of the multi-level address mapping system, where the first pointer indicates a portion of a second level of the multi-level address mapping system. The control circuit may also be adapted to determine a second pointer from the second level, where the second pointer indicates a portion of a third level of the multi-level address mapping system. The control circuit may also be adapted to determine a third pointer from the third level, where the third pointer indicates a physical location of a logical block address.
In the following detailed description of the embodiments, reference is made to the accompanying drawings which form a part hereof, and in which are shown by way of illustration of specific embodiments. It is to be understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present disclosure.
Referring to
The data storage device 108 may include a controller 110, which may be coupled to the processor 102 via a connection through the system bus 103. The controller 110 may include a mapping system module 109 adapted to implement a structured mapping system. The data storage device 108 may also contain data storage medium 112, such as an array of data storage cells. The data storage medium 112 may include one or more integrated circuit memory chips. For example, the data storage cells 112 may be Multi-Level Cell (MLC) NAND non-volatile Flash memory or Single-Level Cell (SLC) NAND non-volatile Flash memory.
The data storage device 108 may communicate with the processor 102 via an interface (not shown) adapted to receive commands and data from the processor 102. Further, the data storage device 108 may be configured to implement a structured mapping system via the controller 110 independent of the processor 102 or any other hardware or function of the system 100. In a particular embodiment, in addition to implementing and managing the structured mapping system, the controller 110 may also be a data storage controller.
The data storage device 108 may be connected to a power backup 114 which may be a secondary power source, such as a battery, rechargeable capacitor, or any other energy store. The power backup 114 may be located internal or external to the data storage device 108. The power backup 114 can provide power to ensure that if a power supply to the data storage device 108 is lost, there will be enough power to write a deterministic amount of data to the data storage medium 112. As long as the data storage device 108 has sufficient cache memory space (not shown) and the power backup 114 is available, the data storage device 108 can save data in the cache until a sufficient amount has been acquired to fill (at least mostly) a whole page or whole pages. This can help reduce write amplification problems. Since each write to the data storage medium 112 of the smallest mapping unit contains a log entry indicating what was written therein, the mapping system can be viewed as a set of H parallel page-writing engines that write pages sequentially within page groups. Each set must keep track of the next page (EB Group, EB, page) to be written and may have a minimal-mapping-unit-sized cache (not shown) assigned to it. With a sufficient energy store and cache, parallelism can be beneficial to allow a larger set of data to be written or read in the same time that a unit without parallelism would read or write a smaller set of data.
During operation, the processor 102 may send a command to the memory device 108 to retrieve or store data. The controller 110 can receive the command from the processor 102 and determine a location of data corresponding to data relevant to the command via the mapping system module 109.
The mapping system module 109 may implement the structured mapping system, which determines a physical address location from a logical block address (LBA). Generally, the structured mapping system can be multi-level, which may consist of multiple address look-up tables. The address look-up tables may each contain information, such as pointers, to a location of a physical address or another table. Different levels of tables may be implemented to only allow a specific range of address information, such as a specific one of multiple tables, to be loaded into a cache. Each level of the structured mapping system may comprise multiple tables, each of the multiple tables may contain address information regarding a specific range of LBAs.
The structured mapping system may be implemented by a controller, dedicated hardware circuit, or any combination thereof. The structured mapping system may be implemented independent of a host computer, such that the host computer may be unaware that the structured mapping system is being used within the data storage device. The multiple tables of the structured mapping system may stored independently to allow each of the multiple levels to be re-written independently, or each table within a level to be re-written independently. The tables may be stored near user data on a non-volatile data storage medium within the data storage device, such as within one page of an erasure block where the rest of the pages in the erasure block are for user data.
The levels of the structured mapping system may be determined based on groupings of LBAs. In one example, the LBA grouping could be LBA per Page to map physical page addresses. However, the LBA grouping could be more sophisticated, such as a striping of data across multiple flash channels, a hash of the LBA values, or a logical erasure block per physical erasure block (EB) number.
A mapping unit (such as LBA grouping per Page) can be any arbitrarily sized unit. However, since NAND flash is page-programmable and EB-erasurable, mapping objects between page-sized and EB-sized units is preferable. For example, when an EB is erased, all units therein go from a garbage state to an erased state, thus there is some efficiency to have an integer number of mapping units equal to an EB. Also, when a particular number of pages are programmed, a mapping entry must also be altered, and this scheme would allow less formatting loss due to metadata requirements by tracking only down to the page level.
In some embodiments, many levels of mapping may be implemented. For example, from the resolution of an integer number of pages to an integer number of EBs.
As can be seen via the comparison tables 206, the hierarchical mapping system 204 uses more storage space than the monolithic mapping table 202. However, the hierarchical mapping system 204 can store much of the mapping data directly to the data storage medium which stores the associated data, such as data storage medium 112, and fetch it only on an as-needed basis. Whereas, the monolithic mapping table 202 would be stored in a higher-cost cache memory. The hierarchical mapping system 204 reduces the amount of mapping data that needs to be stored in a higher-cost cache memory because the lowest-layer metadata can be written alongside the user data in every page (or group of pages). Also, periodic updates could be made to the higher level tables to make power-on-recovery times very manageable. By performing binary searches for data in the hierarchical tables, the number of table fetches can be significantly limited.
As shown in
Then, the mapping system determines an EB pointer from the retrieved second level table and retrieves another specific table from the third level of table(s), the EB-to-Page Group table(s), that is indicated by the EB pointer. The mapping system then determines a Page Group pointer from the retrieved third level table and retrieves another specific table from the fourth level of table(s), the Page Group-to-Page table(s), that is indicated by the Page Group pointer. The mapping system can then use the retrieved fourth level table to determine a specific physical address of the page associated with the specific LBA. Also, in the example of
All of the second, third, and fourth level table(s) would not need to be stored in cache, as only the tables indicated by the pointers would need to be retrieved from the data storage medium and loaded into a cache. The second, third, and fourth level tables could be stored on the data storage medium or elsewhere. All of the pointers may be determined based on an LBA associated with specific data to be stored or retrieved.
In a particular embodiment shown, the first comparison table 404 shows a mapping system that includes a hard-wired first-level, Hash(LBA Group)-EBGroup, and two flexible mapping levels, EBGroup-EB and EB-Page. The hard-wired first-level can be implemented as an algorithm that ties the first-level mapping to 16 ED Groups of the second level. Also, for example, if a 4× coupling (e.g. four pages coupled together) is also applied, then the metadata for the same sized data storage device as shown in
In another particular embodiment, the second comparison table 406 shows a mapping system that includes a hard-wired first-level, Hash(LBA Group)-EBGroup, and two flexible mapping levels, EBGroup-EB and EB-Page. The particular embodiment shown in the comparison table 406 includes the EBGroup-EB mapping table(s) loaded into cache memory. This allows the mapping system to only need one table/page fetch per read to determine a physical page location for a desired page.
During writes, the data storage system may cache a page worth of data before writing a physical page worth of data, such that each page written is completely written with data. When a number of pages (63 for example) that is one less than the number of pages in an EB (64 for example) is written, an EB may be considered full and a PageGroup (for example, an EB in the
In another particular embodiment, the page-writing engines can be duplicated for concurrent gains. For example, striping can allow multi-sector reads to perform nearly as quickly as single-sector reads, as long as the striping causes concurrent LBA reads from other independent flash channels. Further performance improvement may be gained by implementing command queuing.
In yet another particular embodiment, a hierarchical mapping system may have two levels, a hard-wired first level and a flexible mapping second level. For example, the hard-wired first level may divide LBAs into specific groups and the flexible mapping second level may map an LBA to a final physical location. The mapping of the second level may be based on a logical mapping unit granularity, such as a page.
In particular embodiments, the above discussed systems are implemented via an application specific integrated circuit (ASIC) that is configured to automate the table fetching and traversal. The systems and methods disclosed herein provide benefits over a log-structured file system implemented at an operating system of a host and a monolithic system where a single monolithic map is stored in cache memory. For example, a single monolithic map can be stored in cache memory, however, a power-on state recovery delay and/or the steps taken to become power-removal safe may take a certain amount of time to process. The systems and methods disclosed herein can reduce the amount of time to process a mapping system during a power-on state recovery delay or during a process to allow a safe power-removal.
It is to be understood that even though numerous characteristics and advantages of various embodiments have been set forth in the foregoing description, together with details of the structure and function of the various embodiments, this disclosure is illustrative only, and changes may be made in detail, especially in matters of structure and arrangement of parts. For example, the embodiments described herein can be implemented for any type of data storage device that uses logical block addresses, such as solid state memory devices, disc drives, or hybrid data storage devices. Further, the methods describe herein may be implemented by a computer processor, controller, hardware circuits, or any combination thereof. Also, the particular elements may vary depending on the particular application for the data storage system while maintaining substantially the same functionality without departing from the scope and spirit of the present disclosure. In addition, although an embodiment described herein is directed to a solid state data storage system, it will be appreciated by those skilled in the art that the teachings of the present application can be applied to any type of data storage device or computer system that may benefit from the ideas, structure, or functionality disclosed herein.