Atomic Writes for Persistent Memory via Indirection Layer

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Persistent memory systems face challenges in ensuring data integrity during write operations due to limited atomic write sizes, leading to data corruption and inconsistency issues when crashes occur, as they can only guarantee the success or failure of writing 8 bytes at a time, which is insufficient for larger data writes.

Innovation Solution

Implementing an indirection layer that uses per-page structures to manage page block numbers and checksums, allowing for atomic writes beyond the native 8-byte size by allocating new page block numbers and updating references efficiently, thereby ensuring data integrity and consistency across larger write operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If in-place write operations are used in persistent memory, then write speed is improved, but data integrity is compromised during crashes due to limited atomic write sizes

Engineering Contradiction:
Improvewrite speedVSAvoiddata integrity
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The write operation is segmented into two distinct phases: (1) writing new data to a new location in persistent memory, and (2) atomically updating the indirection layer to point to the new location. This segmentation allows the data write to be large and efficient while the atomicity guarantee applies only to the small indirection update, resolving the contradiction between write speed and data integrity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An indirection layer is introduced as an intermediary between the file system and the actual data in persistent memory. This indirection layer contains pointers to data locations and can be updated atomically. The mediator absorbs the atomicity requirement, allowing large data writes to proceed without atomicity constraints while maintaining overall operation atomicity through the indirection mechanism.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If copy-on-write operations are implemented to ensure data integrity, then reliability is improved, but overhead and complexity increase significantly

Engineering Contradiction:
Improvedata integrityVSAvoidoperation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The copy-on-write operation is segmented so that only the indirection layer entries (pointers) are copied and updated, not the entire data payload. This reduces the copying overhead from potentially large data sizes to small pointer sizes, maintaining reliability while reducing complexity and overhead.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of copying large data blocks, the system copies only the small indirection layer entries that contain pointers to data locations. This selective copying of metadata rather than actual data dramatically reduces the overhead and complexity associated with copy-on-write operations.

Inventive Principle:
Principle #26Copying

3Reliability

If 8-byte atomic writes are used in persistent memory, then atomicity is guaranteed for small writes, but larger write operations cannot be made atomic

Engineering Contradiction:
Improveatomicity guaranteeVSAvoidwrite size
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The write operation is divided into a large non-atomic data write phase and a small atomic indirection update phase. The 8-byte atomic write capability is applied only to the indirection layer updates, while the larger data writes are performed without atomicity constraints, effectively extending atomicity semantics to operations larger than 8 bytes through the indirection mechanism.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The indirection layer acts as a mediator that translates small atomic writes into large effective atomic operations. By updating only the pointer in the indirection layer atomically (within 8 bytes), the system achieves atomicity semantics for the entire large data write operation, bypassing the 8-byte limitation.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Speed

If in-place updates are performed in the indirection layer, then update speed is improved, but data consistency may be compromised during crashes

Engineering Contradiction:
Improveupdate speedVSAvoiddata consistency
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

A new indirection layer entry is prepared in advance with the correct pointer value before the actual data write begins. During the data write, this pre-prepared entry can be atomically committed, ensuring consistency. The preliminary preparation of the indirection entry allows fast atomic updates while maintaining data consistency during crashes.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20240303198A1Low-overhead atomic writes for persistent memory
Publication Date: 2024.09.12 NETAPP INC
  • US20240303198A1 patent drawing
  • US20240303198A1 patent drawing
  • US20240303198A1 patent drawing

AI summary

Techniques are provided for atomic writes for persistent memory. In response to receiving a write operation, a new per-page structure with a new page block number is allocated. New data of the write operation is persisted to a new page of the persistent memory having the new page block number, and the new per-page structure is persisted to the persistent memory. If the write operation targets a hole after the new data and the new per-page structure have been persisted, then a new per-page structure identifier of the new per-page structure is inserted into a parent indirect page of a page comprising the new data. If the write operation targets old data after the new data and the new per-page structure have been persisted, then an old per-page structure of the old data is updated with the new page block number.