Skip to content

Commit afd1428

Browse files
lrgirdwoclaude
andcommitted
docs: schedule: describe the kernel parts of the schedulers
Update the scheduler README for the split of the scheduler sources: the kernel parts are in src/kernel/schedule, the TWB scheduler is there in full, and the shared data structures are in sof/schedule/zephyr_ll.h and sof/schedule/zephyr_dp_schedule.h. Point the syscall table of the user-space README at the kernel files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 5bc90bb commit afd1428

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎src/include/sof/userspace/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ syscall by subsystem:
124124
| CPU | `cpu_get_id` | `sof/lib/cpu.h` | `zephyr/syscall/cpu.c` / `zephyr/lib/cpu.c` |
125125
| Module management | `mod_balloc_align`, `mod_alloc_ext`, `mod_free`, `mod_free_all`, `mod_data_blob_handler_new`, `mod_data_blob_set`, `mod_fast_get` | `sof/audio/module_adapter/module/generic.h` | scattered: `audio/module_adapter/module/generic.c` |
126126
| Library manager | `lib_manager_free_module` | `sof/lib_manager.h` | scattered: `kernel/library_manager/lib_manager.c` |
127-
| Scheduling | `zephyr_ll_task_sem_alloc`, `zephyr_ll_task_sem_free`, `scheduler_dp_internal_free`, `scheduler_dp_ll_tick` | `sof/schedule/ll_schedule_domain.h`, `sof/schedule/dp_schedule.h` | scattered: `schedule/zephyr_ll.c`, `schedule/zephyr_dp_schedule*.c` |
127+
| Scheduling | `zephyr_ll_task_sem_alloc`, `zephyr_ll_task_sem_free`, `scheduler_dp_internal_free`, `scheduler_dp_ll_tick` | `sof/schedule/ll_schedule_domain.h`, `sof/schedule/dp_schedule.h` | scattered: `kernel/schedule/zephyr_ll-kernel.c`, `kernel/schedule/zephyr_dp_schedule*-kernel.c` |
128128
| Debug | `debug_stream_slot_send_record` | `user/debug_stream_slot.h` | scattered: `debug/debug_stream/debug_stream_slot.c` |
129129
| KPB | `kpb_notifier_init` | `sof/audio/kpb.h` | scattered: `audio/kpb.c` |
130130

‎src/schedule/README.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# SOF Scheduling Architecture
22

3-
> **Runs in:** Boundary / bridge — this directory owns the LL/DP schedulers and their thread +
4-
> memory-domain setup. `zephyr_ll.c` and `zephyr_domain.c` are kernel-side; the LL user memory
5-
> domain and heap are set up by `src/kernel/schedule/zephyr_ll_user.c`.
6-
> `zephyr_dp_schedule_thread.c` is boundary code that can create and manage both kernel and
7-
> `K_USER` DP threads depending on configuration; `zephyr_dp_schedule_application.c` is the
8-
> DP application-mode path. This directory hosts the `zephyr_ll_task_sem_*` and
9-
> `scheduler_dp_*` syscalls. See [User/kernel split](../include/sof/userspace/README.md).
3+
> **Runs in:** Boundary / bridge — this directory holds the parts of the LL and DP schedulers
4+
> that run in the scheduler and IPC threads, which are user threads with user-space LL. Their
5+
> kernel parts are in `src/kernel/schedule`, one `*-kernel.c` file per source here: scheduler
6+
> registration and initialization, the LL thread and timer setup and the timer interrupt, the
7+
> DP thread creation and memory domains, the access grants, and the kernel halves of the
8+
> `zephyr_ll_task_sem_*` and `scheduler_dp_*` syscalls. The LL user memory domain and heap are
9+
> set up by `src/kernel/schedule/zephyr_ll_user.c`, and the TWB scheduler, which is kernel-only,
10+
> is `src/kernel/schedule/zephyr_twb_schedule.c`. The scheduler data structures shared by both
11+
> parts are in `sof/schedule/zephyr_ll.h` and `sof/schedule/zephyr_dp_schedule.h`. See
12+
> [User/kernel split](../include/sof/userspace/README.md).
1013
1114
This directory (`src/schedule`) contains the Sound Open Firmware (SOF) scheduling infrastructure, deeply integrated with the underlying Zephyr RTOS. SOF utilizes a multi-tiered scheduling approach to cater to different real-time constraints, ranging from hard real-time, low-latency requirements to more relaxed, compute-intensive data processing tasks.
1215

0 commit comments

Comments
 (0)