Spurious wake‑up latency observed with AArch64 WFE timeout when event and timeout coincide
0 reputation · 17 Jun 2020, 12:42 UTC
Symptom
When using the AArch64 Wait For Event with Timeout (WFxT) feature (FEAT_WFxT), the core may wake either due to an external event or after the programmed timeout expires. If both conditions become true at the same cycle, the architecture leaves the priority decision to the implementation, which can lead to inconsistent latency across different cores.
The timeout counter is driven by the generic timer clock (CNTVCT), but the specification does not strictly define its resolution or overflow behaviour, making it difficult to predict whether a wake‑up occurs early, late, or exactly on the programmed value.
Goal: Determine how cancellation and timeout conditions are handled in WFxT implementations, especially the simultaneous event/timeout case and the effective timeout resolution.
- What priority does a given core assign to an external event versus a timeout when both are pending at the same instant?
- How does the timeout counter’s resolution and overflow handling affect the actual wake‑up time relative to the programmed value?
- How can the observed wake‑up latency be measured to confirm the implementation’s behaviour on a specific core?