Skip to content

schedule: add a function for finding userspace scherulers - #11109

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

schedule: add a function for finding userspace scherulers#11109
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:sched

Conversation

@lyakh

@lyakh lyakh commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

scheduler_get_data() only finds scheduler data for kernel mode schedulers. Add a similar function for userspace schedulers.
part of #10945

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>
Copilot AI lite review requested due to automatic review settings August 20, 2026 14:43

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 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() when CONFIG_SOF_USERSPACE_LL is 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);
}
@kv2019i

kv2019i commented Aug 20, 2026

Copy link
Copy Markdown
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.

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