|
Sound Open Firmware
|

Go to the source code of this file.
Data Structures | |
| union | scheduler_dp_thread_ipc_param |
Enumerations | |
| enum | { DP_TASK_EVENT_PROCESS = BIT(0) , DP_TASK_EVENT_CANCEL = BIT(1) , DP_TASK_EVENT_IPC = BIT(2) , DP_TASK_EVENT_IPC_DONE = BIT(3) } |
Functions | |
| int | scheduler_dp_init (void) |
| DP scheduler is a scheduler that creates a separate preemptible Zephyr thread for each SOF task. | |
| int | scheduler_dp_task_init (struct task **task, const struct sof_uuid_entry *uid, const struct task_ops *ops, struct processing_module *mod, uint16_t core, size_t stack_size, uint32_t options) |
| initialize a DP task and add it to scheduling It must be called on core the task is declared to run on | |
| void | scheduler_dp_ll_tick (void) |
| void | scheduler_get_task_info_dp (struct scheduler_props *scheduler_props, uint32_t *data_off_size) |
| Extract information about scheduler's tasks. | |
| static int | scheduler_dp_thread_ipc (struct processing_module *pmod, unsigned int cmd, const union scheduler_dp_thread_ipc_param *param) |
| anonymous enum |
| int scheduler_dp_init | ( | void | ) |
DP scheduler is a scheduler that creates a separate preemptible Zephyr thread for each SOF task.
The task execution may be delayed and task may be re-scheduled periodically NOTE: delayed start and rescheduling takes place in sync with LL scheduler, meaning the DP scheduler is triggered on each core after all LL task have been completed
Task run() may return: SOF_TASK_STATE_RESCHEDULE - the task will be rescheduled as specified in scheduler period note that task won't ever be rescheduled if LL is not running SOF_TASK_STATE_COMPLETED - the task will be removed from scheduling, calling schedule_task will add the task to processing again task_complete() will be called SOF_TASK_STATE_CANCEL - the task will be removed from scheduling, calling schedule_task will add the task to processing again task_complete() won't be called other statuses - assert will go off
NOTE: task - means a SOF task thread - means a Zephyr preemptible thread
TODO - EDF: Threads run on the same priority, lower than thread running LL tasks. Zephyr EDF mechanism is used for decision which thread/task is to be scheduled next. The DP scheduler calculates the task deadline and set it in Zephyr thread properties, the final scheduling decision is made by Zephyr.
Each time tick the scheduler iterates through the list of all active tasks and calculates a deadline based on
Init the Data Processing scheduler
| void scheduler_dp_ll_tick | ( | void | ) |
| int scheduler_dp_task_init | ( | struct task ** | task, |
| const struct sof_uuid_entry * | uid, | ||
| const struct task_ops * | ops, | ||
| struct processing_module * | mod, | ||
| uint16_t | core, | ||
| size_t | stack_size, | ||
| uint32_t | options ) |
initialize a DP task and add it to scheduling It must be called on core the task is declared to run on
| [out] | task | pointer, pointer to allocated task structure will be return |
| [in] | uid | pointer to UUID of the task |
| [in] | ops | pointer to task functions |
| [in] | mod | pointer to the module to be run |
| [in] | core | CPU the thread should run on |
| [in] | stack_size | size of stack for a zephyr task |
| [in] | options | task options used for creation |
|
inlinestatic |
| void scheduler_get_task_info_dp | ( | struct scheduler_props * | scheduler_props, |
| uint32_t * | data_off_size ) |
Extract information about scheduler's tasks.
| scheduler_props | Structure to be filled |
| data_off_size | Pointer to the current size of the scheduler_props, to be updated |