# US 2021/0081284 A1 · Incrementally updating recovery map data for a memory system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0081284 A1
- Document ID: US20210081284A1
- Status: Published application
- Kind: A1
- Application number: 16/572,530
- Filed: 2019-09-16
- Published: 2021-03-18
- Earliest claimed: 2019-09-16
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Brennan Alexander WATT
- Web page: https://patentgrep.com/patent/US20210081284A1

## CPC

- G06F 11/1466: {to make the backup process non-disruptive}
- G06F 11/1469: {Backup restoration techniques}
- G06F 11/073: {in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00)}
- G06F 11/076: {by exceeding a count or rate limit, e.g. word- or bit count limit}
- G06F 11/1451: {by selection of backup contents}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## 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, systems disclosed herein may iteratively update segments of a memory snapshot based on a recent state of memory corresponding to discrete portions of a memory system. In addition, systems disclosed herein may discard outdated segments of the memory snapshot in addition to outdated journal updates at incremental checkpoints that facilitate a gradual update process that may significantly reduce recovery time upon experiencing an untimely power loss event. The systems described herein provide additional processing flexibility, reduce utilization of processing resources, and reduce media wear while accomplishing one or more benefits associated with efficient recovery of a current state of memory.

## Claims

### Claim 1

A method, comprising:
identifying a recovery map comprising a memory snapshot that includes a representation of a memory state for a memory system at a first time associated with when the memory snapshot was generated;
generating journal updates associated with changes to the memory state between the first time and a second time after the memory snapshot was generated and adding the journal updates to the recovery map;
based on a number of the journal updates generated between the first time and the second time, generating an updated version of the memory snapshot, wherein generating the updated version of the memory snapshot comprises:
generating an updated first portion of the memory snapshot including a representation of a memory state for a first portion of the memory system at the second time; and
replacing a first portion of the memory snapshot associated with the first portion of the memory system with the updated first portion of the memory snapshot.

### Claim 2 (depends on 1)

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

### Claim 3 (depends on 2)

The method of claim 2, wherein discarding any outdated journal updates from the recovery map comprises:
determining a time associated with generation of the first portion of the memory snapshot; and
discarding one or more journal updates associated with changes to the memory state for the memory system based on timestamps of the one or more journal updates that pre-date the time associated with generation of the first portion of the memory snapshot.

### Claim 4 (depends on 1)

The method of claim 1, wherein the first portion of the memory system comprises a subset of memory locations on the memory system, and wherein the first portion of the snapshot comprises state data for logical block addresses (LBAs) corresponding to the subset of memory locations on the memory system.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
generating additional journal updates associated with changes to the memory state between the second time and a third time and adding the additional journal updates to the recovery map; and
generating a second updated version of the memory snapshot, wherein generating the second updated version of the memory snapshot comprises:
generating an updated second portion of the memory snapshot including a representation of a memory state for the second portion of the memory system at the third time; and
replacing a second portion of the memory snapshot associated with the second portion of the memory system with the updated second portion of the memory snapshot.

### Claim 6 (depends on 5)

The method of claim 5, wherein the first portion of the memory snapshot and the second portion of the memory snapshot are a complete representation of the memory state for times associated with generation of the first portion of the memory snapshot and the second portion of the memory snapshot, and wherein generating the second updated portion of the memory snapshot further comprises discarding any journal updates from the recovery map having associated timestamps that pre-date the first time associated with when the memory snapshot was generated.

### Claim 7 (depends on 1)

The method of claim 1,
wherein generating the updated version of the memory snapshot comprises initiating generation of the updated version of the memory snapshot in response to detecting a threshold number of writes to the memory system, and
wherein a duration between the first time and the second time is based on a duration of time in which the threshold number of writes to the memory system are detected.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
detecting a power loss event; and
recovering a current state of the memory system at a time of the power loss event based on the updated version of the memory snapshot and the journal updates from the recovery map.

### Claim 9 (depends on 1)

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

### Claim 10 (depends on 9)

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

### Claim 11

A method, comprising:
identifying a recovery map comprising a snapshot stream that includes a plurality of snapshot segments, the plurality of snapshot segments including representations of a plurality of portions of a memory state for a memory system;
generating journal updates associated with changes to the memory state for the memory system and adding the journal updates to the recovery map;
iteratively updating the recovery map at timing checkpoints of the plurality of snapshot segments to generate an updated plurality of snapshot segments of the snapshot stream, wherein iteratively updating the recovery map comprises:
generating a new snapshot segment for a portion of the memory state corresponding to a least recent snapshot segment from the snapshot stream; and
replacing the least recent snapshot segment with the new snapshot segment.

### Claim 12 (depends on 11)

The method of claim 11, wherein iteratively updating the recovery map further comprises discarding any outdated journal updates from the recovery map based on timestamps associated with the outdated journal updates relative to a least recent timing checkpoint of the plurality of snapshot segments.

### Claim 13 (depends on 11)

The method of claim 11, wherein the plurality of snapshot segments include state data for logical block addresses (LBAs) to subsets of memory locations on the memory system as captured at corresponding timing checkpoints associated with a plurality of times at each of the snapshot segments of the plurality of snapshot segments were captured.

### Claim 14 (depends on 11)

The method of claim 11, wherein the timing checkpoints comprise regular intervals at which iterative updates of the recovery map are initiated, and wherein a duration of time between the timing checkpoints and a number of portions of the plurality of portions are based on a quantity of processing resources of a computing device available for maintaining the snapshot stream.

### Claim 15 (depends on 11)

The method of claim 11, further comprising:
generating additional journal updates associated with additional changes to the memory state for the memory system and adding the additional journal updates to the recovery map;
initiating generation of an additional new snapshot segment for an additional portion of the memory state corresponding to a least recent snapshot of the updated plurality of snapshot segments;
detecting a power loss event prior to finishing generation of the additional new snapshot segment; and
recovering a current state of the memory system at a time of the power loss event based on the updated plurality of snapshot segments and all journal updates within the recovery map at the time of the power loss.

### Claim 16 (depends on 1)

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

### Claim 17

A system, comprising:
one or more processors;
memory in electronic communication with the one or more processors; and
instructions stored in the memory, the instructions being executable by the one or more processors to:
identify a recovery map comprising a memory snapshot that includes a representation of a memory state for a memory system at a first time associated with when the memory snapshot was generated;
generate journal updates associated with changes to the memory state between the first time and a second time after the memory snapshot was generated and adding the journal updates to the recovery map;
generate an updated version of the memory snapshot, wherein generating the updated version of the memory snapshot comprises:
generating an updated first portion of the memory snapshot including a representation of a memory state for a first portion of the memory system at the second time; and
replacing a first portion of the memory snapshot associated with the first portion of the memory system with the updated first portion of the memory snapshot.

### Claim 18 (depends on 17)

The system of claim 17, further comprising instructions being executable by the one or more processors to discard one or more journal updates associated with writes to the memory system based on timestamps of the one or more journal updates that pre-date the time associated with generation of the first portion of the memory snapshot.

### Claim 19 (depends on 17)

The system of claim 17, wherein generating the updated version of the memory snapshot comprises initiating generation of the updated version of the memory snapshot in response to detecting a threshold number of writes to the memory system.

### Claim 20 (depends on 17)

The system of claim 17, further comprising instructions being executable by the one or more processors to:
detect a power loss event, the power loss event comprising an unplanned loss of power to the memory system; and
recovering a current state of the memory system at a time of the power loss event based on the updated version of the memory snapshot and the journal updates from the recovery map.
