Skip to content

Commit

Permalink
schedule: config to build LL without task rescheduling
Browse files Browse the repository at this point in the history
adds a config to instantiate the low-latency scheduler without task
rescheduling, given that the operation is optional.

Signed-off-by: Johny Lin <johnylin@google.com>
(cherry picked from commit 7648066)
  • Loading branch information
johnylin76 committed Feb 20, 2025
1 parent c581151 commit 3a1aff8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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

0 comments on commit 3a1aff8

Please sign in to comment.