Hardware Transactional Memory for Non-Volatile Memory Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Non-volatile memory systems face challenges in maintaining consistency during transactions, particularly due to power failures, which can leave the system in an inconsistent state, and conventional cache management practices hinder the implementation of redo and undo logs within hardware transactional memory transactions.

Innovation Solution

The implementation of redo and undo logs, along with non-temporal writes and flushing of log writes to non-volatile memory, ensures atomicity of transactions and maintains system consistency by logging changes before committing them to memory, even in the presence of power failures, and modifying hardware transactional memory to allow these operations within failure atomic sections.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional cache management practices are used with non-volatile memory, then cache performance is improved, but system consistency during power failures deteriorates

Engineering Contradiction:
Improvecache performanceVSAvoidsystem consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent segments the memory system into distinct components: volatile cache memory for performance and non-volatile memory for consistency. It introduces separate log structures (redo logs and undo logs) that are independently managed from the main data storage, allowing the cache to operate independently while maintaining consistency through the logging mechanism.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces logging mechanisms as an intermediary between the cache and non-volatile memory. The redo logs and undo logs act as mediators that record all changes before they are committed to the cache, enabling recovery operations that restore consistency without affecting cache performance operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If redo and undo logs are implemented within hardware transactional memory transactions, then atomicity is improved, but device complexity worsens

Engineering Contradiction:
ImproveatomicityVSAvoidhardware transactional memory complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges the logging functionality directly into the hardware transactional memory structure. The redo and undo logs are integrated as part of the HTM transaction mechanism, allowing atomicity to be enforced at the hardware level without requiring separate software logging layers, thus managing complexity through integration rather than addition.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The hardware transactional memory system performs self-service by automatically managing the redo and undo logs during transaction execution. The HTM mechanism automatically commits or aborts transactions based on log status, eliminating the need for external software intervention to maintain atomicity, thereby reducing operational complexity.

Inventive Principle:
Principle #25Self-service

3Reliability

If data is flushed from cache to non-volatile memory frequently, then consistency is improved, but speed of transactions worsens

Engineering Contradiction:
ImproveconsistencyVSAvoidtransaction speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent implements preliminary action by writing log entries to the redo log before actual data modifications are committed to the cache. This advance logging allows the system to maintain consistency records without delaying cache operations, as the logging occurs in parallel with or before the actual data changes.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent maintains continuity of useful action by allowing cache operations to proceed without interruption for consistency checks. The logging mechanism operates continuously in the background, recording changes as they occur, while cache transactions maintain their normal speed without being blocked by consistency verification processes.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10430186B2Speeding up transactions in non-volatile memory using hardware transactional memory
Publication Date: 2019.10.01 VMWARE INC
  • US10430186B2 patent drawing
  • US10430186B2 patent drawing
  • US10430186B2 patent drawing

AI summary

The disclosure provides an approach for atomically executing computer instructions by a CPU of a computing device comprising non-volatile memory, the CPU configured to implement hardware transactional memory (HTM). The approach generally includes reading an instruction within a section of code designated as an HTM transaction, determining whether the instruction causes a data conflict with another thread, and copying cache lines from memory into a cache of the CPU. The approach further includes marking the copied cache lines as transactional, processing the instruction to create a persistent log within non-volatile memory, and unmarking the copied cache lines from transactional, to non-transactional.