Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick from main] schedule: config to build LL without task rescheduling #9843

Merged
merged 2 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/arch/xtensa/configs/mt8196_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ CONFIG_COMP_KPB=n
CONFIG_COMP_SEL=n
CONFIG_COMP_ASRC=n
CONFIG_DEBUG=y
CONFIG_SCHEDULE_LL_NO_RESCHEDULE_TASK=y
10 changes: 10 additions & 0 deletions src/schedule/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ config SCHEDULE_LL_STATS_LOG_WINDOW_SIZE
Size of the statistics window as a power of two. The window size
setting also impacts the rate of reporting. With 1ms scheduler tick,
default of 10 results in 1024msec window size.

config SCHEDULE_LL_NO_RESCHEDULE_TASK
bool "Low-latency scheduler skips task rescheduling"
default n
help
Select this to instantiate the low-latency scheduler without task
rescheduling, given that the operation is optional. Under such cases,
scheduler_ops::reschedule_task will set to NULL instead, tasks with
the attempt to reschedule (e.g. DMA trace works) will be relinguished
directly and return no error.
6 changes: 6 additions & 0 deletions src/schedule/ll_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,11 @@ static int schedule_ll_task_cancel(void *data, struct task *task)
return 0;
}

#if CONFIG_SCHEDULE_LL_NO_RESCHEDULE_TASK
/* As a null function pointer */
#define reschedule_ll_task ((void*)0)

#else
static int reschedule_ll_task(void *data, struct task *task, uint64_t start)
{
struct ll_schedule_data *sch = data;
Expand Down Expand Up @@ -717,6 +722,7 @@ static int reschedule_ll_task(void *data, struct task *task, uint64_t start)

return 0;
}
#endif

static void scheduler_free_ll(void *data, uint32_t flags)
{
Expand Down
Loading