Persistent Memory Dirty Data Tracking via Cache Line Logging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Persistent memory systems face challenges in ensuring crash consistency due to limitations from volatile hardware structures and hardware optimizations, leading to inefficiencies in data tracking and write-back operations, which result in high overhead and potential inconsistencies.

Innovation Solution

A method involving compiler-assisted and hardware-assisted dirty data tracking mechanisms, where the compiler maintains a log of cache line addresses and the CPU uses hardware extensions to efficiently flush cache lines, ensuring only necessary write-backs are performed, thereby reducing write-back amplification and improving crash consistency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If hardware optimizations such as writeback caching and memory controller reordering are used, then memory access performance is improved, but crash consistency is compromised due to reordering and coalescing of updates

Engineering Contradiction:
Improvememory access performanceVSAvoidcrash consistency
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent introduces a log data structure that records cache line addresses before they are written back to persistent memory. This preliminary recording action allows the system to track which cache lines contain dirty data that must be flushed to maintain crash consistency, even when hardware reordering occurs. The log serves as a precursor mechanism that preserves the ordering information needed for consistency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback by continuously monitoring cache line modifications and maintaining a log of dirty cache lines. This feedback mechanism allows the application to know which data has been modified and needs to be persisted, enabling the system to respond to hardware reordering by flushing the appropriate cache lines in the correct order to maintain crash consistency.

Inventive Principle:
Principle #23Feedback

2Ease of operation

If programmer-transparent volatile hardware structures are used, then programming simplicity is improved, but the ability to order updates to persistent memory is limited

Engineering Contradiction:
Improveprogramming simplicityVSAvoidupdate ordering
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces a log data structure as an intermediary between the volatile hardware structures and the persistent memory. This intermediary records the addresses of cache lines that need to be persisted, allowing the application to maintain update ordering information without directly managing the complexity of volatile hardware structures. The log acts as a mediator that preserves ordering information while working within the constraints of transparent hardware.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If all cache lines are flushed to persistent memory, then crash consistency is ensured, but write-back amplification and overhead increase

Engineering Contradiction:
Improvecrash consistencyVSAvoidwrite-back efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the cache memory into individual trackable cache lines and maintains a log that identifies only the specific cache lines containing dirty data. Instead of flushing all cache lines, the system selectively flushes only those cache lines that are marked in the log as containing modified data. This segmentation approach reduces write-back amplification by avoiding unnecessary flushes of clean cache lines while still ensuring crash consistency for the dirty data.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11074181B2Dirty data tracking in persistent memory systems
Publication Date: 2021.07.27 VMWARE INC
  • US11074181B2 patent drawing
  • US11074181B2 patent drawing
  • US11074181B2 patent drawing

AI summary

An example method of managing persistent memory (PM) in a computing system includes: issuing, by an application executing in the computing system, store instructions to an address space of the application, the address space including a region mapped to the PM; recording, by a central processing unit (CPU) in the computing system, cache line addresses in a log, the cache line addresses corresponding to cache lines in the address space of the application targeted by the store instructions; and issuing, by the application, one or more instructions to flush cache lines from cache of the CPU identified by the cache line addresses in the log.