# US 12,118,224 B2 · Fine grained resource management for rollback memory operations

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

- Number: US 12,118,224 B2
- Document ID: US12118224B2
- Status: Granted
- Kind: B2
- Application number: 17/716,250
- Filed: 2022-04-08
- Published: 2023-10-12
- Granted: 2024-10-15
- Earliest claimed: 2022-04-08
- Assignees: Micron Technology, Inc.
- Applicants: Micron Technology, Inc.
- Inventors: Tony M. Brewer
- Web page: https://patentgrep.com/patent/US12118224B2

## CPC

- G06F 3/0644: {Management of space entities, e.g. partitions, extents, pools}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 3/0607: {by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/065: {Replication mechanisms}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 3/0673: {Single storage device}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 9/526: {Mutual exclusion algorithms}
- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 2209/522: Manager
- G06F 2212/1008: Correctness of operation, e.g. memory ordering
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/214: Solid state disk
- G06F 2212/311: In host system
- G06F 2212/7204: Capacity control, e.g. partitioning, end-of-life degradation
- G06F 2212/7208: Multiple device management, e.g. distributing data over multiple flash devices
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed in some examples are methods, systems, computing devices, and machine-readable mediums in which the system maintains a list of resources available for each rollback session. In some examples, state data is kept that indicates available memory. If a write occurs for a particular session and the amount of available memory for a session has been used, a flag is set in metadata for the memory location and the write is not mirrored. In this manner, the technical problem of one undo logging session using too much memory and preventing other undo logging sessions from properly functioning is solved by the technical solution of setting resource limits for each undo logging session.

## Claims

### Claim 1

A method comprising:
receiving, from an application, an indication of a start of an undo logging session, the indication of the start of the undo logging session identifying a set of physical memory locations of a memory device;
receiving a write request for a first physical memory location of the memory device, the first physical memory location within the set of physical memory locations of the memory device, the first physical memory location not having been written to yet during the undo logging session;
responsive to the write request:
identifying a resource counter based upon a multi-session bit field and a session id field of a metadata data structure corresponding to the first physical memory location;
determining that the undo logging session has remaining memory resources based upon the resource counter;
responsive to determining that the undo logging session has remaining resources:
reducing the resource counter;
allocating a second physical memory location of the memory device; and
updating at least one bit of the metadata data structure from indicating that memory requests are to be serviced at the first physical memory location to indicate that memory requests are to be serviced at the second physical memory location; and
servicing the write request using the second physical memory location.

### Claim 2 (depends on 1)

The method of claim 1, wherein the memory device is a persistent memory device connected to a host using an interface configured for a Compute Express Link (CXL) protocol.

### Claim 3 (depends on 1)

The method of claim 1, wherein identifying the resource counter based upon the multi-session bit field and the session id field of the metadata data structure corresponding to the first physical memory location comprises:
determining that the multi-session bit field is set to a value indicating that no multi-session undo logging is active for any memory locations corresponding to the metadata data structure;
responsive to determining that the multi-session bit field is set to a value indicating that no multi-session undo logging is active for any memory locations corresponding to the metadata data structure, accessing a session id value in the metadata data structure; and
using the session id value in the metadata data structure as an index to a session list structure, the session list structure storing the resource counter.

### Claim 4 (depends on 1)

The method of claim 1, wherein identifying the resource counter based upon the multi-session bit field and the session id field of the metadata data structure corresponding to the first physical memory location comprises:
determining that the multi-session bit field is set to a value indicating that multi-session undo logging is active for memory locations corresponding to the metadata data structure;
responsive to determining that the multi-session bit field is set to a value indicating that multi-session undo logging is active for memory locations corresponding to the metadata data structure, accessing an index value in the metadata data structure;
using the index value in the metadata data structure as an index to a multi-session list structure, the multi-session list structure storing a plurality of data pairs comprising a mask value and a session id value, each of the mask values having a corresponding bit for each of the memory locations corresponding to the metadata data structure;
identifying a data pair of the plurality of data pairs where the mask value indicates that the first physical memory location is part of the undo logging session; and
utilizing the session id value from the identified data pair as an index to a session list structure, the session list structure storing the resource counter.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving a second write request for a second physical memory location of the memory device;
responsive to the second write request:
identifying the resource counter based upon a second multi-session bit field and a second session id field of a second metadata data structure corresponding to the second physical memory location;
determining that the undo logging session has no remaining reserved resources based upon the resource counter; and
responsive to determining that the undo logging session has no remaining resources:
marking an error field in the second metadata data structure corresponding to the second physical memory location.

### Claim 6 (depends on 1)

The method of claim 1, further comprising setting the resource counter for the undo logging session in a session list to a specified value responsive to receiving the indication of the start of the undo logging session.

### Claim 7 (depends on 1)

The method of claim 1, wherein the indication of the start of the undo logging session includes a number of memory blocks allocated to the undo logging session and wherein the method further comprises setting the resource counter for the undo logging session in a session list to the number of memory blocks allocated to the undo logging session included in the indication of the start of the undo logging session.

### Claim 8

A computing device comprising:
a processor;
a memory, the memory storing instructions, which when executed by the processor, causes the computing device to perform operations comprising:
receiving, from an application, an indication of a start of an undo logging session, the indication of the start of the undo logging session identifying a set of physical memory locations of a memory device;
receiving a write request for a first physical memory location of the memory device, the first physical memory location within the set of physical memory locations of the memory device, the first physical memory location not having been written to yet during the undo logging session;
responsive to the write request:
identifying a resource counter based upon a multi-session bit field and a session id field of a metadata data structure corresponding to the first physical memory location;
determining that the undo logging session has remaining memory resources based upon the resource counter;
responsive to determining that the undo logging session has remaining resources:
reducing the resource counter;
allocating a second physical memory location of the memory device; and
updating at least one bit of the metadata data structure from indicating that memory requests are to be serviced at the first physical memory location to indicate that memory requests are to be serviced at the second physical memory location; and
servicing the write request using the second physical memory location.

### Claim 9 (depends on 8)

The computing device of claim 8, wherein the memory device is a persistent memory device connected to a host using an interface configured for a Compute Express Link (CXL) protocol.

### Claim 10 (depends on 8)

The computing device of claim 8, wherein the operations of identifying the resource counter based upon the multi-session bit field and the session id field of the metadata data structure corresponding to the first physical memory location comprises:
determining that the multi-session bit field is set to a value indicating that no multi-session undo logging is active for any memory locations corresponding to the metadata data structure;
responsive to determining that the multi-session bit field is set to a value indicating that no multi-session undo logging is active for any memory locations corresponding to the metadata data structure, accessing a session id value in the metadata data structure; and
using the session id value in the metadata data structure as an index to a session list structure, the session list structure storing the resource counter.

### Claim 11 (depends on 8)

The computing device of claim 8, wherein the operations of identifying the resource counter based upon the multi-session bit field and the session id field of the metadata data structure corresponding to the first physical memory location comprises:
determining that the multi-session bit field is set to a value indicating that multi-session undo logging is active for memory locations corresponding to the metadata data structure;
responsive to determining that the multi-session bit field is set to a value indicating that multi-session undo logging is active for memory locations corresponding to the metadata data structure, accessing an index value in the metadata data structure;
using the index value in the metadata data structure as an index to a multi-session list structure, the multi-session list structure storing a plurality of data pairs comprising a mask value and a session id value, each of the mask values having a corresponding bit for each of the memory locations corresponding to the metadata data structure;
identifying a data pair of the plurality of data pairs where the mask value indicates that the first physical memory location is part of the undo logging session; and
utilizing the session id value from the identified data pair as an index to a session list structure, the session list structure storing the resource counter.

### Claim 12 (depends on 8)

The computing device of claim 8, wherein the operations further comprise:
receiving a second write request for a second physical memory location of the memory device;
responsive to the second write request:
identifying the resource counter based upon a second multi-session bit field and a second session id field of a second metadata data structure corresponding to the second physical memory location;
determining that the undo logging session has no remaining reserved resources based upon the resource counter; and
responsive to determining that the undo logging session has no remaining resources:
marking an error field in the second metadata data structure corresponding to the second physical memory location.

### Claim 13 (depends on 8)

The computing device of claim 8, wherein the operations further comprise setting the resource counter for the undo logging session in a session list to a specified value responsive to receiving the indication of the start of the undo logging session.

### Claim 14 (depends on 8)

The computing device of claim 8, wherein the indication of the start of the undo logging session includes a number of memory blocks allocated to the undo logging session and wherein the operations further comprise setting the resource counter for the undo logging session in a session list to the number of memory blocks allocated to the undo logging session included in the indication of the start of the undo logging session.

### Claim 15

A non-transitory machine-readable medium, storing instructions, which when executed by a machine, causes the machine to perform operations comprising:
receiving, from an application, an indication of a start of an undo logging session, the indication of the start of the undo logging session identifying a set of physical memory locations of a memory device;
receiving a write request for a first physical memory location of the memory device, the first physical memory location within the set of physical memory locations of the memory device, the first physical memory location not having been written to yet during the undo logging session;
responsive to the write request:
identifying a resource counter based upon a multi-session bit field and a session id field of a metadata data structure corresponding to the first physical memory location;
determining that the undo logging session has remaining memory resources based upon the resource counter;
responsive to determining that the undo logging session has remaining resources:
reducing the resource counter;
allocating a second physical memory location of the memory device; and
updating at least one bit of the metadata data structure from indicating that memory requests are to be serviced at the first physical memory location to indicate that memory requests are to be serviced at the second physical memory location; and
servicing the write request using the second physical memory location.

### Claim 16 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the memory device is a persistent memory device connected to a host using an interface configured for a Compute Express Link (CXL) protocol.

### Claim 17 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations of identifying the resource counter based upon the multi-session bit field and the session id field of the metadata data structure corresponding to the first physical memory location comprises:
determining that the multi-session bit field is set to a value indicating that no multi-session undo logging is active for any memory locations corresponding to the metadata data structure;
responsive to determining that the multi-session bit field is set to a value indicating that no multi-session undo logging is active for any memory locations corresponding to the metadata data structure, accessing a session id value in the metadata data structure; and
using the session id value in the metadata data structure as an index to a session list structure, the session list structure storing the resource counter.

### Claim 18 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations of identifying the resource counter based upon the multi-session bit field and the session id field of the metadata data structure corresponding to the first physical memory location comprises:
determining that the multi-session bit field is set to a value indicating that multi-session undo logging is active for memory locations corresponding to the metadata data structure;
responsive to determining that the multi-session bit field is set to a value indicating that multi-session undo logging is active for memory locations corresponding to the metadata data structure, accessing an index value in the metadata data structure;
using the index value in the metadata data structure as an index to a multi-session list structure, the multi-session list structure storing a plurality of data pairs comprising a mask value and a session id value, each of the mask values having a corresponding bit for each of the memory locations corresponding to the metadata data structure;
identifying a data pair of the plurality of data pairs where the mask value indicates that the first physical memory location is part of the undo logging session; and
utilizing the session id value from the identified data pair as an index to a session list structure, the session list structure storing the resource counter.

### Claim 19 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations further comprise:
receiving a second write request for a second physical memory location of the memory device;
responsive to the second write request:
identifying the resource counter based upon a second multi-session bit field and a second session id field of a second metadata data structure corresponding to the second physical memory location;
determining that the undo logging session has no remaining reserved resources based upon the resource counter; and
responsive to determining that the undo logging session has no remaining resources:
marking an error field in the second metadata data structure corresponding to the second physical memory location.

### Claim 20 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations further comprise setting the resource counter for the undo logging session in a session list to a specified value responsive to receiving the indication of the start of the undo logging session.
