Processor Time Stamp Counter Synchronization via Controller

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The varying processor clock frequencies due to aggressive power management techniques and independent power management in multiprocessor systems lead to inconsistencies in time stamp counter (TSC) measurements, making it unreliable for accurate timekeeping.

Innovation Solution

Implementing a controller TSC that monitors and synchronizes processor TSCs, ensuring accurate time measurement by resynchronizing processor TSCs when out of sync, thereby maintaining synchronization and reducing latency in read operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the TSC MSR is placed in the north bridge to provide stable time measurement, then time measurement reliability is improved, but read latency increases substantially

Engineering Contradiction:
Improvetime measurement reliabilityVSAvoidread latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent divides the TSC functionality into two separate counters: a processor TSC that increments at the processor clock frequency and provides fast local access, and a north bridge TSC that increments at the north bridge clock frequency and provides stable reference time. This segmentation allows each counter to serve its specific purpose without compromise.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a TSC synchronization mechanism that acts as an intermediary between the processor TSC and north bridge TSC. The processor TSC is periodically synchronized to the north bridge TSC value, allowing the processor to use its fast local counter while maintaining alignment with the stable reference time from the north bridge.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Use of energy by moving object

If processor clock frequency is varied for power management, then power consumption is reduced, but TSC measurement accuracy deteriorates

Engineering Contradiction:
Improvepower consumptionVSAvoidTSC measurement accuracy
Core Design Contradiction:
Use of energy by moving objectVSMeasurement precision

Solution Approach 1:

The patent implements a dynamic TSC synchronization approach where the processor TSC is continuously adjusted based on the current processor frequency state. When the processor frequency changes due to power management, the synchronization mechanism detects this and adjusts the processor TSC accordingly to maintain accurate time measurement despite frequency variations.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent employs a feedback mechanism where the processor monitors its own frequency state and uses this information to adjust the TSC increment rate. The processor compares its local frequency measurements with expected values and compensates for frequency variations by adjusting the TSC update rate, ensuring accurate time measurement even when operating at reduced frequencies for power savings.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS7941684B2Synchronization of processor time stamp counters to master counter
Publication Date: 2011.05.10 ADVANCED MICRO DEVICES INC
  • US7941684B2 patent drawing
  • US7941684B2 patent drawing
  • US7941684B2 patent drawing

AI summary

In one embodiment, an apparatus comprises one or more processors and a controller coupled to the processors. Each processor comprises at least one processor time stamp counter (TSC) and a first control unit configured to maintain the processor TSC. The controller comprises at least one controller TSC and a second control unit configured to maintain the controller TSC. The controller is configured to signal the processor responsive to determining that the processor TSC is out of synchronization with the controller TSC. In response to having been signalled that the processor TSC is out of synchronization, the processor is configured to resynchronize the processor TSC to the controller TSC before generating a result for a read TSC instruction. In response to having not been signalled that the processor TSC is out of synchronization, the processor is configured to generate the result responsive to the processor TSC without resynchronizing.