Surrogate Barrier Enforcement for Memory Access Ordering
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
3Reliability
If read data is withheld to enforce memory ordering, then memory access order is ensured, but processing speed and energy efficiency deteriorate
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
Data Source
Figure 1
Figure 2
Figure 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.