Solid-state storage drives allow for very fast read-write times to a solid-state storage media. Processing speeds on a controller in the solid-state drive can therefore have a noticeable impact on read-write throughput. Solid-state drives must also maintain data coherency within a solid-state storage system. If the solid-state storage system loses power suddenly, it must be able to recover to a usable state and be able to maintain, for example, which portions of memory are safe to write to and which are currently being written by write processes.
Systems and methods which embody the various features of the invention will now be described with reference to the following drawings, in which:
While certain embodiments of the inventions are described, these embodiments are presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made without departing from the spirit of the inventions.
System Overview
Embodiments of the invention are directed to systems and methods for reducing read-write delays by a controller on a non-volatile storage system while maintaining a record of system activity in non-volatile memory for recovery purposes. In embodiments, the record of system activity can be used to restore system status and maintain coherency in the event of a power loss.
As used in this application, “non-volatile memory” typically refers to solid-state memory such as NAND flash. However, the systems and methods of this disclosure may also be useful in more conventional hard drives and hybrid drives including both solid-state and hard drive components. As such, while certain internal operations are referred to which typically are associated with solid-state drives, such as “wear leveling” and “garbage collection,” analogous operations for hard drives can also take advantage of this disclosure.
In this disclosure, the term “superblock” is defined as a group of addresses on non-volatile storage media. This grouping of addresses can refer broadly to any method of grouping addresses together (e.g., page, blocks, etc.). In some embodiments, these groupings can include at least one block of write addresses from a plurality of dies in non-volatile storage media. In some embodiments, these groupings can be used by a controller to efficiently organize data access operations and manage the non-volatile storage system.
Referring to
Media access requests can be sent from the user data manager 111 or internal operations manager 113 to the media access request executor 114 for execution on non-volatile memory arrays 120. In one embodiment, the media access request executor 114 schedules command execution on the non-volatile memory arrays and is responsible for any remaining translation tasks to execute a command on blocks of memory in the non-volatile memory arrays 120. When the user data manager 111 or internal operations manager 113 perform a write command, the write command may be executed on a superblock designated for the next writes for the write command. Each superblock may designate a selection of blocks from a plurality of physical dies on the non-volatile memory array for write commands. During operation of the controller 110, each write entity, such as the user data manager 111 and internal operations manager 113, may have associated with it a running process that is assigned a superblock. As each process completes writing to addresses in its assigned superblock, it may transition to another superblock to continue writing to the non-volatile memory arrays 120.
The master record 112 can maintain the status of operations within the controller 110. For example, the master record 112 can maintain the superblock(s) assigned to each write process. In one embodiment, the master record 112 resides in volatile memory. Therefore, in an embodiment the master record 112 may be periodically flushed (e.g., by the controller or a write process executed on the controller, via a write command to the media access request executor 114) so that its information is saved to the non-volatile memory arrays 120. In one embodiment, the information kept in the master record 112 should be sufficient such that in the event of a power loss, the system can recover an operating state while maintaining data coherency.
Record Processing
The flowchart shown in
Pre-Allocation of Superblocks
While the waiting in block 250 ensures proper data recovery, the wait time incurred while flushing increases system overhead and reduces performance. The description and referenced figures below describe embodiments that eliminate or reduce the waiting while the master record is flushed. The elimination of the wait is made possible in one embodiment by a master record configuration involving the pre-allocation and tracking of groups of write addresses, as shown in
In this embodiment, superblocks are pre-allocated to a write process prior to the write process completing writes to the current superblock. In this way, the record reflects the future selection to be written by the write process. Pre-allocating a future superblock to a write process in the master record has several benefits. Upon reaching the end of the current superblock, the write process can immediately write to the next superblock and does not need to wait for the allocation of a new superblock before continuing to write, if the power is lost after the write process has begun writing to the next superblock but before the master record is updated and flushed to non-volatile memory, the master record can recover the system status and determine where the write process last wrote by referencing the current and next superblocks. Also, in one embodiment, the controller is configured to periodically flush the master record to the non-volatile memory independent of whether a write process has reached into a new superblock. In an embodiment, the master record is periodically flushed at a higher frequency than the occurrence of a process finishing up writing a new superblock. This enables the elimination of the above-referenced wait time, as will be further illustrated below by the processes depicted in
Referring to
As shown in
Thus, through the pre-allocation scheme described above, embodiments of the invention eliminate the delay associated with waiting for the flushing of the master record while maintaining the power-safe property guaranteed by the flushing of the master record to the non-volatile memory. As discussed above, in an embodiment a ready-to-be-written superblock is automatically pre-allocated for each performance critical write process/thread (such as that from the user data manger or for garbage collection). In an embodiment, for these threads/processes, at any given time inside master record, one superblock is designated as the “current” superblock and an additional one is designated “next” so it will be written to when the “current” one is full. In an embodiment, the pre-allocation of these blocks of addresses for these performance critical threads are done automatically, so that as soon as writes from a “current” superblock overflow to a “next” superblock, a new “next” superblock will be allocated and chained after the old “next” superblock that has just been designated “current.”
One advantage of various embodiments of the invention is that the performance sensitive threads do not need to wait for the master record to be flushed, as the master record is guaranteed to be flushed before “next” superblock information is discarded, and thus is definitely power-safe. This is because, in various embodiments, a superblock includes thousands of pages and the master record is scheduled to be flushed periodically once several dozens or so operations are completed. The master record can be scheduled to flush by setting a flag when the master record is modified. In some embodiments, a flush can immediately be scheduled by placing the master record in a write execution queue. In these embodiments, the other write requests in the queue may correspond to writes designated for the “next” superblock (now “current” in the to-be-written master record). The queue in one embodiment has a queue depth of 32 and the master record is thus flushed after at most 31 other operations have been performed in the now “current” superblock. Since each superblock typically has thousands of pages in one embodiment, the master record flush will be completed before the operations fill the rest of the now “current” superblock. In other embodiments, the queue depth may be different, but the master record flush can be guaranteed to complete prior to another superblock rotation as long as the queue depth is configured to be less than the capacity of the superblock. For non-performance critical data, on the other hand, an embodiment is configured to be manually triggered to allocate a new superblock when one or more certain conditions are met.
Embodiments of the invention guarantee the storage system to be power-safe and ensure that for any permanent, irreversible media action (like writes and erases to the non-volatile memory), crucial recovery data will be kept around inside the master record until the media action is recognized to be completed successfully. The guarantee may be applicable to the following scenarios:
While certain embodiments of the inventions have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions. For example, those skilled in the art will appreciate that in various embodiments, the actual steps taken in the processes shown in
The present application claims the benefit of priority under 35 U.S.C. § 120 as a continuation of U.S. patent application Ser. No. 13/073,588 entitled “Power-Safe Data Management System,” filed on Mar. 28, 2011, the disclosure of which is hereby incorporated by reference in its entirety for all purposes.
Number | Name | Date | Kind |
---|---|---|---|
6170066 | See | Jan 2001 | B1 |
6311290 | Hasbun et al. | Oct 2001 | B1 |
6513095 | Tomori | Jan 2003 | B1 |
6856556 | Hajeck | Feb 2005 | B1 |
6970890 | Bruce et al. | Nov 2005 | B1 |
7126857 | Hajeck | Oct 2006 | B2 |
7313030 | Lohse et al. | Dec 2007 | B2 |
7430136 | Merry, Jr. et al. | Sep 2008 | B2 |
7447807 | Merry et al. | Nov 2008 | B1 |
7457910 | Chang et al. | Nov 2008 | B2 |
7472309 | Bangalore | Dec 2008 | B2 |
7502256 | Merry, Jr. et al. | Mar 2009 | B2 |
7509441 | Merry et al. | Mar 2009 | B1 |
7596643 | Merry, Jr. et al. | Sep 2009 | B2 |
7653778 | Merry, Jr. et al. | Jan 2010 | B2 |
7685337 | Merry, Jr. et al. | Mar 2010 | B2 |
7685338 | Merry, Jr. et al. | Mar 2010 | B2 |
7685374 | Diggs et al. | Mar 2010 | B2 |
7733712 | Walston et al. | Jun 2010 | B1 |
7765373 | Merry et al. | Jul 2010 | B1 |
7890529 | Srinivasan et al. | Feb 2011 | B1 |
7898855 | Merry, Jr. et al. | Mar 2011 | B2 |
7912991 | Merry et al. | Mar 2011 | B1 |
7936603 | Merry, Jr. et al. | May 2011 | B2 |
7962792 | Diggs et al. | Jun 2011 | B2 |
8078918 | Diggs et al. | Dec 2011 | B2 |
8090899 | Syu | Jan 2012 | B1 |
8095851 | Diggs et al. | Jan 2012 | B2 |
8108692 | Merry et al. | Jan 2012 | B1 |
8122185 | Merry, Jr. et al. | Feb 2012 | B2 |
8127048 | Merry et al. | Feb 2012 | B1 |
8135903 | Kan | Mar 2012 | B1 |
8151020 | Merry, Jr. et al. | Apr 2012 | B2 |
8161227 | Diggs et al. | Apr 2012 | B1 |
8166245 | Diggs et al. | Apr 2012 | B2 |
8243525 | Kan | Aug 2012 | B1 |
8254172 | Kan | Aug 2012 | B1 |
8261012 | Kan | Sep 2012 | B2 |
8296625 | Diggs et al. | Oct 2012 | B2 |
8312207 | Merry, Jr. et al. | Nov 2012 | B2 |
8316176 | Phan et al. | Nov 2012 | B1 |
8341339 | Boyle et al. | Dec 2012 | B1 |
8375151 | Kan | Feb 2013 | B1 |
8392635 | Booth et al. | Mar 2013 | B2 |
8397107 | Syu et al. | Mar 2013 | B1 |
8407449 | Colon et al. | Mar 2013 | B1 |
8423722 | Deforest et al. | Apr 2013 | B1 |
8433858 | Diggs et al. | Apr 2013 | B1 |
8443167 | Fallone et al. | May 2013 | B1 |
8447920 | Syu | May 2013 | B1 |
8458435 | Rainey, III et al. | Jun 2013 | B1 |
8478930 | Syu | Jul 2013 | B1 |
8489854 | Colon et al. | Jul 2013 | B1 |
8503237 | Horn | Aug 2013 | B1 |
8521972 | Boyle et al. | Aug 2013 | B1 |
8549236 | Diggs et al. | Oct 2013 | B2 |
8583835 | Kan | Nov 2013 | B1 |
8601311 | Horn | Dec 2013 | B2 |
8601313 | Horn | Dec 2013 | B1 |
8612669 | Syu et al. | Dec 2013 | B1 |
8612804 | Kang et al. | Dec 2013 | B1 |
8615681 | Horn | Dec 2013 | B2 |
8638602 | Horn | Jan 2014 | B1 |
8639872 | Boyle et al. | Jan 2014 | B1 |
8683113 | Abasto et al. | Mar 2014 | B2 |
8700834 | Horn et al. | Apr 2014 | B2 |
8700950 | Syu | Apr 2014 | B1 |
8700951 | Call et al. | Apr 2014 | B1 |
8706985 | Boyle et al. | Apr 2014 | B1 |
8707104 | Jean | Apr 2014 | B1 |
8745277 | Kan | Jun 2014 | B2 |
9268646 | Chiu et al. | Feb 2016 | B1 |
9361044 | Chiu et al. | Jun 2016 | B2 |
20040103238 | Avraham et al. | May 2004 | A1 |
20050144360 | Bennett et al. | Jun 2005 | A1 |
20060053139 | Marzinski et al. | Mar 2006 | A1 |
20070005928 | Trika et al. | Jan 2007 | A1 |
20070113029 | Bennett et al. | May 2007 | A1 |
20070156998 | Gorobets | Jul 2007 | A1 |
20070204128 | Lee et al. | Aug 2007 | A1 |
20080104308 | Mo et al. | May 2008 | A1 |
20080162786 | Shanmuganathan | Jul 2008 | A1 |
20080250223 | Torabi | Oct 2008 | A1 |
20080282025 | Biswas et al. | Nov 2008 | A1 |
20090150599 | Bennett | Jun 2009 | A1 |
20090172257 | Prins et al. | Jul 2009 | A1 |
20090271562 | Sinclair | Oct 2009 | A1 |
20090327589 | Moshayedi | Dec 2009 | A1 |
20100174849 | Walston et al. | Jul 2010 | A1 |
20100250793 | Syu | Sep 2010 | A1 |
20110072199 | Reiter et al. | Mar 2011 | A1 |
20110099323 | Syu | Apr 2011 | A1 |
20110283049 | Kang et al. | Nov 2011 | A1 |
20120254503 | Chiu et al. | Oct 2012 | A1 |
20120260020 | Suryabudi et al. | Oct 2012 | A1 |
20120278531 | Horn | Nov 2012 | A1 |
20120284460 | Guda | Nov 2012 | A1 |
20120324191 | Strange et al. | Dec 2012 | A1 |
20130132638 | Horn et al. | May 2013 | A1 |
20130145106 | Kan | Jun 2013 | A1 |
20130290793 | Booth et al. | Oct 2013 | A1 |
20140059405 | Syu et al. | Feb 2014 | A1 |
20140115427 | Lu | Apr 2014 | A1 |
20140133220 | Danilak et al. | May 2014 | A1 |
20140136753 | Tomlin et al. | May 2014 | A1 |
Number | Date | Country |
---|---|---|
1560224 | Aug 2005 | EP |
Entry |
---|
Kang et.al. “A Superblock-based Flash Translation Layer for NAND Flash Memory” Oct. 22-25, 2006, ACM. |
Number | Date | Country | |
---|---|---|---|
20160357670 A1 | Dec 2016 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13073588 | Mar 2011 | US |
Child | 15174955 | US |