schedule: add a function for finding userspace scherulers - #11109
Open
lyakh wants to merge 1 commit into
Open
Conversation
scheduler_get_data() only finds scheduler data for kernel mode schedulers. Add a similar function for userspace schedulers. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
lyakh
requested review from
LaurentiuM1234,
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
marcinszkudlinski,
mmaka1,
pblaszko and
plbossart
as code owners
August 20, 2026 14:43
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the scheduler data lookup API to support user-managed scheduler instances, and updates the Zephyr LL scheduler code to query the correct scheduler list when userspace LL scheduling is enabled.
Changes:
- Introduce a shared
scheduler_list_get_data()helper for looking up scheduler private data in a given scheduler list. - Add
scheduler_get_user_data()to retrieve scheduler data from the userspace scheduler list. - Update Zephyr LL scheduler helpers to use
scheduler_get_user_data()whenCONFIG_SOF_USERSPACE_LLis enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/schedule/zephyr_ll.c | Uses the userspace scheduler data accessor when userspace LL scheduling is enabled. |
| src/include/sof/schedule/schedule.h | Adds list-based lookup helper and a userspace scheduler data accessor. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+216
to
+224
| /** | ||
| * Retrieves userspace scheduler's data. | ||
| * @param type SOF_SCHEDULE_ type. | ||
| * @return Pointer to scheduler's data. | ||
| */ | ||
| static inline void *scheduler_get_user_data(uint16_t type) | ||
| { | ||
| return scheduler_list_get_data(*arch_user_schedulers_get(), type); | ||
| } |
Collaborator
|
@lyakh Do you have the updated full series somewhere? I'm wondering where you need this? I remember I dropped variants like these earlier and looked up the data with another method. Maybe won't work for full DP/multicore, but something I'd like to double-check. |
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.
scheduler_get_data() only finds scheduler data for kernel mode schedulers. Add a similar function for userspace schedulers.
part of #10945