Weakly-Ordered Processor Load Ordering via Store Queue Indicators

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In a weakly-ordered, out-of-order processor environment, load-load ordering rules are often violated due to cache line migrations, where younger loads may read older values from migrated cache lines, leading to inconsistencies in memory access ordering across multiple processors.

Innovation Solution

Implementing a 'poison' indicator in the status information of load and store instructions to sequence their execution, ensuring that younger loads wait until older store instructions are removed from the queue, thereby preventing the forwarding of newer values and maintaining the load-load ordering rule, even in the presence of cache line migrations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If loads are executed speculatively in an out-of-order processor, then execution speed and productivity are improved, but load-load ordering rules may be violated when cache lines migrate

Engineering Contradiction:
Improveexecution speedVSAvoidload-load ordering compliance
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system uses feedback from cache line migration events to adjust load execution. When a cache line is migrated, the processor receives feedback about this change and uses it to determine whether to retry speculative loads that read from the migrated cache line, ensuring ordering compliance while maintaining speculative execution benefits

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The processor performs preliminary actions by setting status indicators on cache lines before migrations occur. These indicators mark cache lines that have been migrated or are at risk of migration, allowing the processor to preemptively adjust load execution decisions before ordering violations can occur

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the processor waits for store instructions to complete before executing younger loads, then load-load ordering is maintained, but execution time increases

Engineering Contradiction:
Improveload-load ordering complianceVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system dynamically adjusts execution timing based on store queue status. Instead of fixed waiting, the processor monitors store instruction completion status and dynamically decides when it is safe to execute younger loads, allowing overlap when stores are complete but waiting when necessary to maintain ordering

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The processor sets status indicators on cache lines in advance, allowing younger loads to be marked as dependent on store completion before actually executing. This preliminary marking enables efficient dependency tracking and execution scheduling without requiring full waits

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9383995B2Load ordering in a weakly-ordered processor
Publication Date: 2016.07.05 APPLE INC
  • US9383995B2 patent drawing
  • US9383995B2 patent drawing
  • US9383995B2 patent drawing

AI summary

Techniques are disclosed relating to ordering of load instructions in a weakly-ordered memory model. In one embodiment, a processor includes a cache with multiple cache lines and a store queue configured to maintain status information associated with a store instruction that targets a location in one of the cache lines. In this embodiment, the processor is configured to set an indicator in the status information in response to migration of the targeted cache line. The indicator may be usable to sequence performance of load instructions that are younger than the store instruction. For example, the processor may be configured to wait, based on the indicator, to perform a younger load instruction that targets the same location as the store instruction until the store instruction is removed from the store queue. This may prevent forwarding of the value of the store instruction to the younger load and preserve load-load ordering.