userspace: dp: Add option for executing userspace module IPC in DP thread#10579
userspace: dp: Add option for executing userspace module IPC in DP thread#10579softwarecki wants to merge 1 commit intothesofproject:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Zephyr Kconfig option to route userspace module IPC handling through each module’s DP thread (instead of the shared userspace worker), and wires DP-thread event/work-item plumbing through the DP scheduler and userspace proxy layers.
Changes:
- Add
SOF_USERSPACE_MOD_IPC_BY_DP_THREADKconfig option. - Extend DP scheduler thread/event handling to wake on IPC events and run the userspace proxy IPC handler in the DP thread.
- Update userspace proxy to optionally signal/await IPC via the DP thread’s
k_event, plus adjust system-agent startup timing for this mode.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
zephyr/Kconfig |
Adds the new configuration option controlling IPC execution context. |
src/schedule/zephyr_dp_schedule_thread.c |
Handles IPC events in DP thread and registers per-module IPC handler/event linkage. |
src/schedule/zephyr_dp_schedule.h |
Adds per-task storage for the IPC work item pointer. |
src/include/sof/audio/module_adapter/library/userspace_proxy.h |
Extends userspace context with DP-thread event pointer and declares IPC handler registration API. |
src/audio/module_adapter/module_adapter.c |
Adjusts DP task/free sequencing around userspace application teardown. |
src/audio/module_adapter/module/generic.c |
Tweaks DP task cancellation behavior under the new IPC-by-DP-thread mode. |
src/audio/module_adapter/library/userspace_proxy.c |
Implements DP-thread IPC signaling path, IPC handler registration, and defers agent startup in this mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lgirdwood
left a comment
There was a problem hiding this comment.
@softwarecki are you able to respond to copilot, e.g. some comments may be valid around deref of pointers, best to check and resolve.
Btw, can any of this be tested in a ztest today ?
…read Add the SOF_USERSPACE_MOD_IPC_BY_DP_THREAD Kconfig option and implement support for executing userspace module IPC in its DP thread instead of the shared user worker thread. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
85dae31 to
39cc5db
Compare
|
@lgirdwood: I did not think about a ztest yet. I tested it by enabling the config option. I added it in the userspace overlay. |
Add the
SOF_USERSPACE_MOD_IPC_BY_DP_THREADKconfig option and implement support for executing userspace module IPC in its DP thread instead of the shared user worker thread.