Surrogate Barrier Enforcement for Memory Access Ordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Weakly ordered processing systems face challenges in maintaining the order of memory operations, particularly when devices and bus implementations do not recognize barrier commands, leading to inefficiencies and potential violations in memory access ordering.

Innovation Solution

The implementation of a surrogate barrier system, where a bus interface circuit generates a surrogate barrier in response to memory read requests from devices that do not support memory barrier commands, ensuring order and coherency by withholding read data until previous operations are complete, and selectively generating barriers based on preceding write requests to the same address.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If memory operations are reordered to improve performance in weakly ordered systems, then processing efficiency increases, but memory access order and program behavior reliability deteriorate

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidmemory access order
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a surrogate barrier mechanism that acts as an intermediary to enforce memory ordering constraints. When a read request is received, the system generates a surrogate barrier command that prevents subsequent memory operations from executing out of order, thereby maintaining reliability while allowing performance optimization through selective ordering enforcement

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If barrier commands are used to enforce memory ordering, then memory access order is maintained, but system compatibility and performance deteriorate due to restricted processor and bus usage

Engineering Contradiction:
Improvememory access orderVSAvoidsystem compatibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The surrogate barrier serves as a mediator that translates read requests into appropriate barrier enforcement actions. This approach allows the system to maintain memory ordering without requiring all processors and bus implementations to natively support barrier commands, thereby improving compatibility while preserving correctness

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system dynamically changes the behavior of memory operations by generating surrogate barriers conditionally based on read requests and address matching. This parameter-based approach allows flexible enforcement of ordering constraints only when necessary, improving both compatibility and performance

Inventive Principle:
Principle #35Parameter changes

3Reliability

If read data is withheld to enforce memory ordering, then memory access order is ensured, but processing speed and energy efficiency deteriorate

Engineering Contradiction:
Improvememory access orderVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The system changes the enforcement parameter from blanket data withholding to selective barrier generation based on address matching. By comparing addresses and generating surrogate barriers only when reads follow writes to the same address, the system maintains ordering where necessary while allowing parallel execution elsewhere, thus preserving speed

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP2435919B1Methods and apparatus for issuing memory barrier commands in a weakly ordered storage system
Publication Date: 2017.12.13 QUALCOMM INC
  • EP2435919B1 patent drawingFigure 1
  • EP2435919B1 patent drawingFigure 2
  • EP2435919B1 patent drawingFigure 3

AI summary

Efficient techniques are described for enforcing order of memory accesses. A memory access request is received from a device which is not configured to generate memory barrier commands. A surrogate barrier is generated in response to the memory access request. A memory access request may be a read request. In the case of a memory write request, the surrogate barrier is generated before the write request is processed. The surrogate barrier may also be generated in response to a memory read request conditional on a preceding write request to the same address as the read request. Coherency is enforced within a hierarchical memory system as if a memory barrier command was received from the device which does not produce memory barrier commands.