Incrementally updating recovery mapping data for a memory system

By generating and updating recovery maps and periodically updating selected portions of memory snapshots, the problem of rapid recovery of memory systems under unexpected power loss events is solved, reducing processing resource consumption and media wear, and improving the reliability and efficiency of memory systems.

CN114402298BActive Publication Date: 2026-02-06MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080064823.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-09-16
Filing Date
2020-06-16
Publication Date
2026-02-06
Estimated Expiration
2040-06-16

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and efficiently restore memory states in memory systems, especially during unexpected power loss events, where conventional systems require significant processing resources and suffer from severe media wear.

Method used

By generating and updating recovery maps, including memory snapshots and log updates, and periodically updating selected portions of memory snapshots, the allocation of processing resources and media wear are reduced, ensuring rapid recovery of memory state.

Benefits of technology

It enables rapid memory state recovery in the event of unexpected power loss, reduces the consumption of processing resources and media wear, and improves the reliability and efficiency of the memory system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114402298B_ABST
    Figure CN114402298B_ABST
Patent Text Reader

Abstract

The present disclosure relates to systems, methods, and computer-readable media for generating and updating a recovery map that includes information that enables a computing device to recover a current state of memory. For example, the systems disclosed herein can iteratively update segments of memory snapshots corresponding to discrete portions of a memory system based on a recent state of the memory. Additionally, the systems disclosed herein can discard outdated segments of memory snapshots in addition to outdated log updates at incremental checkpoints that facilitate a gradual update process that can significantly reduce recovery time when experiencing an untimely power loss event. The systems described herein provide additional processing flexibility, reduce utilization of processing resources, and reduce media wear while achieving one or more benefits associated with efficient recovery of a current state of memory.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND

[0001] In recent years, the use of computing devices (e.g., mobile devices, personal computers, server devices, cloud computing systems) to receive, store, edit, transmit, or otherwise utilize digital data has dramatically increased. For example, individuals and businesses now commonly store large amounts of data on local computing devices and / or remote cloud computing systems. Indeed, as the demand for increased storage and memory capacity on computing devices has increased, technological innovations associated with storing and processing data have similarly improved and become more capable.

[0002] As the size and complexity of memory and storage capacity has increased, it has become increasingly difficult to ensure that any data that needs to be permanent but currently resides in volatile media (e.g., memory) has become increasingly difficult. For example, as memory capacity has increased, additional processing resources are often needed to capture and store a current state of the memory of a memory system. Additionally, in cases where a long period of time can pass between when a computing device captures and stores a snapshot representing the current state of the memory, additional time is often needed to recover the current state of the memory for which a large number of updates to the memory state have occurred. Moreover, while many conventional systems can reduce recovery time by simply capturing snapshots of the memory state at a higher frequency, capturing or otherwise generating snapshots of a memory system involves a large amount of processing resources and accelerates media wear over time.

[0003] These and other issues exist with respect to facilitating fast and efficient recovery of the memory state of a memory system. BRIEF DESCRIPTION OF DRAWINGS

[0004] Figure 1 FIGURE illustrates an example computing device having a memory recovery system implemented thereon, in accordance with one or more embodiments.

[0005] Figure 2 FIGURE illustrates an example workflow for generating and updating a recovery map, in accordance with one or more embodiments.

[0006] Figure 3 FIGURE illustrates an example timeline showing updates to a recovery map, in accordance with one or more embodiments.

[0007] Figure 4 FIGURE illustrates another example workflow for generating and updating a recovery map, in accordance with one or more embodiments.

[0008] Figures 5A to 5E FIGURE illustrates example updates to a recovery map at different checkpoints along an example timeline, in accordance with one or more embodiments.

[0009] Figure 6A series of example actions for generating and updating a recovery map is illustrated in accordance with one or more embodiments.

[0010] Figure 7 Another series of example actions for generating and updating a recovery map is illustrated in accordance with one or more embodiments.

[0011] Figure 8 Certain components that can be included within a computer system are illustrated. DETAILED DESCRIPTION

[0012] The present disclosure generally relates to a memory recovery system for generating and updating a recovery map that includes information that enables a computing device to recover a current state of memory of a memory system. In particular, as will be discussed in further detail below, the memory recovery system can maintain a recovery map that includes periodic updates of snapshots of memory states of the memory system and associated log updates that indicate changes in the memory states between a most recent update and a most current state. Using the updated recovery map and log updates, the memory recovery system is able to recover the current state of data at any time, such as in response to a power loss event (e.g., unplugging a plug, battery power loss, or other unplanned power loss event). As will be discussed below, the memory recovery system can implement the benefits described herein associated with periodic updates of portions of the recovery map in various ways.

[0013] As a first example, the memory recovery system can receive, generate, or otherwise identify a recovery map that includes a memory snapshot. The memory snapshot can include a representation of a memory state of a memory system (e.g., a memory component of a storage system of a computing device) at a particular point in time (e.g., a time of a most recent update or a time at which the memory snapshot was generated). The memory recovery system can also generate log updates associated with changes (e.g., writes) to the memory state over a duration of time and add the log updates to the recovery map. Based on a number of the log updates, the memory recovery system can periodically update the memory snapshot by generating updated portions of the memory snapshot to replace older or outdated portions or segments of the memory snapshot that are associated with corresponding portions of the memory system (e.g., a same range of logical block addresses (LBAs) or a physical region of memory hardware).

[0014] As another example, a memory recovery system can maintain a recovery map that includes a stream of snapshots. The stream of snapshots can include a plurality of segments that represent corresponding portions of memory states of the memory system. The memory recovery system can also generate log updates associated with changes to the state of the memory system and add the log updates to the recovery map. The memory recovery system can iteratively update segments of the stream of snapshots based on timed checkpoints to maintain the recovery map with a current representation of the memory states on the memory system. The memory recovery system can use the stream of snapshots in conjunction with a selective set of log updates to enable recovery of the current state of the memory at any time while limiting the time involved in recovering the current state of the memory.

[0015] As will be discussed in further detail below, the present disclosure includes several practical applications having the features and functionality described herein that provide benefits associated with maintaining a recovery map that enables a computing device to recover the current state of the memory at any time (e.g., in response to an unplanned power loss event) and / or solutions. It will be appreciated that the benefits described below are provided by way of example, and that other benefits and / or solutions to various problems associated with maintaining a recovery map can be similarly achieved using the features and functionality described herein.

[0016] For example, as will be discussed below, a memory recovery system can periodically update selected portions of a memory snapshot over time. By periodically updating selected portions of a memory snapshot, the memory recovery system can avoid scenarios in which the memory recovery has expended significant resources to generate a new snapshot of the memory system, only to experience a power loss event at an inopportune time (e.g., when the new snapshot is nearly complete). In such cases, the memory recovery system does not lose all progress, but rather only loses progress associated with the most recent segment or portion of the memory snapshot while still benefiting from previously updated portions of the recovery map.

[0017] Additionally, in one or more embodiments, a memory recovery system provides greater flexibility associated with utilization of processing resources in updating the recovery map. For example, because the memory recovery system periodically updates selected portions of the recovery map, the memory recovery system can reduce allocation of processing resources to maintain a current version of a memory snapshot. For example, by maintaining a stream of snapshots with periodic updates or by simply updating selected portions (e.g., subsets) of the recovery map, the memory recovery system can generate memory snapshots at a lower frequency than conventional memory systems while ensuring that recovery times do not exceed a desired time threshold.

[0018] By reducing the frequency at which the memory recovery system generates or updates the recovery map, the memory recovery system can also reduce media wear resulting from performing updates of the entire recovery map at a lower frequency than a regular system. For example, by updating selected portions of the recovery map, the memory recovery system can reduce the overall frequency at which the entire memory snapshot is updated. This reduces the number of times recovery data is written to the storage system, thereby reducing media wear associated with repeatedly writing and rewriting recovery data to the storage system.

[0019] As explained in the foregoing discussion, the present disclosure utilizes various terminology to describe features and advantages of the systems described herein. Additional details regarding the meaning of some of these terms are now provided. As used herein, a "memory system" can refer to any volatile or non-permanent memory of a computing device or system of a computing device. For example, in one or more embodiments, a memory system refers to any random access memory (RAM) that is available to a computing device to perform a read, write, or other action, such as storing memory that can be accessed by one or more processors (e.g., CPUs) of the computing device. The memory system can include various types of volatile memory, including, by way of example, dynamic RAM (DRAM), synchronous DRAM (SDRAM), static RAM (SRAM), or any other type of non-permanent memory. The memory system can be implemented on a personal computing device, such as a laptop or desktop computer, or alternatively, can refer to the memory of one or more server devices of a cloud computing system.

[0020] In one or more embodiments described herein, a memory system can include a "memory state." As used herein, a "memory state" can refer to the state of the memory at any point in time. The memory state can include any number of states of one or more memory elements (e.g., memory cells) within the memory system. The memory state can refer to the binary state of each of the memory elements of the memory system. Additionally, the memory state can include the combined memory state of multiple memory elements in various applications or on different types of memory hardware. In one or more embodiments, the memory state refers to the memory state of all elements of the memory system. Alternatively, in one or more embodiments described herein, the memory state can refer to the state of the memory elements corresponding to a particular portion or region of the memory elements (e.g., a range of LBAs or a selected portion of an array of memory elements).

[0021] As used herein, a "recovery map" refers to a representation of a memory state of a memory system. A recovery map can include a memory snapshot that includes a most recently captured representation of a memory state of a memory system. For example, a memory snapshot can refer to a most recently captured memory state and include any data to recreate or recover the memory state of the memory system as if the data existed at the point in time at which the memory snapshot was generated. In one or more embodiments, a recovery map can include a flash translation layer (FTL) map and log updates corresponding to a memory state of a memory system. For example, in one or more embodiments, a snapshot can refer to an FTL map. Alternatively, a recovery map can refer to any metadata block including a snapshot and a log scheme according to one or more embodiments described herein.

[0022] In one or more embodiments described herein, a memory snapshot includes discrete portions or segments that collectively constitute a representation of an entire memory system. The portions or segments can include representations of portions or segments of a memory state of a memory system that correspond to respective portions or regions of memory elements on the memory system. As will be discussed in further detail below, each of the snapshot portions can correspond to a different time at which the respective snapshot portion was generated. Thus, the multiple portions of a memory snapshot can include representations of memory states of different portions of a memory system as they existed at the times at which the snapshot portions were generated. For example, where a memory snapshot is divided into four snapshot portions, each of the snapshot portions can include representations of memory states of four corresponding portions of a memory system associated with four times at which the four snapshot portions were generated.

[0023] The portions of a memory snapshot can be divided in a number of ways. For example, a memory snapshot can include respective portions generated based on a number of changes (e.g., writes) made to a memory system. As another example, a memory snapshot can refer to a snapshot stream having snapshot segments divided based on a timing checkpoint. Indeed, a memory snapshot can include any number of portions generated at different frequencies according to one or more embodiments described herein. The following discussion is provided in connection with a memory snapshot including a number of snapshot portions generated based on a number of changes made to a memory system. Figures 2 to 5E Another detail is provided in connection with various examples.

[0024] In addition to the memory snapshot, the recovery map can include any number of log updates. As used herein, a log update can include any information associated with a change to the memory system. For example, a log update can include an indication of a write to the memory system, and can include the value of the write as well as a timestamp associated with when the write was implemented. In one or more examples described herein, the log updates provide any information to enable the memory recovery system to recreate the current state of the memory in view of the most recent memory snapshot. For example, upon experiencing an unexpected power loss of the computing device, the memory recovery system can restore the current state of the memory system by combining the most recent memory snapshot with any log updates from the recovery map to recreate the state of the memory snapshot at the time of the unexpected power loss. In one or more embodiments, the log updates refer to FTL journal pages associated with the corresponding FTL map. Alternatively, the log updates can refer to any data object that includes an indication of a change to the memory state of the corresponding memory block.

[0025] Additional details will now be provided regarding a memory recovery system for generating and updating portions of a recovery map to facilitate efficient and accurate recovery of the current state of memory on a computing device. For example, Figure 1 An example computing device 102 including a memory recovery system 104 implemented thereon is illustrated. As Figure 1 As shown in the example, the memory recovery system 104 includes a memory system 106 and state data 108. As mentioned above, the memory system 106 can refer to any volatile or non-persistent memory device(s) on the computing device 102 having associated state data 108, which can include any information associated with the memory state of the memory elements of the memory system 106. In one or more embodiments, the memory system 106 includes DRAM or other types of non-persistent memory.

[0026] The memory recovery system 104 can also include a memory monitor 110, a snapshot manager 112, a log manager 114, and a recovery manager 116. As further shown, the memory recovery system 104 can include a storage system 118, which can include any non-volatile or persistent disk storage, and can include any type of non-volatile or persistent storage element, such as a NAND storage device, a flash storage device, an SSD device, or any other similar type of storage element. As will be discussed in further detail below, the storage system 118 can include a recovery map 120 stored thereon. The recovery map 120 can include any information to enable the memory recovery system 104 to recover the current state of the memory of the memory system 106. As Figure 1As shown in FIG. 1, the recovery map 120 can include a memory snapshot 122, which can include a plurality of snapshot segments 124 or other discrete portions of the memory snapshot 122. The recovery map can also include a plurality of log updates 126 and timing data 128. The timing data 128 can include data indicating times at which the snapshot segments 124 and log updates 126 of the memory snapshot 122 were initiated or otherwise generated. In particular, as will be described below, the snapshot manager 112 and the log manager 114 can indicate times at which the snapshot segments 124 and / or log updates 126 were generated (or, initiated).

[0027] The computing device 102 can refer to various types of computing devices. For example, the computing device 102 can refer to a server device, such as a server node or node system on a network of interconnected server devices (e.g., a cloud computing system). Additionally or alternatively, the computing device 102 can refer to a mobile device, such as a mobile phone, a smart phone, a personal digital assistant (PDA), a tablet, a laptop, or a wearable computing device (e.g., a headset or a smart watch). The computing device 102 can also include one or more non-mobile devices, such as a desktop computer, a server, or other non-portable device. The computing device 102 can include additional features and functionality described below in connection with Figure 8

[0028] Figure 1 FIG. 1 illustrates an example embodiment in which the memory recovery system 104 and associated components are implemented on a single computing device 102. For example, the memory recovery system 104 can be implemented on a single server device or personal computing device having the memory system 106 and the storage system 118 implemented thereon. Alternatively, one or more components of the memory recovery system 104 can be implemented on multiple devices. For example, in one or more embodiments, the memory recovery system 104 includes the memory system 106 implemented on a first device, while one or more of the components 110-116 and / or the storage system 118 are implemented on a second device (or, multiple devices).

[0029] In one or more embodiments, each of the components of the memory recovery system 104 communicate with one another using any suitable communication technique. Additionally, the components of the memory recovery system 104 can communicate with other devices. It will be understood that while the components of the memory recovery system 104 are shown as being separate in Figure 1 The components of the memory recovery system 104 shown in FIG. 1 are shown as being separate in Figure 1 Any of the sub-components can be combined into fewer components (such as into a single component) or divided into more components as can serve a particular embodiment.

[0030] ​Components of the memory recovery system 104 (e.g., 106 to 118) may include software, hardware, or both. For example, components of the memory recovery system 104 may include one or more instructions stored on a computer-readable storage medium and executable by a processor of one or more computing devices. The computer-executable instructions of the memory recovery system 104, when executed by one or more processors, may cause the computing device 102 to perform the methods described herein. Alternatively, components of the memory recovery system 104 may include hardware (such as a dedicated processing device) to perform a particular function or group of functions. Additionally or alternatively, components of the memory recovery system 104 may include a combination of computer-executable instructions and hardware.

[0031] According to one or more embodiments discussed above, memory recovery system 104 may generate and periodically update recovery map 120, which includes a representation of state data 108 on memory system 106. For example, memory monitor 110 may monitor state data 108 to track any writes or other modifications to state data 108 that change the memory state of memory system 106. This may include tracking any number of reads, writes, or other actions performed by computing device 102 that affect or change the state data 108 of memory system 106. Additionally, memory monitor 110 may track and record or otherwise indicate the timing of any reads, writes, or other actions performed by computing device 102. Memory monitor 110 may provide corresponding timing information to memory system 118 and / or write timing information itself to the memory of memory system 106.

[0032] like Figure 1 As shown and will be discussed in further detail below, the memory recovery system 104 includes a snapshot manager 112. The snapshot manager 112 can capture a memory snapshot 122 at any point in time, which represents the current state of the memory of the memory system 106 (e.g., the current state of state data). The snapshot manager 112 can capture a memory snapshot 122 representing an initial memory state (e.g., when the computing device 102 is turned on or started). In one or more embodiments, the snapshot manager 112 captures a memory snapshot 122 representing a final memory state corresponding to the state of the memory when the computing device 102 is powered off (e.g., a planned shutdown) or when it experiences a planned power-loss event (e.g., an event that provides sufficient time to generate an up-to-date snapshot and deliver it to the storage system 118).

[0033] In addition to capturing a memory snapshot 122 that represents the entire allocation of memory of the memory system 106, the snapshot manager 112 can also periodically update discrete portions (e.g., subsets) of the memory snapshot 122. For example, in one or more embodiments, the snapshot manager 112 identifies discrete portions of memory from the memory system 106, such as discrete ranges of LBAs, physical regions from memory elements of the memory system 106, or other definable portions of the memory system 106 that the snapshot manager 122 can use to capture or otherwise generate snapshots (e.g., snapshot segments) for respective subsets of the memory system 106.

[0034] After identifying the portions of the memory system 106, the snapshot manager 112 can generate snapshot updates for respective portions of the memory system 106. For example, in one or more implementations, the snapshot manager 112 selectively updates the memory snapshot 122 by identifying state data 108 for particular portions of the memory system 106 and updating snapshot segments for the identified portion(s) of the memory system 106. As will be discussed in further detail below, the snapshot manager 112 can selectively update the memory snapshot 122 by generating updated snapshot segments that represent the state of memory for portions of the memory system 106 that have been least recently updated relative to other portions of the memory snapshot 122. Figures 2 to 3 As discussed in further detail below, the snapshot manager 112 can update selective segments or portions of the memory snapshot 122 by generating updated snapshot segments that represent the state of memory for portions of the memory system 106 that have been least recently updated relative to other portions of the memory snapshot 122.

[0035] In one or more embodiments, the memory snapshot 122 includes a snapshot stream with snapshot segments 124 that are updated at periodic or aperiodic timing checkpoints. In one or more embodiments, the snapshot manager 112 continuously updates the snapshot segments 124 over a period of time between two subsequent checkpoints and discards the least recent snapshot segment at each checkpoint that corresponds to the same portion of the memory system 106 as the most recently updated snapshot segment. As discussed in further detail below, the snapshot manager 112 can selectively update the snapshot segments 124 based on detected changes in the state data 108. Figures 4 to 5E Another detail is discussed below in connection with generating and updating the memory snapshot 122 that includes a snapshot stream.

[0036] As further shown, the memory recovery system 104 can include a log manager 114. As discussed above, the recovery map 120 can include a number of log updates 126 that correspond to changes in the state data 108 between a time at which the memory snapshot 122 (e.g., particular portions of the memory snapshot 122) has been updated and a current time. For example, based on detected changes in the state data 108, the log manager 114 can generate a log update that indicates a change in the state of memory for one or more memory elements of the memory system 106 and an associated timing of the change. As discussed in further detail below, the log manager 114 can selectively update the recovery map 120 based on the detected changes in the state data 108.Figure 1 As shown in FIG. 1, the log manager 114 can store associated timing data 128 (e.g., timestamps) associated with each log update within the recovery map 120. The timing of the log updates can be stored within the timing data 128 along with a timestamp for each of the plurality of snapshot segments 124, the timestamp indicating a time at which each snapshot segment was initiated or otherwise generated.

[0037] As mentioned above, the information from the recovery map 120 can be utilized by the memory recovery system 104 to recover a most recent state of the memory of the memory system 106. In particular, as shown in FIG. 1, the memory recovery system 104 can include a recovery manager 116 configured to recover a memory state at any particular point in time. For example, the recovery manager 116 can reconstruct state data as if the state data existed at a certain point in time, such as at the time of an unexpected power loss of the computing device 102. In one or more embodiments, the recovery manager 116 recovers the memory state by identifying a most recent or updated memory snapshot 122. Additionally, the recovery manager 116 can modify data indicated within the most recent memory snapshot 122 by applying each of the log updates 126 to the memory snapshot 122. In one or more implementations, the recovery manager 116 can iteratively apply each of the log updates 126 included within the recovery map 120 having a timing data 128 (e.g., timestamp) up to a time of a power loss event (or, other event) or a time prompting recovery of a given memory state of the memory system 106. Figure 1

[0038] Figure 2 An example workflow 200 is provided in accordance with one or more embodiments described herein, the example workflow 200 indicating a series of actions for maintaining an updated recovery map 120. As shown in FIG. 2, the memory recovery system 104 can perform an action 202 of receiving a memory snapshot associated with a memory state on the memory system 106. For example, the memory recovery system 104 can capture an initial memory snapshot 122 (e.g., at the time of turning on the computing device 102). In one or more embodiments, the memory recovery system 104 receives a previously generated snapshot representing a current or most recent state of the memory on the memory system 106. As an example, in the case that the memory recovery system 104 generates a memory snapshot 122 prior to powering off the computing device 102 (e.g., a scheduled power off), the memory recovery system 104 can receive the most recent memory snapshot 122 at the time of powering on the computing device 102. Figure 2

[0039] As shown in FIG. 2, the memory recovery system 104 can perform an action 204 of receiving a log update associated with a change to the memory state on the memory system 106. For example, the memory recovery system 104 can receive a log update 126 (e.g., at the time of turning on the computing device 102). In one or more embodiments, the memory recovery system 104 receives a log update 126 representing a change to the memory on the memory system 106. As an example, in the case that the memory recovery system 104 receives a log update 126 prior to powering off the computing device 102 (e.g., a scheduled power off), the memory recovery system 104 can receive the log update 126 at the time of powering on the computing device 102. Figure 2 ​​As further illustrated, the memory recovery system 104 can perform an act 204 of monitoring memory activity to detect writes (or, other changes) on the memory system 106. The memory recovery system 104 can monitor any type of activity on the memory system 106, such as reads, writes, accesses, or any other activity that affects the current state of the state data 108 on the memory system 106.

[0040] In response to detecting any changes to the state data 108, the memory recovery system 104 can perform an act 206 of generating a log update for the detected write (or, other change) to the memory system 106. As mentioned above, the memory recovery system 104 can generate one or more log updates for each write to the memory system 106. Each of the log updates can include any information needed for the memory recovery system 104 to determine the current state of the state data 108 between the time that the most recent memory snapshot 122 was captured (e.g., the time that the most recent update to one or more snapshot segments 124 was performed) and the current time. Additionally, each of the log updates can include a timestamp or other timing information 128 to indicate the time that the log update was created and / or the time that the detected write on the memory system 106 occurred.

[0041] Additionally, the memory recovery system 104 can perform an act 208 of determining whether to update the memory snapshot 122. The memory recovery system 104 can determine whether to update the memory snapshot 122 based on several factors. In one or more embodiments, the memory recovery system 104 determines to update the memory snapshot 122 based on the time period that has passed between subsequent updates. In one or more embodiments, the memory recovery system 104 determines to update the memory snapshot 122 based on a received input or a request to generate an updated memory snapshot 122.

[0042] In one or more embodiments, the memory recovery system 104 determines to update the memory snapshot 122 based on the number of log updates that have been generated and added to the recovery map 120. For example, to ensure that the memory recovery system 104 is able to recover the current state within a threshold period of time, the memory recovery system 104 can determine to update the memory snapshot 122 to avoid having a threshold number of log updates 126 within the recovery map 120. Thus, the memory recovery system 104 can determine to update the memory snapshot 122 based on the total number of log updates 126 within the recovery map 120, or alternatively, based on the number of log updates 126 that have been generated and added to the recovery map 120 since the most recent update to the memory snapshot 122 was performed.

[0043] If memory recovery system 104 determines that memory snapshot 122 should not be updated, memory recovery system 104 can return to action 204 and also monitor memory activity of memory system 106. Alternatively, if memory recovery system 104 determines that memory snapshot 122 should be updated, memory recovery system 104 can perform action 210 to generate snapshot segments for the corresponding portion of memory system 106. Specifically, memory recovery system 104 may not update the entire memory snapshot 122, but may update a selected portion (e.g., a snapshot segment) corresponding to a subset of memory elements from memory system 106 (e.g., the range of LBAs, discrete regions of memory hardware).

[0044] In one or more embodiments, the memory recovery system 104 selectively updates snapshot segments corresponding to the least recently updated portion of memory snapshot 122. For example, the memory recovery system 104 may evaluate timing data 128 of a plurality of snapshot segments 124 to identify which snapshot segments 124 have been least recently updated. The memory recovery system can then selectively update one or more of the least recently updated snapshot segments by capturing the current state of the memory of the corresponding portion of memory system 106. The memory recovery system 104 may also update memory snapshot 122 by adding the updated snapshot segments to recovery map 120.

[0045] After generating or otherwise updating snapshot segments, memory recovery system 104 may also perform action 212 of discarding(multiple) old snapshot segments corresponding to portions of memory system 106 as(multiple) new snapshot segments that have been updated. Specifically, in response to generating one or more new snapshot segments, memory recovery system 104 may discard any number of outdated snapshot segments corresponding to(multiple) identical portions of memory system 106.

[0046] like Figure 2 As shown, the memory recovery system 104 can perform an action 214 to determine whether the recovery map 120 includes one or more outdated log updates. Specifically, the memory recovery system 104 can determine whether one or more log updates in the current log update set 126 in the recovery map 120 have timing data 128 (e.g., timestamps) that are date-preceding to the multiple outdated snapshot segments(s) discarded from the recovery map 120. While the recovery map 120 may include one or more outdated log updates discarded with each iteration of the memory snapshot 122, in one or more embodiments, the log update set 126 may be entirely current when performing the first iteration of the snapshot segment 124 update set, as combined with... Figure 3discussed by way of example. In this scenario (e.g., when the recovery map 120 does not include any outdated log updates), the memory recovery system 104 can return to monitor additional memory activity in conjunction with the memory system 106.

[0047] Alternatively, in response to determining that one or more outdated log updates exist within the memory map 120, the memory recovery system 104 can perform an action 216 of discarding the outdated log updates. For example, the memory recovery system 104 can remove from the recovery map 120 with the timing data 128 any log updates that are dated prior to the least recent snapshot segment discarded from the recovery map. In particular, as will be discussed by way of example below, the memory recovery system 104 can discard any log updates that include information captured or otherwise included within a current set of snapshot segments 124 within the most recent memory snapshot 122.

[0048] Figure 3 Example illustrations are provided in accordance with one or more embodiments described herein that incorporate features and functionality of iteratively updating the recovery map 120. In particular, Figure 3 An example memory snapshot (SSO) 302a at an initial time (to) is illustrated, which represents a state of the memory at the initial time (to). The initial memory snapshot (SSO) 302a can include snapshot segments SI, S2, and S3 corresponding to respective portions of the memory system 106. As further illustrated, the to map (e.g., a recovery map at the initial time (to)) includes the initial memory snapshot (SSO) 302a without log updates. As Figure 3 As illustrated in the middle, the memory recovery system 104 can receive or otherwise generate an initial recovery map (to map 308a) that represents a state of the memory on the memory system 106 at to.

[0049] Over time, the memory recovery system 104 can generate a first set of log updates 306a between to and ti. In accordance with the example discussed above, the memory recovery system 104 can continue to generate log updates until a first time (ti). For example, after the first set of log updates 306a exceeds a threshold number of updates and / or after a threshold duration of time has passed, the memory recovery system 104 can perform a first update of the recovery map 120. As Figure 3 As illustrated in the middle, the memory recovery system 104 can receive or otherwise generate an initial recovery map (to map 308a) that represents a state of the memory on the memory system 106 at to.

[0050] As further illustrated, the memory recovery system 104 can generate a first new segment (S1) 1 The new segment is appended to segments S2 and S3 to perform an update of the initial memory snapshot (SS0) 302a to generate a first updated memory snapshot (SS1) 302b. The memory recovery system 104 can then discard the first updated portion (S1) 304a of the first updated memory snapshot 302b, which is associated with the new segment (S1) from the memory of the memory system 106. 1 The same parts correspond. For example, Figure 3 As shown, the memory recovery system 104 can continue to generate a second set of log updates 306b and add log updates 306b to the recovery map. When the memory recovery system 104 determines that another iteration update of the recovery map will be performed, the memory recovery system 104 can generate any number of log updates up to the second time (t2).

[0051] like Figure 3 As shown, in addition to the first two log update sets 306a-b representing the update of memory system 106 between the initial time (t0) and the second time (t2), the t2 mapping 308c (e.g., the recovery mapping exactly before the second mapping update is initiated) also includes the t1 memory snapshot (SS1) 302b. In one or more embodiments, the duration between the initial time (t0) and the first time (t1) is the same as or substantially the same as the duration between the first time (t1) and the second time (t2). Alternatively, in one or more embodiments, the duration between different timings is based on the number of log updates that trigger the recovery mapping. Therefore, Figure 3 Each increment time shown can vary depending on the number and frequency of log updates.

[0052] like Figure 3 As shown, the memory recovery system 104 can continue to iteratively update the recovery map in incremental steps. For example, as Figure 3 As shown, when updating the memory snapshot at the second time (t2), the second updated memory snapshot (SS2) 302c may include the initial third segment (S3) and the updated first and second segments (S1). 1 and S2 1 The memory recovery system 104 can also discard an outdated second segment (S2), which corresponds to the newly added segment (S2) in the memory system 106. 1The same part. As further shown, the memory recovery system 104 can generate a third log update set 306c between a second time (t2) and a third time (t3) when the memory recovery system 104 determines that another update should be performed. Figure 3 As shown, at the third time (t3), the t3 mapping 308d may include a second updated memory snapshot (SS2) 302c and three log update sets 306a-c representing changes in the memory system between t0 and t3.

[0053] As further illustrated, the memory recovery system 104 can generate a snapshot portion S1 that includes the updated snapshot portion. 1 S2 1 and S2 1 The third updated memory snapshot (SS3) 302d is generated. When generating the third updated memory snapshot (SS3) 302d, the memory recovery system 104 may also discard outdated segments (S3) 304c, which are replaced by new segments representing the more current state of the same portion of memory in the memory system 106. The memory recovery system 104 may continue generating a fourth log update set 306d and adding it to the current version of the recovery map until a fourth time (t4) when the memory recovery system 104 determines to perform another iteration update of the memory snapshot.

[0054] like Figure 3 As shown, at the fourth time (t4) and before initiating a snapshot update, in addition to the first four log update sets 306a-d representing changes in the memory system 106 between the initial time (t0) and the fourth time (t4), the t4 mapping 308e also includes a third updated memory snapshot (SS3). The memory recovery system 104 can generate a snapshot including the snapshot segment S2. 1 S3 1 and S1 2 The fourth updated memory snapshot 302e is used to update the memory snapshot. The memory recovery system 104 can also discard currently outdated segments (S1). 1 )304d, this now obsolete segment (S1) 1 )304d represents the more current segment (S1) of the same part of the memory system 106, which is the more current memory state. 2 )replace.

[0055] At this time and as the memory map is iteratively updated, the memory recovery system 104 can begin discarding one or more outdated log updates from the recovery map. For example, prior to the fourth time (t4), none of the log updates are outdated, as none of the log updates predate the discarded snapshot segments 304a-d in time when the corresponding snapshot updates were initiated. However, upon generating (e.g., completing generation of) the fourth updated memory snapshot (SS4) 302e, the memory recovery system 104 can determine that the first set of log updates 306a is outdated, as each of the most recent snapshot segments S2 1 , S3 1 , and S1 2 each include memory state data 108 representing information contained within the first set of log updates 306a. Thus, at a fifth time, and after generating a fifth set of log updates 306e (and discarding outdated log updates having timestamps predating the first time (tl)), the recovery map 308f can include the fourth updated memory snapshot 302e and log updates between the first time (tl) and the fifth time (t5).

[0056] The features and functionalities described in connection with Figure 3 are provided by way of example, not limitation. For example, the memory recovery system 104 can perform any number of iterative updates to the recovery map involving updating memory snapshots and removing outdated log updates. Also, while Figure 3 three discrete portions of memory snapshots are shown, the memory recovery system 104 can include any number of snapshot segments. Also, the memory recovery system 104 can perform updates according to one or more embodiments described herein with different threshold numbers of log updates.

[0057] Figure 4 Another example implementation is illustrated, in which the memory recovery system 104 iteratively updates the recovery map according to similar principles discussed above in connection with one or more embodiments. In particular, Figure 4 An example workflow 400 is illustrated, which includes a series of actions for iteratively updating a stream of snapshots according to a number of checkpoints (e.g., timed checkpoints). In particular, Figure 4 An example is illustrated in which the memory recovery system 104 generates and updates a stream of snapshots, which can be continuously generated or updated over time at periodic time intervals. The stream of snapshots can refer to the example memory snapshots 122 discussed above in connection with one or more embodiments. While Figures 2 to 3 and Figures 4 to 5E are described as different examples, the above in connection with Figures 2 to 3The discussion of one or more of the features can be similarly applied to the combination of Figures 4 to 5E one or more embodiments described (and vice versa).

[0058] As Figure 4 shown in FIG. 4, the memory recovery system 104 can perform an act 402 of identifying checkpoint data for the snapshot stream. In one or more embodiments, the memory recovery system 104 determines a frequency at which to update the snapshot stream. For example, the memory recovery system 104 can determine a fixed interval at which the memory recovery system 104 updates a segment of the snapshot stream and discards one or more outdated log updates. Alternatively, the memory recovery system 104 can determine a threshold number of log updates between each iterative update of the snapshot stream.

[0059] The memory recovery system 104 can identify checkpoint data based on several considerations. For example, in one or more embodiments, the memory recovery system 104 determines a duration between checkpoints based on an amount of processing resources to be allocated for maintaining and updating the recovery map. For example, the memory recovery system 104 can determine a higher duration between checkpoints in order to use fewer processing resources of the computing device 102. Alternatively, the memory recovery system 104 can determine a lower duration between checkpoints to ensure that a time for recovering a current state of the memory system 106 can be completed within a threshold period of a recovery time. In one or more embodiments, the memory recovery system 104 identifies checkpoint data based on user-provided parameters (e.g., user settings) and / or based on available processing resources for the computing device 102 to perform various other tasks.

[0060] As Figure 4 shown in FIG. 4, the memory recovery system 104 can perform an act 404 of updating the snapshot stream based on a current state of the memory system 106. For example, the memory recovery system 104 can update the entire snapshot stream or a discrete segment of the snapshot stream to reflect the current state of the memory system 106. In the case that the computing device 102 has been recently opened, the memory recovery system 104 can update the snapshot stream by generating a new snapshot stream representing a current state of all memory of the memory system 106. Alternatively, in one or more embodiments, the memory recovery system 104 updates a least-recently updated portion of the snapshot stream to reflect a corresponding portion of the memory system 106, as discussed above in accordance with one or more embodiments.

[0061] The memory recovery system 104 can also perform an act 406 of generating log updates based on detected writes (or, other changes) to the memory system 106. This act 406 can be similar to the act 206 discussed above in connection with Figure 2 FIG. 2. For example, similar to the act 206, the memory recovery system 104 can generate a log update based on a detected write to the memory system 106. In one or more embodiments, the memory recovery system 104 generates a log update based on a detected write to the memory system 106 that is not reflected in the snapshot stream. For example, the memory recovery system 104 can generate a log update based on a detected write to the memory system 106 that is not reflected in the snapshot stream because the snapshot stream has not been updated since the write was made. Figure 2The memory recovery system 104 can monitor memory activity and generate one or more log updates in response to detecting each modification to the state of one or more memory elements of the memory system 106.

[0062] As shown in Figure 4 The memory recovery system 104 can perform the action 408 of detecting a checkpoint, as shown in FIG. 4. For example, the memory recovery system 104 can determine whether a threshold period of time has passed since a recent update of the snapshot stream was performed. Additionally or alternatively, the memory recovery system 104 can detect a checkpoint based on a number of recently generated log updates or based on a total number of log updates included within the recovery map.

[0063] In one or more embodiments, the memory recovery system 104 detects a checkpoint based on an estimated time taken by the memory recovery system 104 to recover a current state of the memory of the memory system 106. For example, where the computing device 102 includes high processing power (and is capable of processing log updates at a higher rate than devices with more limited processing power), the memory recovery system 104 can detect a checkpoint based on a larger number of log updates than other computing systems. Alternatively, where the computing device 102 has limited processing power and can take more time to reconstruct a current state of the memory for the memory system 106, the memory recovery system 104 can detect a checkpoint based on a smaller number of log updates than other computing systems. Also, the memory recovery system 104 can detect a checkpoint based on a size of the memory system 104 (e.g., a number of memory elements with corresponding memory states) and based on a time that the memory recovery system 104 can take to recover a current state of the memory system 106.

[0064] Where the memory recovery system 104 does not detect a checkpoint, the memory recovery system 104 can return to the action 404 of updating the snapshot stream based on a current state of the memory system 106. For example, the memory recovery system 104 can continue to update the recovery map to include recent log updates. Additionally, where the memory recovery system 104 is in the process of generating a segment of the snapshot stream, the memory recovery system 104 can continue to generate a new segment while also monitoring changes to the memory system 106. Additional details regarding generating a segment while processing log updates are discussed below with respect to FIG. 5. Figures 5A to 5E

[0065] ​Alternatively, in the event that the memory recovery system 104 detects a checkpoint, the memory recovery system 104 can perform an action 410 of discarding outdated segments of the snapshot screen based on the checkpoint. As noted above, in one or more embodiments, the memory recovery system 104 can gradually update segments of the snapshot stream by iteratively updating portions of the snapshot stream over time. In one or more embodiments, the memory recovery system 104 continually updates new portions (e.g., snapshot segments) of the snapshot stream associated with corresponding portions of the memory system 104 and then discards outdated segments corresponding to the same portions of the memory system 104. Thus, in one or more embodiments, the memory recovery system 104 can update the snapshot stream on a loop, which will be discussed below in connection with FIG. 4B. Figures 5A to 5E Further discussion is provided in detail.

[0066] In discarding outdated segments of the snapshot screen, additionally, the memory recovery system 104 can perform an action 412 of discarding log updates based on the checkpoint relative to a current replay window of the snapshot stream. For example, the memory recovery system 104 can discard any log updates outside of an active viewing window of the snapshot segments, which refers to a duration between a first checkpoint of the snapshot stream and a current time. Specifically, the memory recovery system 104 can discard any log updates having a timestamp that precedes the first checkpoint in date, which corresponds to a least-recent segment of the snapshot stream that has not yet been discarded from a current version of the snapshot stream. Further details are provided in connection with FIG. 4B. Figures 5A to 5E By way of example.

[0067] After discarding outdated segments of the snapshot screen and discarding any outdated log entries from the recovery map, the memory recovery system 104 can return to the action 404 of updating the snapshot stream based on a current state of the memory system 106. As will be discussed below, the memory recovery system 104 can iteratively update the snapshot stream and corresponding log entries of the recovery map by looping through the actions 404-412 any number of times until a power loss event or other event that causes the memory recovery system 104 to recover the current state of the memory system 106 is detected.

[0068] Figures 5A to 5E FIG. 4A illustrates an example implementation of a memory recovery system 104 that maintains and iteratively updates a snapshot stream, in accordance with one or more embodiments described herein. Specifically, Figures 5A to 5E FIG. 4B illustrates an example snapshot stream including two segments having a viewing window spanning two equally-spaced durations within two checkpoints. The illustration is provided by way of example and not limitation. It will be understood that the snapshot stream can include any number of segments corresponding to any number of checkpoints. Moreover, the segments can be associated with different durations or different numbers of log updates.

[0069] Figure 5A The diagram illustrates the initial snapshot stream 502a at the initial time (t0) (e.g., with...). Figure 5A The current time (t) shown in the example c (Correspondingly). The initial snapshot stream 502a includes a first segment (S1) and a second segment (S0), which include data corresponding to corresponding portions of the memory system 106. Each segment may refer to a portion of memory of the same size from the memory system 106. Alternatively, a segment may refer to two discrete portions of the memory system 106 with different sizes (e.g., different ranges of LBAs or different numbers of memory elements). In one or more embodiments, the initial snapshot stream 502a represents a snapshot stream initially generated by the memory recovery system 104 (e.g., when the device is turned on or when other events are triggered to capture a memory snapshot representing the entire memory system 106). Figure 5A As shown, t0 recovery mapping 504a includes the initial snapshot stream but does not include log updates.

[0070] As discussed above, memory recovery system 104 can continuously update portions of the snapshot stream over time. For example, upon hitting each checkpoint, memory recovery system 104 can initiate an update of the next segment of the snapshot stream and continue updating segments of the snapshot stream until the next checkpoint is hit. Thus, while segments may be associated with fixed portions of memory system 106, in one or more embodiments, memory recovery system 104 simply initiates an update of a portion of the snapshot stream and continues updating the snapshot stream by browsing rows, columns, or other portions of memory system 106 until the next checkpoint is hit. Memory recovery system 104 can then discard outdated portions of the snapshot stream (and associated log updates) based on the number of times memory system 104 is captured within the most recent segment of the snapshot stream.

[0071] Figure 5B The diagram illustrates the updated snapshot stream 502b, where the current time (t) c The first time (t1) corresponds to the first checkpoint. As discussed above, the memory recovery system 104 can perform the recovery at the initial time (t0) and the current time (t1). c Log update 508a is generated between t1 and t2, which includes any updates to memory system 106. In response to detecting a first checkpoint at t1, memory recovery system 104 can also discard a first obsolete segment (S1) 506a corresponding to a first portion of memory system 106 as a newly created first segment (S1). 1The snapshot stream 502b is updated using [a certain method / mechanism]. As mentioned above, the memory recovery system 104 can continuously update the snapshot stream 502b between the initial time (t0) and the first checkpoint (t1). Figure 5B As shown, the t1 recovery mapping 504b may include an updated snapshot 502b and a snapshot at the initial time (t0) and the current time (t1). c Log updates added between (corresponding to t1).

[0072] The memory recovery system 104 can continue to be updated, such as Figure 5C The snapshot stream shown. Specifically, Figure 5C The diagram illustrates another updated snapshot stream 502c, where the current time (t) c ) is the second time (t2) corresponding to the second checkpoint. For example... Figure 5C As shown, the snapshot stream includes a second updated segment (S2). 1 The second obsolete segment (S2) 506b removed from the snapshot stream based on the detection of the second checkpoint is replaced. As further shown, the memory recovery system 104 can generate a second log update set 508b between a first time (t1) and a second time (t2) corresponding to the first two checkpoints, which indicates a change in memory state. As further shown, the t2 recovery map 504c includes the updated snapshot stream 502c and the log update set between t0 and t2 (e.g., the current replay window of the snapshot stream).

[0073] As discussed herein, a "replay window" refers to the current extent of a snapshot segment, which includes information for restoring the current memory state of memory system 106. For example, a replay window may include an initial checkpoint corresponding to the current version of a snapshot stream included within the current version of the recovery map. (See figure...) Figures 5A to 5E As shown, the replay window can change at each subsequent checkpoint based on a portion of the snapshot stream being partially replaced by an updated portion. Further information is provided below by way of examples.

[0074] Figure 5D The diagram illustrates the current time (t) before the third checkpoint at the third time (t3). c Example implementation of ). Specifically, as shown above in combination with Figure 4 As discussed, the memory recovery system 104 can continue to update the recovery map 504d to reflect the current state of the memory in the memory system 106 until a subsequent checkpoint is detected. Therefore, the current version of the snapshot stream can refer to the version combined with the above. Figure 5C The same updated snapshot stream 502c discussed, in Figure 5C In the middle, the first paragraph of the second update (S1)2 It has been partially generated (or fully generated), but has not yet been added to the current version of the snapshot stream. However, as... Figure 5D As shown, the memory recovery system 104 can continue to generate additional log updates 512 to be included in the current version of the recovery map 504d before updating the snapshot stream, as will be combined below. Figure 5E The subject of discussion.

[0075] like Figure 5E As shown, the memory recovery system 104 can wait for the snapshot stream to be updated until the current time (t). c This corresponds to the third time (t3) associated with the third checkpoint. Upon detection of the third checkpoint, the memory recovery system 104 can update the recovery map 504e to include the updated snapshot stream 502d, which includes the first updated second segment (S2). 1 ) and the second updated first paragraph (S1) 2 ) to replace the now outdated first paragraph (S1) 1 )506c. The first paragraph after the second update (S1) 2 ) can be used with the memory system 106 and the obsolete first segment (S1) 1 The same parts of )506c are associated.

[0076] In addition to discarding obsolete segment 506c, the memory recovery system 104 may also discard one or more obsolete log updates 514. Specifically, as Figure 5E As shown, the memory recovery system 104 can discard any log updates outside the current replay window of the current snapshot stream 502d. Therefore, as Figure 5E As shown, the memory recovery system 104 can update the t3 recovery map 504e to include the updated memory stream 502d and discard outdated log updates 514 to include only those log updates between t1 and t3 (e.g., those log updates within the current replay window).

[0077] As described above Figures 5D to 5E The snapshot stream discussed may include the current replay window corresponding to the first current checkpoint of the current version of the snapshot stream stored in the recovery map and the current time (t) associated with the current state of the memory of the memory system 106. c For example, in Figure 5D In this context, the replay window can refer to the initial checkpoint (t). o (Refers to the least recent checkpoint of the updated snapshot stream 502c stored within the corresponding recovery map 504d) and the current time (t) cthe time period between the checkpoint and the current time (t c ). In this example, in response to the computing device 102 experiencing an unexpected power loss event, the memory recovery system 104 can recover the current state of the memory by identifying the current memory stream 502c (e.g., without considering the partially generated segment 510) and all log updates that began at the start of the recovery window (e.g., all log updates between t0and t c ). The memory recovery system 104 can then apply the identified log updates 508a-b, 512 to the updated snapshot stream 502c and recover the current state of the memory of the memory system 106.

[0078] As an example of a computing device 102 that is coupled Figure 5E to experience an unexpected power loss event at a third time (t3) (or, shortly after the memory map is updated), in addition to the log updates that began at the first time (tl) (rather than the initial time (to)), the memory recovery system 104 can also consider the snapshot stream from the tlcheckpoint to the current time (t c ) as will be discussed in connection with recovering the memory state at the current time (t c ) shown in Figure 5D .

[0079] By continuously updating the snapshot stream and periodically updating the corresponding recovery map at checkpoints as discussed in connection with FIG. Figures 5A to 5E , the memory recovery system 104 can avoid the scenario of losing all progress of a partially generated snapshot due to a power loss event as compared to conventional systems that respond to losing all progress of a partially generated memory snapshot at an unplanned power event. Indeed, although Figures 5A to 5E FIG. illustrates an example snapshot stream that includes only two segments, the memory recovery system 104 can perform periodic updates of the information contained in the current version of the recovery map based on more granular updates to the snapshot stream. In this way, the amount of progress lost due to an unexpected power loss event is limited to the time between checkpoints and the frequency and number of segments iteratively updated for the snapshot stream. Thus, as shown in the example of Figure 5D , only the most recent segment update can be lost in benefit of any segments included within the current replay window of the snapshot stream.

[0080] Turning now to Figures 6 to 7 , these figures illustrate example flow diagrams that include a series of actions for performing iterative updates of a recovery map that includes a plurality of snapshot segments and a current set of log updates. While Figures 6 to 7 illustrates actions in accordance with one or more embodiments, alternative embodiments can omit, add to, reorder, and / or modify any of the actions illustrated in Figures 6 to 7 in connection with the description of one or more embodiments. Moreover, although the actions are presented in the order that they are performed in the example of FIGS.Figures 6 to 7 One or more individual features and functionalities described by a single action or a series of actions can be similarly applied to other embodiments and examples described herein. Figures 6 to 7 The action can be performed as part of a method. Alternatively, a non-transient computer-readable medium can include instructions that, when executed by one or more processors, cause a computing device to perform... Figures 6 to 7 The system can perform the following actions. In other embodiments, the system can execute... Figures 6 to 7 The action.

[0081] Figure 6 The illustration depicts a series of example actions 600 for iteratively updating a recovery map according to one or more embodiments described herein. For example, the series of actions 600 may include an action 610 identifying a memory map that includes a memory snapshot representing the memory state of a memory system. For example, action 610 may include identifying a recovery map having a memory snapshot that includes a representation of the memory state of the memory system at a first time associated with when the memory snapshot was generated.

[0082] As further illustrated, a series of actions 600 may include action 620 of generating a log update associated with the change in memory state between a first time and a second time. For example, action 620 may include: generating a log update associated with the change in memory state between the first time and a second time after the memory snapshot is generated, and adding the log update to the recovery map.

[0083] As further illustrated, a series of actions 600 includes action 630 of updating the memory snapshot by generating an updated first portion of the memory snapshot corresponding to a portion of the memory system and replacing the old first portion of the memory snapshot corresponding to the same portion of the memory system. For example, based on the number of log updates generated between a first time and a second time, action 630 may include: generating an updated version of the memory snapshot. Generating an updated version of the memory snapshot may include: generating an updated first portion of the memory snapshot, the updated first portion including a representation of the memory state of the first portion of the memory system at the second time; and replacing the first portion of the memory snapshot associated with the first portion of the memory system with the updated first portion of the memory snapshot. The first portion of the memory system may include a subset of memory locations on the memory system, and wherein the first portion of the snapshot includes status data of logical block addresses (LBAs) corresponding to the subset of memory locations on the memory system.

[0084] In one or more embodiments, the series of actions 600 includes discarding any outdated log updates from the recovery map. For example, discarding any outdated log updates from the recovery map can include determining a time associated with generating the first portion of the memory snapshot and discarding one or more log updates associated with changes to the memory state of the memory system based on timestamps of the one or more log updates that precede in time the time associated with generating the first portion of the memory snapshot.

[0085] In one or more embodiments, the series of actions 600 can include generating an additional log update associated with a change to the memory state between the second time and the third time and adding the additional log update to the recovery map. The series of actions 600 can also include generating a second updated version of the memory snapshot. Generating the second updated version of the memory snapshot can include generating an updated second portion of the memory snapshot that includes a representation of the memory state of the second portion of the memory system at the third time and replacing the second portion of the memory snapshot associated with the second portion of the memory system with the updated second portion of the memory snapshot.

[0086] The first portion of the memory snapshot and the second portion of the memory snapshot can be complete representations of the memory state at the times associated with generating the first portion of the memory snapshot and the second portion of the memory snapshot. Further, generating the updated second portion of the memory snapshot also includes discarding any log updates having an associated timestamp that precedes in time a first time associated with when the memory snapshot was generated from the recovery map.

[0087] In one or more embodiments, generating the updated version of the memory snapshot includes initiating generation of the updated version of the memory snapshot in response to detecting a threshold number of writes to the memory system. Further, in one or more embodiments, a duration of time between the first time and the second time is based on a duration of time for which the threshold number of writes to the memory system is detected.

[0088] In one or more embodiments, the series of acts 600 includes detecting a power loss event (e.g., an unplanned power loss event). The series of acts 600 can also include restoring a current state of the memory system at the power loss event based on the updated version of the memory snapshot and the log updates from the recovery map. In one or more embodiments, the memory system includes a volatile storage medium of a computing device. Further, the series of acts 600 can include storing the recovery map on a non-volatile storage medium of the computing device. In one or more implementations, the volatile storage medium includes dynamic random access memory (DRAM) and the non-volatile storage medium includes one or more solid state drives (SSDs).

[0089] Figure 7 Another example series of acts 700 for iteratively updating a recovery map is illustrated in accordance with one or more embodiments described herein. For example, the series of acts 700 includes an act 710 of identifying a memory map including a snapshot stream and having a plurality of snapshot segments representing a plurality of portions of a memory state of a memory system. For example, the act 710 can include identifying a recovery map including a snapshot stream including a plurality of snapshot segments, where the plurality of snapshot segments includes state data for logical block addresses (LBAs) of a subset of memory locations on the memory system as captured at corresponding timing checkpoints associated with a plurality of times at which each of the snapshot segments in the plurality of snapshot segments was captured.

[0090] In one or more embodiments, the plurality of snapshot segments includes state data for logical block addresses (LBAs) of a subset of memory locations on the memory system as captured at corresponding timing checkpoints associated with a plurality of times at which each of the snapshot segments in the plurality of snapshot segments was captured. Further, in one or more embodiments, the timing checkpoints include a timing interval at which iterative updates of the recovery map are initiated, where a duration of time between the timing checkpoints and the number of portions in the plurality of portions is based on an amount of processing resources available to maintain the snapshot stream of the computing device.

[0091] As further shown, the series of acts 700 includes an act 720 of generating a log update associated with a change to the memory state of the memory system and adding the log update to the memory map. For example, the act 720 can include generating a log update associated with a change to the memory state of the memory system and adding the log update to the recovery map.

[0092] As further shown, the series of acts 700 includes an act 730 of iteratively updating the memory map at the timed checkpoints by generating a new snapshot segment corresponding to a respective portion of the memory system and replacing an oldest snapshot segment with the new snapshot segment. For example, the act 730 can include iteratively updating the recovery map at the timed checkpoints of the plurality of snapshot segments to generate an updated plurality of snapshot segments of the snapshot stream. Updating the recovery map can include generating a new snapshot segment for a portion of the memory state that corresponds to the oldest snapshot segment from the snapshot stream and replacing the oldest snapshot segment with the new snapshot segment. In one or more embodiments, iteratively updating the recovery map includes discarding any stale log updates from the recovery map based on timestamps associated with the stale log updates relative to the oldest timed checkpoint of the plurality of snapshot segments.

[0093] In one or more embodiments, the series of acts 700 can include generating, for the memory system, additional log updates associated with additional changes to the memory state and adding the additional log updates to the recovery. The series of acts 700 can also include initiating generation of an additional new snapshot segment for an additional portion of the memory state that corresponds to the oldest snapshot of the updated plurality of snapshot segments. The series of acts 700 can also include detecting a power loss event prior to completion of the generation of the additional new snapshot segment. The series of acts 700 can also include recovering a current state of the memory system at the power loss event based on the updated plurality of snapshot segments and all log updates within the recovery map at the time of the power loss.

[0094] Figure 8 FIGURE 11 illustrates certain components that can be included within a computer system 800. One or more computer systems 800 can be used to implement various devices, components, and systems described herein.

[0095] The computer system 800 includes a processor 801. The processor 801 can be a general-purpose single- or multi-chip microprocessor (e.g., an Advanced RISC (RISC machine) (ARM)), a special-purpose microprocessor (e.g., a digital signal processor (DSP)), a microcontroller, a programmable gate array, etc. The processor 801 can be referred to as a central processing unit (CPU). Although Figure 8 Only a single processor 801 is shown in the computer system 800, but in an alternative configuration, a combination of processors (e.g., an ARM and a DSP) could be used.

[0096] The computer system 800 also includes a memory 803 in electronic communication with the processor 801. The memory 803 can be any electronic, magnetic, optical, or other physical storage device that can store electronic information. For example, the memory 803 can be implemented as random access memory (RAM), read only memory (ROM), magnetic disk storage mediums, optical storage mediums, flash memory devices in RAM, on-board memory included with the processor, erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), registers, and so forth, including combinations thereof.

[0097] The instructions 805 and the data 807 can be stored in the memory 803. The instructions 805 can be executable by the processor 801 to implement some or all of the functionality disclosed herein. Executing the instructions 805 can involve the use of the data 807 that is stored in the memory 803. Any of the various examples of modules and components described herein can be implemented, partially or entirely, as instructions 805 stored in memory 803 and executed by the processor 801. Any of the various examples of data described herein can be among the data 807 stored in memory 803 and used during execution of the instructions 805 by the processor 801.

[0098] The computer system 800 can also include one or more communication interfaces 809 for communicating with other electronic devices. The communication interface(s) 809 can be based on wired communication technology, wireless communication technology, or both. Some examples of communication interfaces 809 include a Universal Serial Bus (USB), an Ethernet adapter, a wireless adapter that operates in accordance with an Institute of Electrical and Electronics Engineers (IEEE) 802.11 wireless communication protocol, Bluetooth®, and an infrared (IR) communication port. Wireless communication adapters and IR communication ports.

[0099] The computer system 800 can also include one or more input devices 811 and one or more output devices 813. Some examples of input devices 811 include a keyboard, mouse, microphone, remote control device, button, joystick, trackball, touchpad, and lightpen. Some examples of output devices 813 include speakers and a printer. One specific type of output device that is often included in computer systems is a display device 815. The display device 815 used with embodiments disclosed herein can utilize any suitable image projection technology, such as liquid crystal display (LCD), light-emitting diode (LED), gas plasma, electroluminescence, and the like. A display controller 817 can also be provided, used in combination with the memory 803, to transform

[0100] The various components of the computer system 800 can be coupled together by one or more busses, which can include a power bus, a control signal bus, a status signal bus, a data bus, etc. For clarity, the various buses are illustrated as busses 819. Figure 8

[0101] The techniques described herein can be implemented, unless explicitly described as being implemented in a certain way, using hardware, software, firmware, or any combination thereof. Any features described as modules, components, etc. can also be implemented together in an integrated logic device, or separately as discrete but interoperable logic devices. If implemented in software, the techniques can be realized at least in part by a non-transitory processor-readable storage medium comprising instructions that, when executed by at least one processor, perform one or more of the methods described herein. The instructions can be organized into routines, programs, objects, components, data structures, etc., which can perform particular tasks and / or implement particular data types and can be combined or distributed as desired in various embodiments.

[0102] The steps and / or actions of methods described herein can be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of steps or actions is required for proper operation of the method that is being described, the order and / or use of specific steps and / or actions can be modified without departing from the scope of the claims.

[0103] The term “determining” encompasses a wide variety of actions and, therefore, “determining” can include calculating, computing, processing, deriving, investigating, looking up (such as, for example, looking up in a table, a database, or another data structure), ascertaining and the like. Also, “determining” can include receiving (such as, for example, receiving information), accessing (such as, for example, accessing data in a memory) and the like. Also, “determining” can include resolving, selecting, choosing, establishing and the like.

[0104] The terms “comprises,” “comprising,” “includes,” “including” and “has” are intended to be inclusive and allow for additional elements or steps. Additionally, it should be understood that references to “one embodiment” or “an embodiment” of the present disclosure are not intended to be interpreted as excluding the existence of additional embodiments that also incorporate those features. For example, any of the elements or features described herein can be combined with any of the other elements or features described herein in a compatible manner.

[0105] The present disclosure can be embodied in other specific forms without departing from the spirit or central characteristics thereof. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the disclosure is, therefore, indicated by the appended claims, rather than by the foregoing description. Changes in meaning or dictions that come within the meaning and range of equivalency of the claims are to be embraced within their scope.​

Claims

1. A method comprising: The identifier includes a recovery map of a memory snapshot, which includes a representation of the memory system's state at a first moment associated with when the memory snapshot was generated, and the memory snapshot includes multiple parts; Between the first time and the second time after the memory snapshot is generated, a log update associated with the change in the memory state is generated, and the log update is added to the recovery map; Based on the number of log updates generated between the first time and the second time, an updated version of the memory snapshot is generated, wherein generating the updated version of the memory snapshot includes: Generate an updated first portion of the memory snapshot, the updated first portion of the memory snapshot including a representation of the memory state of a first portion of the memory system at the second time; and Replace the first portion of the plurality of portions of the memory snapshot that is associated with the first portion of the memory system with the updated first portion of the memory snapshot; Between the second and third time periods, an additional log update associated with the change in the memory state is generated, and the additional log update is added to the recovery map; and Generate an updated second version of the memory snapshot, wherein generating the updated second version of the memory snapshot includes: An updated second portion of the memory snapshot is generated, the updated second portion including a representation of the memory state of a second portion of the memory system at the third time; and The second part of the memory snapshot associated with the second part of the memory system is replaced with the updated second part of the memory snapshot.

2. The method of claim 1, further comprising discarding any outdated log updates from the recovery map.

3. The method of claim 2, wherein discarding any outdated log updates from the recovery map comprises: Determine the time associated with the generation of the first portion of the memory snapshot; as well as Based on the timestamps of one or more log updates that predate the time associated with the generation of the first portion of the memory snapshot, the one or more log updates associated with the change in the memory state of the memory system are discarded.

4. The method of claim 1, wherein the first portion of the memory system includes a first physical region from the memory hardware of the memory system, the first physical region including a subset of memory locations on the memory system, and wherein the first portion of the snapshot includes status data of logical block addresses (LBAs) corresponding to the subset of memory locations on the memory system.

5. The method of claim 1, wherein the first portion and the second portion of the memory snapshot are a complete representation of the memory state at a time associated with the generation of the first portion and the second portion of the memory snapshot, and wherein generating the second updated portion of the memory snapshot further comprises: Any log updates with an associated timestamp are discarded from the recovery map, the associated timestamp being earlier in date than the first time associated with when the memory snapshot was generated.

6. The method according to claim 1, The updated version that generates the memory snapshot includes: In response to the detection of a threshold number of writes to the memory system, the generation of the updated version of the memory snapshot is initiated, and The duration between the first time and the second time is based on the duration during which the threshold number of writes to the memory system is detected.

7. The method according to claim 1, further comprising: Detect power loss events; as well as Based on the updated version of the memory snapshot, the updated second version of the memory snapshot, and the log update from the recovery map, the current state of the memory system is restored in the event of the power loss event.

8. The method of claim 1, wherein the memory system comprises a volatile storage medium of the computing device, and the method further comprises storing the recovery map on a non-volatile storage medium of the computing device.

9. The method of claim 8, wherein the volatile storage medium comprises dynamic random access memory (DRAM), and the non-volatile storage medium comprises one or more solid-state drives (SSDs).

10. The method of claim 8, wherein the memory system comprises dynamic random access memory (DRAM) on a computing device, and the method further comprises storing the recovery map on one or more solid-state drives (SSDs) of the computing device.

11. A method comprising: The identifier includes a recovery mapping of a snapshot stream, which includes multiple snapshot segments, each of which includes a representation of a portion of the memory state of the memory system at a time associated with when the multiple snapshot segments were generated; Generate a log update associated with the change in the memory state of the memory system, and add the log update to the recovery map; as well as The recovery map is iteratively updated at timed checkpoints of the plurality of snapshot segments to generate updated plurality of snapshot segments of the snapshot stream, wherein iteratively updating the recovery map includes: At a first time point, a first new snapshot segment is generated for a first portion of the memory state, the first portion of the memory state corresponding to a first recent snapshot segment from the snapshot stream associated with the first portion of the memory state; Replace the first least recent snapshot segment with the first newest snapshot segment; At a second time point, a second new snapshot segment is generated for a second portion of the memory state, the second portion of the memory state corresponding to a second recent snapshot segment from the snapshot stream associated with the second portion of the memory state; and Replace the second recent snapshot segment with the second new snapshot segment.

12. The method of claim 11, wherein iteratively updating the recovery map further comprises: Any outdated log updates are discarded from the recovery map based on the timestamp associated with the outdated log update relative to the least recent timed checkpoint of the plurality of snapshot segments.

13. The method of claim 11, wherein the plurality of snapshot segments includes status data of logical block addresses (LBAs) of a subset of memory locations on the memory system captured at corresponding timing checkpoints associated with a plurality of times when each of the plurality of snapshot segments is captured.

14. The method of claim 11, wherein the timed checkpoints comprise periodic intervals at which iterative updates of the recovery map are initiated, and wherein the duration between the timed checkpoints and the number of portions of the plurality of portions of the memory state are based on the amount of processing resources of the computing device available to maintain the snapshot stream.

15. The method of claim 11, further comprising: Generate additional log updates associated with additional changes to the memory state of the memory system, and add the additional log updates to the recovery map; Initiate the generation of an additional new snapshot segment for the additional portion of the memory state corresponding to the least recent snapshot of the updated plurality of snapshot segments; Detect power loss events before completing the generation of the additional new snapshot segment; as well as Based on the updated multiple snapshot segments and all log updates within the recovery map at the time of power loss, the current state of the memory system is restored at the time of the power loss event.

16. A system comprising: One or more processors; Memory, in electronic communication with the one or more processors; as well as Instructions, stored in the memory, which can be executed by the one or more processors to: The identifier includes a recovery map of a memory snapshot, which includes a representation of the memory system's state at a first moment associated with when the memory snapshot was generated, and the memory snapshot includes multiple parts; Between the first time and the second time after the memory snapshot is generated, a log update associated with the change in the memory state is generated, and the log update is added to the recovery map; An updated version of the memory snapshot is generated, wherein the updated version of the memory snapshot includes: Generate an updated first portion of the memory snapshot, the updated first portion of the memory snapshot including a representation of the memory state of a first portion of the memory system at the second time; and Replace the first portion of the plurality of portions of the memory snapshot that is associated with the first portion of the memory system with the updated first portion of the memory snapshot; Between the second and third time periods, an additional log update associated with the change in the memory state is generated, and the additional log update is added to the recovery map; and Generate an updated second version of the memory snapshot, wherein generating the updated second version of the memory snapshot includes: An updated second portion of the memory snapshot is generated, the updated second portion including a representation of the memory state of a second portion of the memory system at the third time; and The second part of the memory snapshot associated with the second part of the memory system is replaced with the updated second part of the memory snapshot.

17. The system of claim 16, further comprising instructions executable by the one or more processors to: discard the one or more log updates associated with a write to the memory system based on a timestamp of one or more log updates that predate the time associated with the generation of the first portion of the memory snapshot.

18. The system of claim 16, wherein the updated version for generating the memory snapshot comprises: In response to the detection of a threshold number of writes to the memory system, the generation of the updated version of the memory snapshot is initiated.

19. The system of claim 16, further comprising instructions executable by the one or more processors to: Detecting power loss events, including unplanned power loss in the memory system; and Based on the updated second version of the memory snapshot and the log update from the recovery map, the current state of the memory system is restored in the event of the power loss event.

20. The system of claim 16, wherein the first portion of the memory system includes a first physical region from the memory hardware of the memory system, the first physical region including a subset of memory locations on the memory system, and wherein the first portion of the snapshot includes status data of logical block addresses (LBAs) corresponding to the subset of memory locations on the memory system.

Citation Information

Patent Citations

  • Resuming a system using state information

    CN106258006A

  • Method and device for recovering data snapshot

    CN106610876A