The invention relates generally to a storage device and particularly to management of memory arrays of the storage device by a controller
Memory media in a mass storage device is used partially by the controller of the device to store a variety of types of private data, i.e. data that is not intended for public access and is rather intended for a very limited access, that are critical to the device's performance and reliability. Examples of such data include boot code and tables, among others. The controller uses the rest of the memory media to store data from a host. Some of the data from the host are frequently accessed and are also critically important to the performance of the host incorporating the mass storage device. Hence the controller's efficient management of these data is most critical in optimizing the mass storage device's performance as well as providing a pleasant user experience.
The controller private data, such as boot code, is not very large compare with user data but it requires a reliable storage media. Another example of private data is tables that are managed by the controller to locate logical block addresses within the memory array physical block addresses. These tables are most critical to functionality and performance of the device and are frequently accessed, as such they require media with high performance, reliability, and non-volatility.
Controllers sometimes store security parameters such as AES keys in their private data area, which also requires reliable media. The security keys are used to protect the data stored in the memory array (part of the memory media) of the mass storage device. Any corruption of the keys will most likely render the storage device inoperative.
Certain host parameters, such as file allocation table (FAT) and directories, are accessed and updated frequently as well and require a memory media type with high performance and high reliability for optimal performance. Other types of host data such as pictures, songs and movies typically require a very large amount of storage space and occupy the majority of the memory media of the storage device but they do not require as high reliability or performance of the memory media.
Current mass storage devices commonly utilize NAND flash memories for the storage media. NAND memories provide large amounts of storage at a reasonable price point but they fail to provide all the attributes required by the controller for achieving high performance and reliability. NAND flash memories are inherently slow with limited reliability and endurance, making them unattractive for controllers requiring those attributes.
NAND flash memory is a block-addressable persistent (non-volatile) memory with each block organized into and made of various pages. After a block is programmed, it is erased prior to programming it again. Most flash memory devices require sequential programming of pages within a block. Another limitation of flash memory is that blocks can only be erased for a limited number of times. Thus frequent erase operations reduce the life time of the flash memory. Accordingly, flash memory does not allow for in-place updates. That is, it cannot simply overwrite existing data with new data. The new data are written to an erased area only (out-of-place update), and the old data are invalidated for reclamation in the future. This out-of-place update causes the coexistence of invalid (i.e. outdated) and valid data in the same block. “Garbage collection,” as is well known to those in the art, is a process for reclaiming the space occupied by invalid data, in which valid data is moved to a new block and the old block is erased. Garbage collection generally and undesirably results in significant performance overhead as well as unpredictable operational latency.
As mentioned above, flash memory blocks can be erased for a limited number of times. Wear leveling is the process commonly employed to improve flash memory life time by evenly distributing erases over the entire flash memory (within a band). A typical multi-level cell (MLC) NAND flash manufactured using the 25 nm technology has a program/erase (PE) cycle in the range of 1500 to 3000 cycles. It requires erasing prior to being programmed with a typical erasure time or duration of approximately 10 ms and a programming time for writing a 4 to 8 KB page being approximately 1 to 2 ms.
Moreover, NAND flash memory is organized in large page sizes of 8 KB and 16 KB and block sizes of 512 KB to 1 MB. The large page size attribute of flash memory makes it undesirable for small I/O operations since the whole page has to be programmed in its entirety. Programming a partial page requires merging of the existing data on the page with the new data and writing it to a new page. The old page will no longer contain valid data and has to be reclaimed eventually. Since the data corresponding to the same logical address is written to a different physical address, the controller has to also maintain a table that maps the logical address to the physical address.
NAND flash memory, despite all its deficiencies, is nevertheless the preferred medium of choice for solid state mass storage devices because of its capacity to save large amounts of data at reasonable prices.
As such, to enhance user experience while maintaining cost effectiveness, it is best to complement NAND flash memory with a byte-addressable persistent memory having higher performance, reliability, and endurance, such as magnetic random access memory (MRAM), in the same mass storage device. Unlike NAND flash memory, each byte of data stored in MRAM may be independently read or programmed. This allows the controller to optimize its performance, reliability, and user experience by using the higher grade MRAM to store its critical data and host system data and using the NAND flash memory to store host non-critical data.
The controller may divide the MRAM array of the mass storage device into a number of partitions and assign them to its private area or user area and utilize them accordingly.
What is needed is a storage device that takes advantage of the use of different types of memories, such as NAND and MRAM, and is reliable, efficient, yet cost-effective.
To overcome the limitations in the prior art described above and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a storage device that incorporates therein block-addressable persistent memory, such as NAND flash memory, and byte-addressable persistent memory, such as MRAM, and methods for using the storage device.
Briefly, the storage device includes a storage media that comprises one or more byte-addressable persistent memory devices, one or more block-addressable persistent memory devices, a hybrid reserved area spanning at least a portion of the one or more byte-addressable persistent memory devices, and a hybrid user area spanning at least a portion of the one or more block-addressable persistent memory devices. The controller uses the hybrid reserved area to store private data. The storage media further includes a controller coupled to the one or more byte-addressable persistent memory devices and the one or more block-addressable persistent memory devices through a high speed interface that operates in the full-duplex mode, such as a universal flash storage (UFS) interface. Each of the one or more byte-addressable persistent memory devices may include one or more magnetic random access memory (MRAM) arrays. Each of the one or more block-addressable persistent memory devices may include one or more NAND flash memory arrays.
The controller of the storage device may be connected to an external host through a host interface that operates in the full-duplex mode, such as a UFS interface. The controller may include one or more of the following circuits: a compression and decompression circuit for compressing and decompressing data, a data deduplication circuit for removing duplicate data, and a security circuit for encrypting and decrypting data.
These and other objects and advantages of the present invention will no doubt become apparent to those skilled in the art after having read the following detailed description of the preferred embodiments illustrated in the several figures of the drawings.
For purposes of clarity and brevity, like elements and components will bear the same designations and numbering throughout the Figures, which are not necessarily drawn to scale.
In the following description of the embodiments, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration of the specific embodiments in which the invention may be practiced. It is to be understood that other embodiments may be utilized because structural changes may be made without departing from the scope of the present invention.
Where reference is made herein to a method comprising two or more defined steps, the defined steps can be carried out in any order or simultaneously (except where the context excludes that possibility), and the method can include one or more other steps which are carried out before any of the defined steps, between two of the defined steps, or after all the defined steps (except where the context excludes that possibility).
As will become evident, in some embodiments of the invention, byte-addressable persistent memory, such as magnetic random access memory (MRAM), resistive random access memory (ReRAM), and phase change random access memory (PCRAM), and block-addressable persistent memory, such NAND flash memory, are combined in a mass storage device. Currently, MRAM devices are more costly than NAND flash memory devices and fail to provide the capacities that NAND flash memory devices offer. However, MRAM devices, which have better reliability and endurance, are much faster than NAND flash memory devices. As such, MRAM devices can be used by controllers to store their critical data requiring such attributes. NAND flash memory devices can provide large amount of storage at a lower cost and can be used by controllers for storing user data from hosts which require large amount of capacity with lower performance, reliability and endurance. Examples of critical data include controller's boot code, tables, data cache, host's file allocation table (FAT), directories, and so on and examples of non-critical data include pictures, movies, videos, and so on.
Byte-addressable persistent memory, such as MRAM, is typically more expensive than block-addressable persistent memory, such as NAND flash memory, but is much faster. MRAM has better reliability and endurance and can be used to store critical data requiring such attributes. On the other hand, NAND flash memory can provide large amounts of storage at a lower cost for storing user data, which requires larger capacity but may accommodate lower performance, reliability and endurance.
The storage media 18 is shown to include one or more block-addressable persistent memory devices 22 and one or more byte-addressable persistent memory devices 24. In the embodiment illustrated in
The hybrid reserved area 36 spans the MRAM devices 24 and the NAND flash memory devices 22 with the MRAM portion 36b being a portion of the MRAM devices 24 and the NAND portion 36a being a portion of the NAND flash memory devices 22. Similarly, the hybrid user area 30 spans the MRAM devices 24 and the NAND flash memory devices 22 with the MRAM portion 30b being a portion of the MRAM devices 24 and the NAND portion 30a being a portion of the NAND flash memory devices 22.
Alternatively, the hybrid reserved area 36 may be entirely a part of the MRAM portion 36b. Similarly, in alternative embodiments, the hybrid user area 30 is entirely a part of the MRAM portion 30b. In the case where both the hybrid reserved area 36 and the hybrid user area 30 are both entirely a part of the MRAM devices 24, there is no need for the NAND memory devices 22. Likewise, the hybrid user area 30 may reside entirely within the NAND flash memory devices 22.
The hybrid reserved area 36 is used to store information that is private data or data that is inaccessible to a user of the device 10. Examples of private data include boot code, system data, Meta data, and tables.
Based on a priory information regarding the identity of a host that is to use the device 10, the controller 14 advantageously decides to store host-provided and host-critical data in the MRAM portion 30b of the hybrid user area 30. An example of this is in the case of a file allocation table (FAT) file system, such as FAT16 or FAT 32, where the controller 14 stores the master boot record (MBR), partition boot record (PBR), FATS, and directories, all of which are frequently-accessed information and intended for lower logical block access (LBA) range of addresses, in the area 30b.
In the embodiment of
To simplify integration of MRAM and NAND flash into a single device, an MRAM device may require an interface that is compatible with the NAND flash interface. Furthermore, most of the existing embedded mass storage controllers such as USB, MMC, and SD only support memories with NAND flash interface without any modification to the controllers. Therefore, an MRAM device with a NAND flash interface can be readily integrated with an existing controller and NAND flash memory devices to create a mass storage device having different media types to address different system requirements.
The MRAM devices 24 will make up the very high performance and reliable portion of the memory media 18 of the storage device 10 and can be used by the controller 14 for storing data requiring such attributes. The NAND flash memory portion 22 of the memory media 18 can be used by the controller 14 for storing user area and data types that do not have such stringent requirements.
MRAM is fast and reliable and does not require erasure prior to being written with a new data. As such, management of data in the MRAM portion of the memory media 18 can be greatly simplified. The controller 14 will no longer have to perform garbage collections and mapping of that portion of the memory media 18 which will further improve the performance of the system utilizing these storage devices.
It would also improve the performance of small I/O operations since the data can be written over the existing data and thus eliminating the merge and eventual GC process.
Another advantage of having MRAM on the memory media is to store the metadata information. In most controller architecture, such as SATA and mSATA, an external DRAM with either DDR2 or DDR3 interface is used to store the metadata information to improve the system performance. Due to the nature of MRAM, the controller can use the MRAM portion of the memory media to store metadata information and eliminate the controller cost associated with DDR interface as well as the external DRAM component.
Other controllers such as USB and MMC/eMMC that typically do not require the external DRAM use NAND flash for storing the metadata information. These controllers can also use the MRAM portion of the memory media to further improve system performance.
MRAM having an interface compatible with NAND flash memory becomes transparent to the controllers already having the NAND interface and with minor modifications to the firmware in the areas of write, garbage collections, and metadata management due to the MRAM portion of the memory media, thereby substantially increasing the system performance.
While the use of MRAM having a NAND compatible interface may facilitate the integration the MRAM and NAND flash memory devices, alternative interfaces may be employed.
With continuing reference to
LPDDR, DDR, LPDDR2, DDR2, LPDDR3, DDR3, LPDDR4, DDR4, and so forth). Accordingly, each of the high speed interface circuits 15′, 26′, and 28′ may be a UFS interface circuit, a NVME interface circuit, or a DDR interface circuit. In an embodiment, the high speed interface circuits 26′ and 28′ are of the same type.
The storage device 11 of
The structures shown in
Command and data are received through the host interface 20 during write command operations. During read operations, command is received in a similar manner and data is received through the interface circuit 15/15′ from the storage media 18/18′. The CPU 152 processes the command received from an external host and configures the controller 14/14′ to either receive data from the host and write the data into the data buffer 156 or receive data from the storage media 18/18′ and write into the data buffer 156. In an alternative embodiment, the data from the host is compressed by the compression/decompression engine circuit 162 and encrypted by the security engine circuit 166 prior to being written to the data buffer 156 and/or saved in the storage media 18/18′. Similarly, the compressed and encrypted data stored in the storage media 18/18′ or the data buffer 156 will need to be decrypted by the security engine circuit 166 and decompressed by the compression/decompression engine circuit 162 before being transfer to the host through the host interface circuit 150 and the host interface 20. Moreover, data from the host may be examined by the data deduplication engine circuit 164 prior to being saved in the storage media 18/18′. The data deduplication engine circuit 164 examines an incoming data set or byte stream at the sub-level and sending/storing only unique data. Duplicate data are replaced with pointers to the first occurrence of the data in the deduplication process, thereby saving storage space in the storage media 18/18′.
The LUN manager 154 determines the source or destination of data based on the LUN configuration information set by the host and the controller. Depending on the destination of the data, during a write operation, either the NAND ECC 158 or the MRAM ECC 160 may encode the data that is to be saved in memory and the interface circuit 15/15′ couples the encoded data to the interface 16/16′. During a read operation, the encoded data is received by the interface circuit 15/15′, through the interface 16/16′, and it is decoded by either the NAND ECC 158 or the MRAM ECC 160 depending on the source of the data, and then placed in the data buffer 156 and provided to the host interface circuit 150 for coupling onto the host interface 20.
In some embodiments, the MRAM array 34 may not require the protection provided by the MRAM ECC 160 or the MRAM devices 24/24′ include the required protection and do not need an external circuitry. In yet another embodiment, the MRAM ECC 160 and the NAND ECC 158 may be combined into a single ECC engine and be configured according the memory array the data is intended for.
In operation, the host interface circuit 150 receives commands and data through the host interface 20 and provides the same to the LUN manager 154, under the control of the CPU 152. The LUN manager 154 processes the received information, which is further explained in the subsequent figures and discussion to follow. Upon processing the received information, the LUN manager 154 transmits the data to the data buffer 156 for storage. Depending upon the intended destination of the data, as determined by the LUN manager 154, the data may be transmitted to either the NAND ECC 158 or to the MRAM ECC 160. For example, if the LUN manager 154 decides that the data is suited for storage in the MRAM array 34 (shown in
Each of the ECCs 158 and 160 encodes the data using a syndrome, well known in the industry, except that the MRAM ECC 160 typically has a smaller syndrome and therefore results in a shorter overhead than the NAND ECC 158, which typically has a larger syndrome and overhead. In fact, a part of the appeal in using two separate ECCs for the NAND and MRAM data is to benefit from a shorter overhead associated with data intended for the MRAM array 34. Stated differently, if the NAND ECC 158 and the MRAM ECC 160 were combined into a single ECC, which is feasible and contemplated, the ECC syndrome would have to be large enough to accommodate the NAND ECC even though the MRAM ECC 160 needs an ECC syndrome that is a fraction of that of the NAND ECC 158. This results in wasted space in the MRAM array 34 since ECC bits are appended to the data when stored in the array.
In a method embodiment of the present invention, the data from the host may be compressed by the compression/decompression engine circuit 162, deduplicated by the data deduplication engine circuit 164, or encrypted by the security engine circuit 166 before being transmitted to the interface circuit 15/15′.
Referring now to
In another embodiment of this invention, the controller 14/14′ may also use the MRAM portion 36b to collect enough host data to perform a NAND flash full page program operation.
As is well known, in a NAND flash full page program operation, when host I/O operations are smaller than a page program unit of the NAND flash memory, a controller has to either perform partial page programming, which involves merging of the old data with the new data and is time consuming, or save the data in its volatile SRAM/DRAM buffer and wait for additional commands from the host until there is enough data to perform a page program operation. Meanwhile, the controller cannot send the command completion to the host since the host data has not yet written to a persistent media. The process of merging of the old data with the new data requires reading of the old data and appending the new data to the read old data and writing this, in its entirety, to another physical location within the NAND flash memory device, which is not only time consuming and affects the performance of the device but also increases the number of NAND flash program/erase operations and adversely affects the NAND flash reliability and endurance. Meanwhile, if the host wishes to read data that the controller 14/14′ has saved in the reserved area MRAM portion 36b but not yet moved to the hybrid user area 30, the controller 14/14′ knows to access this data only from the reserved area MRAM portion 36b. Thus, host data coherency is maintained.
The foregoing problem is minimized in the various embodiments of the invention by using the MRAM portion 36b for caching host data, which substantially improves command latency and system reliability particularly in systems with lots of small I/O operations because of the persistent characteristic and the byte-addressable nature of MRAM.
In some embodiments of the invention, as discussed and shown herein, MRAM memory is mapped into controller's reserved area and provide very high performance and reliable media for controller's critical parameters requiring such characteristics. NAND flash memory can also be mapped into user area and be used for user data and data types that do not such stringent requirements. A combination of MRAM and NAND flash memories can also be mapped into a hybrid user area and hybrid reserved area and be used for systems that only require high reliability and performance for some of the data being stored on them. The controller will choose the media type for storing its parameters and host data based on their attributes.
Next, at step 106, a determination is made by the controller 14/14′ as to whether or not available space remains in the LUN that the user data was intended for. If not, the process continues to step 112 where space in the intended LUN is freed up by the controller 14/14′ by performing garbage collection, and if so, the process moves onto the step 108.
At step 108, user data is moved from the MRAM portion 36b to the intended LUN and the pointer of step 104 is re-adjusted to point to the location in the LUN where the user data has been moved to, and the process ends at step 110.
If the host write command is not a full-flash page, the process continues to step 128 where the user data is written to the reserved area MRAM portion 36b and a command complete is sent to a host, by the controller 14/14′, such as done at step 102 of
Next, at step 130, a determination is made as to whether or not enough data has been collected in the reserved area MRAM portion for a full-page operation. If so, user data is moved from the MRAM portion 36b to the intended LUN and the pointer of step 128 is re-adjusted to point to a location in the LUN where the user data has been moved to, and the process ends at step 134. If there is not enough data for a full-page operation, the controller waits for the next write command from the host at step 122.
Although the present invention has been described in terms of specific embodiments, it is anticipated that alterations and modifications thereof will no doubt become apparent to those skilled in the art. It is therefore intended that the following claims be interpreted as covering all such alterations and modification as fall within the true spirit and scope of the invention.
The present application is a continuation-in-part of the commonly assigned application bearing Ser. No. 15/094,844 filed on Apr. 8, 2016 and entitled “Management of Memory Array with Magnetic Random Access Memory (MRAM),” which is a continuation of the commonly assigned application bearing Ser. No. 14/109,914 filed on Dec. 17, 2013 and entitled “Management of Memory Array with Magnetic Random Access Memory (MRAM),” which is a continuation of the commonly assigned application bearing Ser. No. 13/902,650 filed on May 24, 2013 and entitled “Management of Memory Array with Magnetic Random Access Memory (MRAM),” which is a continuation of the commonly assigned application bearing Ser. No. 13/708,582 filed on Dec. 7, 2012 and entitled “Host-Managed Logical Mass Storage Device Using Magnetic Random Access Memory (MRAM),” which is a continuation-in-part of the commonly assigned application bearing Ser. No. 13/679,739 filed on Nov. 16, 2012 and entitled “Host-Managed Logical Mass Storage Device Using Magnetic Random Access Memory (MRAM).” Each of the applications is incorporated herein by reference in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
5778418 | Auclair et al. | Jul 1998 | A |
9311232 | Asnaashari | Apr 2016 | B2 |
9652386 | Asnaashari | May 2017 | B2 |
20050251617 | Sinclair | Nov 2005 | A1 |
20090046501 | Ranjan | Feb 2009 | A1 |
20090240873 | Yu | Sep 2009 | A1 |
20130019058 | Caraccip et al. | Jan 2013 | A1 |
20130151761 | Kim et al. | Jun 2013 | A1 |
Number | Date | Country |
---|---|---|
2008000088 | Jan 2008 | WO |
Number | Date | Country | |
---|---|---|---|
20170131943 A1 | May 2017 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14109914 | Dec 2013 | US |
Child | 15094844 | US | |
Parent | 13902650 | May 2013 | US |
Child | 14109914 | US | |
Parent | 13708582 | Dec 2012 | US |
Child | 13902650 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15094844 | Apr 2016 | US |
Child | 15411913 | US | |
Parent | 13679739 | Nov 2012 | US |
Child | 13708582 | US |