Repository navigation
Conversation
|
Can one of the admins verify this patch?
|
PR 11542: test resultsRun date: 2026-11-26 17:09 UTC Tested commit: 527aa3377efbf684892bb8e620b0f609ddc338d3 |
There was a problem hiding this comment.
🟡 Changes recommended
Telemetry cancellation does not synchronize with a running handler, allowing concurrent collection to produce mixed snapshots and refresh work to rearm after cancellation.
3 open issues
What changed in this PR
This PR pauses extended telemetry’s background refresh during D0ix to reduce audio-processing delays and unnecessary DSP wakeups.
Changes:
- Add D0ix notifications for runtime-idle policy-lock transitions.
- Cancel background refresh on entry, publish a final cold-section snapshot, and resume periodic refresh on exit.
- Guard background rescheduling while keeping lightweight hot-path telemetry updates active.
| File | Description |
|---|---|
zephyr/lib/pm_runtime.c |
Emit local D0ix notifications when runtime-idle lock state changes. |
src/kernel/debug/telemetry/telemetry.c |
Subscribe to D0ix events and pause or resume background refresh. |
src/include/sof/lib/notifier.h |
Define the D0ix notification ID and transition states. |
Review effort: Balanced
af9314f to
d09b96b
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Target-hardware validation is needed to confirm D0ix transitions quiesce queued or running refresh work, eliminate idle timer wakeups, resume refresh on exit, and preserve LL audio deadlines during HDA RTD3 playback.
2 resolved since last review
Review effort: Balanced
The periodic cold-section refresh runs on the cooperative system workqueue, which cannot be preempted by ll_thread. During low-power RTD3 playback this starves the LL audio thread and causes audio glitches, while the 1000 ms timer also wakes core 0 from tickless D0ix every second. Notify telemetry on D0ix state transitions from pm_runtime to pause the periodic refresh work when D0ix is allowed and resume it on D0ix exit. Signed-off-by: Pawel Furtak <pawel.furtak@intel.com>
d09b96b to
527aa33
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Static review cannot verify D0i3 power-gating, wakeup suppression, and low-latency audio guarantees across repeated transitions and secondary-core calls without target-hardware testing.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
lgirdwood
left a comment
There was a problem hiding this comment.
LGTM, btw do we have a method to switch on/off via IPC ?
|
Can you check the CI and ping if its good to merge. Thanks ! |


When extended telemetry (
CONFIG_SOF_TELEMETRY_EXTENDED_WINDOW) is enabled,telemetry_bg_dworkruns every 1 s on Zephyr's cooperativek_sys_work_q(priority -1). During D0ix / D0i3 power gating this causes two issues:
ll_thread(priority -16),the background refresh can delay LL audio processing during low-power HDA RTD3
playback, causing audio glitches.
gating even when the DSP is otherwise idle.
Changes
telemetry: pause background refresh work during D0ixpm_runtime(with a no-opstub when
CONFIG_SOF_TELEMETRY_EXTENDED_WINDOWis disabled).resumes it on D0ix exit.
telemetry_update()remain active.Why not a lower-priority preemptible workqueue?
Moving
telemetry_bg_dworkto a dedicated preemptible workqueue (lower prioritythan
ll_thread) has several drawbacks:gating every second (failing D0ix power-gating checks and increasing idle
power).
telemetry_refresh_cold_sections()relies on cooperative execution to avoidsame-core preemption while updating the shared staging buffers
(
tel_*_staging) and the window seqlock (telemetry_seq_begin/end), somaking it preemptible would also require adding synchronization across
telemetry writers.
Pausing the periodic refresh during D0ix addresses both the LL audio starvation
and the periodic D0i3 wakeups with no additional locking or memory overhead.