Skip to content

Commit 7648066

Browse files
johnylin76lgirdwood
authored andcommitted
schedule: config to build LL without task rescheduling
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>
1 parent 0a0cc6b commit 7648066

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/schedule/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ config SCHEDULE_LL_STATS_LOG_WINDOW_SIZE
4141
Size of the statistics window as a power of two. The window size
4242
setting also impacts the rate of reporting. With 1ms scheduler tick,
4343
default of 10 results in 1024msec window size.
44+
45+
config SCHEDULE_LL_NO_RESCHEDULE_TASK
46+
bool "Low-latency scheduler skips task rescheduling"
47+
default n
48+
help
49+
Select this to instantiate the low-latency scheduler without task
50+
rescheduling, given that the operation is optional. Under such cases,
51+
scheduler_ops::reschedule_task will set to NULL instead, tasks with
52+
the attempt to reschedule (e.g. DMA trace works) will be relinguished
53+
directly and return no error.

src/schedule/ll_schedule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,11 @@ static int schedule_ll_task_cancel(void *data, struct task *task)
684684
return 0;
685685
}
686686

687+
#if CONFIG_SCHEDULE_LL_NO_RESCHEDULE_TASK
688+
/* As a null function pointer */
689+
#define reschedule_ll_task ((void*)0)
690+
691+
#else
687692
static int reschedule_ll_task(void *data, struct task *task, uint64_t start)
688693
{
689694
struct ll_schedule_data *sch = data;
@@ -717,6 +722,7 @@ static int reschedule_ll_task(void *data, struct task *task, uint64_t start)
717722

718723
return 0;
719724
}
725+
#endif
720726

721727
static void scheduler_free_ll(void *data, uint32_t flags)
722728
{

0 commit comments

Comments
 (0)