Hardware Mirroring for Pinned DMA Page Migration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The operating system faces challenges in migrating pinned memory pages during hot-remove operations, as it can lead to data loss and disruption to peripheral devices with direct memory access, due to the risk of overwriting data that has already been moved by the interconnect, and existing solutions are resource-intensive or limit physical memory availability.

Innovation Solution

The use of transactional memory and hardware mirroring to ensure that data written by peripheral devices is mirrored to both the current and target memory locations during memory migration, preventing data loss and allowing for dynamic migration of pinned memory regions without interrupting peripheral devices.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the OS attempts to locate all pinned memory pages to a region that will never be hot-removed, then the reliability of DMA operations is improved, but the physical memory available at runtime to other applications decreases

Engineering Contradiction:
ImproveDMA operation reliabilityVSAvoidphysical memory availability
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent implements dynamic memory region management where the hot-removeable region is dynamically adjusted based on the presence of pinned pages. The OS identifies pinned pages within the target region and modifies the hot-remove boundary to exclude only those specific pages while allowing the rest of the region to remain hot-removeable. This dynamic adjustment maintains DMA reliability for pinned pages while preserving memory availability for other applications.

Inventive Principle:
Principle #15Dynamics

2Device complexity

If the OS does not allocate a special region for pinned pages and declines user requests for hot-remove of regions with pinned pages, then the memory management complexity is reduced, but the system flexibility and productivity decrease

Engineering Contradiction:
Improvememory management complexityVSAvoidsystem flexibility
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent implements a self-service mechanism where the OS automatically detects pinned pages within the target hot-remove region and autonomously adjusts the migration strategy. The system uses page table information and IOMMU mappings to identify pinned pages, then dynamically modifies the hot-remove operation to migrate only non-pinned pages while leaving pinned pages in place. This self-service approach maintains simplicity while enabling flexible hot-remove operations.

Inventive Principle:
Principle #25Self-service

3Adaptability or versatility

If peripheral devices do not pin memory pages and use the PRI mechanism for address translation, then the memory flexibility is improved, but the resource consumption increases

Engineering Contradiction:
Improvememory flexibilityVSAvoidresource consumption
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts the address translation function from the peripheral devices and consolidates it in the IOMMU (Input-Output Memory Management Unit). Instead of requiring each device to implement its own PRI mechanism, the system uses the IOMMU to handle address translation for all DMA operations. This extraction eliminates the need for device-level pinning and PRI implementation, reducing resource consumption while maintaining memory flexibility and enabling hot-remove operations.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS20220374354A1Live-migration of pinned direct memory access pages to support memory hot-remove
Publication Date: 2022.11.24 INTEL CORP
  • US20220374354A1 patent drawing
  • US20220374354A1 patent drawing
  • US20220374354A1 patent drawing

AI summary

A system on chip (SoC) coupled to a memory can perform a hot-remove operation in a computer system. In a hot-remove operation, software (e.g., operating system) and hardware (e.g., memory controller and interconnect circuitry) components migrate memory content from one region to another target region in the memory. A peripheral device can have direct memory access (DMA) to a page in the region of memory that is being hot-removed. The interconnect circuitry can migrate the page to the target region while maintaining the peripheral device's direct access to the memory. Interconnect circuitry uses hardware mirroring in response to a write command to a memory address in the region being hot-removed. With hardware mirroring, the data is stored in two locations; the first location is the memory address in the region being moved, and the second location is a memory address in the target region.