Prefetching Memory Accesses Near Barriers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In modern processors, memory barriers can lead to memory latency issues due to delayed memory access operations, which result in performance degradation as younger memory accesses are stalled until the barrier completes, exposing latency from higher levels of cache or main memory.

Innovation Solution

Converting delayed memory access operations into prefetch requests before the barrier completes, allowing data to be retrieved from lower levels of cache or main memory and made available in a higher level cache when the memory access is processed, thereby reducing memory latency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If memory barriers are used to enforce instruction ordering, then instruction execution order is controlled, but memory latency increases due to stalled memory accesses

Engineering Contradiction:
Improveinstruction ordering controlVSAvoidmemory latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary action by converting delayed memory accesses into prefetch requests before the barrier completes. This allows data to be fetched from lower memory levels in advance, so when the barrier finishes and the memory access restarts, the data is already available in the higher level cache, eliminating the latency penalty.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If younger memory accesses are delayed until barrier completion, then instruction ordering is maintained, but processor performance degrades due to stalls

Engineering Contradiction:
Improveinstruction orderingVSAvoidprocessor performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

While maintaining instruction ordering by delaying younger memory accesses until barrier completion, the system performs preliminary prefetching of the required data. This preliminary action ensures that when the delayed memory access restarts after the barrier, the data is already in cache, preventing processor stalls and maintaining high productivity.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If memory accesses miss in the closest cache, then cache consistency is maintained, but access latency increases due to lower level cache or main memory access

Engineering Contradiction:
Improvecache consistencyVSAvoidmemory access latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

When a memory access is delayed by a barrier, the system performs preliminary action by converting it to a prefetch request that fetches data from lower level caches or main memory. This allows the data to be available in the higher level cache before the original memory access restarts, reducing access latency while maintaining cache consistency through proper ordering enforcement.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8856447B2Converting memory accesses near barriers into prefetches
Publication Date: 2014.10.07 APPLE INC
  • US8856447B2 patent drawing
  • US8856447B2 patent drawing
  • US8856447B2 patent drawing

AI summary

Methods, apparatuses, and processors for reducing memory latency in the presence of barriers. When a barrier operation is executed, subsequent memory access operations are delayed until the barrier operation retires. While the memory access operation is delayed, the memory access operation is converted into a prefetch request and sent to the L2 cache. Then, data corresponding to the prefetch request is retrieved and stored in the L1 data cache. When the memory access operation wakes up, the data for the operation will already be stored in the L1 data cache, reducing the memory latency of the operation.