Skip to content

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

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
lyakh:dirdp
Aug 10, 2026
Merged

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

Conversation

@lyakh

@lyakhlyakh 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.

CopilotAI 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
FileDescription
src/schedule/zephyr_ll.cCalls DP tick directly after LL run instead of emitting a notifier event.
src/schedule/zephyr_dp_schedule.hUpdates the scheduler_dp_recalculate() prototype to remove the boolean parameter.
src/schedule/zephyr_dp_schedule.cRemoves notifier registration; updates scheduler_dp_ll_tick() signature and init flow.
src/schedule/zephyr_dp_schedule_thread.cUpdates scheduler_dp_recalculate() signature and removes the LL-post-run conditional from countdown logic.
src/schedule/zephyr_dp_schedule_application.cMirrors the scheduler_dp_recalculate() signature/logic change for userspace application builds.
src/include/sof/schedule/dp_schedule.hExposes scheduler_dp_ll_tick() in the public DP scheduler API.

Comment threadsrc/include/sof/schedule/dp_schedule.h
Comment threadsrc/schedule/zephyr_dp_schedule_thread.c Outdated
Comment threadsrc/schedule/zephyr_ll.c
@lyakh
lyakhforce-pushed the dirdp branch 2 times, most recently from 5f305bf to 275a6c1CompareAugust 5, 2026 13:58

@kv2019ikv2019i 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 threadsrc/schedule/zephyr_ll.c
@lyakh

lyakh commented Aug 5, 2026

Copy link
Copy Markdown
CollaboratorAuthor

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

@kv2019i done

@kv2019i

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...?

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>
@lyakh

lyakh commented Aug 6, 2026

Copy link
Copy Markdown
CollaboratorAuthor

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

@kv2019i done

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

@kv2019i yeah, well, it was done, but not in a way others apart from me could easily see it... Now it is.

@jsarhajsarha 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.

LGTM

@kv2019i
kv2019i merged commit b8d5999 into thesofproject:mainAug 10, 2026
45 checks passed
Sign up for freeto 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.

4 participants

@lyakh@kv2019i@jsarha