Non-Page Allocated Memory Sharing via Unified Architecture

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current computing systems face inefficiencies in memory sharing between the CPU and GPU due to page alignment restrictions, leading to data corruption and reduced performance when handling non-page aligned memory allocations, as they typically only support page-granular memory sharing and lack efficient mechanisms for managing misaligned allocations.

Innovation Solution

A unified memory architecture (UMA) is implemented, allowing direct memory sharing between the CPU and GPU without data copying, using a device driver to manage and synchronize non-page aligned allocations, track allocation affinity, and prevent data corruption by delaying operations and managing misaligned page fragments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If page-granular memory sharing is used between CPU and GPU, then memory sharing is simplified and supported by operating system, but non-page aligned memory allocations cannot be shared efficiently leading to data corruption and reduced performance

Engineering Contradiction:
Improvememory sharing capabilityVSAvoiddata integrity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments the memory management task by separating page-aligned memory sharing (handled by OS) from non-page aligned memory sharing (handled by driver). The driver manages misaligned allocations individually, dividing the memory sharing responsibility into two distinct layers to resolve the contradiction between simplicity and data integrity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The graphics driver acts as an intermediary between the OS and GPU memory access. It translates GPU's non-page aligned memory requests into page-aligned operations that the OS can manage, while maintaining direct GPU access to misaligned allocations. This intermediary layer enables both simplicity and reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If non-page aligned memory allocations are shared directly between CPU and GPU, then performance is improved by avoiding data copying, but data corruption occurs due to lack of synchronization mechanisms

Engineering Contradiction:
Improvememory access efficiencyVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The driver implements feedback mechanisms by tracking GPU access to memory regions and using this information to synchronize CPU and GPU operations. When the GPU accesses a memory region, the driver receives feedback and adjusts CPU access accordingly, preventing data corruption while maintaining high performance.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The driver performs preliminary synchronization actions before allowing CPU or GPU access to shared memory. It establishes proper access rights and synchronization barriers in advance, ensuring data consistency is maintained without requiring complex runtime synchronization during memory operations.

Inventive Principle:
Principle #10Preliminary action

3Device complexity

If operating system manages all memory sharing at page granularity, then system simplicity is maintained, but fine-grained non-page aligned allocations cannot be shared even when GPU needs them

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

Solution Approach 1:

The patent segments memory management responsibilities: the OS handles page-aligned memory sharing (maintaining simplicity), while the graphics driver handles non-page aligned allocations (providing flexibility). This segmentation allows the system to maintain low complexity at the OS level while achieving high adaptability through driver-level management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The graphics driver serves as an intermediary that translates GPU's fine-grained memory requests into operations the OS can manage. It bridges the gap between the OS's page-granular management and the GPU's need for fine-grained access, maintaining both simplicity and flexibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Reliability

If data copying is used to enable GPU access to non-page aligned memory, then data integrity is maintained, but performance is reduced due to additional data transfer overhead

Engineering Contradiction:
Improvedata correctnessVSAvoidcomputational efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent uses a form of copying at the memory mapping level rather than data level. The driver creates separate memory mappings for CPU and GPU that both reference the same physical memory, enabling direct access without copying actual data. This maintains data integrity while avoiding the performance penalty of data transfer.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9478000B2Sharing non-page aligned memory
Publication Date: 2016.10.25 INTEL CORP
  • US9478000B2 patent drawing
  • US9478000B2 patent drawing
  • US9478000B2 patent drawing

AI summary

A method for sharing memory between a central processing unit (CPU) and an input/output (I/O) device of a computing device is described. The method may include creating an allocation of memory for the I/O device to operate on. The method includes detecting whether the allocation is not page-aligned, wherein an allocation is page-aligned when its base address and size be evenly divisible by the applicable page-size. The allocation may be successfully shared, even if not page-aligned, even if an operating system of the computing device doesn't support sharing of non-page-aligned allocations.