Skip to content

[Userspace LL] schedule: dp: call directly instead of a notifier - #11063

Open
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:dirdp
Open

[Userspace LL] schedule: dp: call directly instead of a notifier#11063
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:dirdp

Conversation

@lyakh

@lyakh lyakh commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

scheduler_dp_ll_tick() is currently registered as a notifier callback, but it's always triggered deterministically, always with the same-core-only flag, which leads to it being called immediately. So the notifier only adds a layer of indirection and reduces clarity. Replace it with a direct function call.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the notifier-based indirection for the Zephyr LL “post-run” DP tick and replaces it with a direct scheduler_dp_ll_tick() call from the LL scheduler, aiming to improve clarity since the notifier was deterministically invoked immediately anyway.

Changes:

  • Replaced NOTIFIER_ID_LL_POST_RUN emission in zephyr_ll.c with a direct scheduler_dp_ll_tick() call.
  • Removed notifier registration/usage from the DP scheduler and updated scheduler_dp_ll_tick() to a simple void API.
  • Simplified scheduler_dp_recalculate() by dropping the is_ll_post_run parameter and updating its implementations.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/schedule/zephyr_ll.c Calls DP tick directly after LL run instead of emitting a notifier event.
src/schedule/zephyr_dp_schedule.h Updates the scheduler_dp_recalculate() prototype to remove the boolean parameter.
src/schedule/zephyr_dp_schedule.c Removes notifier registration; updates scheduler_dp_ll_tick() signature and init flow.
src/schedule/zephyr_dp_schedule_thread.c Updates scheduler_dp_recalculate() signature and removes the LL-post-run conditional from countdown logic.
src/schedule/zephyr_dp_schedule_application.c Mirrors the scheduler_dp_recalculate() signature/logic change for userspace application builds.
src/include/sof/schedule/dp_schedule.h Exposes scheduler_dp_ll_tick() in the public DP scheduler API.

Comment thread src/include/sof/schedule/dp_schedule.h
Comment thread src/schedule/zephyr_dp_schedule_thread.c Outdated
Comment thread src/schedule/zephyr_ll.c
scheduler_dp_ll_tick() is currently registered as a notifier
callback, but it's always triggered deterministically, always with
the same-core-only flag, which leads to it being called immediately.
So the notifier only adds a layer of indirection and reduces clarity.
Replace it with a direct function call.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Can you update the README.md as well?

Comment thread src/schedule/zephyr_ll.c
@lyakh

lyakh commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Looks good. Can you update the README.md as well?

@kv2019i done

@kv2019i

kv2019i commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Looks good. Can you update the README.md as well?

@kv2019i done

But where @lyakh ? I don't see any change to README.md...?

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