scheduler: zephyr_ll: misc fixes to make scheduler run in user-space#10824
Open
kv2019i wants to merge 2 commits into
Open
scheduler: zephyr_ll: misc fixes to make scheduler run in user-space#10824kv2019i wants to merge 2 commits into
kv2019i wants to merge 2 commits into
Conversation
Don't use sof_cycle_get_64() if SOF built for user-space LL. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
No need to check whether we are running in ISR as this can never happen when LL scheduler is run in user-space. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i
commented
May 28, 2026
| if (k_is_in_isr()) { | ||
| tr_err(&ll_tr, "cannot free tasks from interrupt context!"); | ||
| return -EDEADLK; | ||
| } |
Collaborator
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make the Zephyr low-latency (LL) scheduler and related timing code safe to run in Zephyr user-space builds (CONFIG_SOF_USERSPACE_LL), avoiding kernel-only APIs in those configurations.
Changes:
- Switch DAI wallclock retrieval to a user-space-safe time source under
CONFIG_SOF_USERSPACE_LL. - Avoid calling
k_is_in_isr()inzephyr_ll_task_free()when building for user-space.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
zephyr/wrapper.c |
Adjusts DAI wallclock source for user-space builds. |
src/schedule/zephyr_ll.c |
Skips ISR-context check when compiled for user-space LL scheduler. |
Comment on lines
+268
to
+272
| #ifndef CONFIG_SOF_USERSPACE_LL | ||
| *wallclock = sof_cycle_get_64(); | ||
| #else | ||
| *wallclock = k_uptime_get(); | ||
| #endif |
Collaborator
Author
|
For context, part of #10558 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few standalone changes to make LL scheduler code user-space safe.