Skip to content

Conversation

@abonislawski
Copy link
Member

Change the order of operations in the performance measurement initialization sequence to avoid a race condition.
Previously, the performance counters were reset before setting the state to STOPPED, which created a window where an LL task could preempt the execution and record new measurements between these operations.

Change the order of operations in the performance measurement initialization
sequence to avoid a race condition.
Previously, the performance counters were reset before setting the state to STOPPED,
which created a window where an LL task could preempt the execution
and record new measurements between these operations.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Copilot AI review requested due to automatic review settings September 22, 2025 09:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This change fixes a race condition in the performance measurement initialization sequence by reordering operations. The fix ensures that performance counters are reset after setting the state to STOPPED rather than before, preventing low-latency tasks from recording measurements during the transition window.

Key Changes

  • Reordered performance counter reset to occur after state transition
  • Eliminated race condition window where LL tasks could interfere with initialization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lgirdwood lgirdwood merged commit 83b71da into thesofproject:main Sep 22, 2025
34 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants