diff options
| author | Tejun Heo <tj@kernel.org> | 2025-10-06 15:51:47 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-10-13 08:49:29 -1000 |
| commit | cded46d971597ecfe505ba92a54253c0f5e1f2e4 (patch) | |
| tree | 8d0ea19e4d015795e801d03f24eab7973aa913e1 /rust/helpers/workqueue.c | |
| parent | c0d630ba347c7671210e1bab3c79defea19844e9 (diff) | |
sched_ext: Make scx_bpf_dsq_insert*() return bool
In preparation for hierarchical schedulers, change scx_bpf_dsq_insert() and
scx_bpf_dsq_insert_vtime() to return bool instead of void. With
sub-schedulers, there will be no reliable way to guarantee a task is still
owned by the sub-scheduler at insertion time (e.g., the task may have been
migrated to another scheduler). The bool return value will enable
sub-schedulers to detect and gracefully handle insertion failures.
For the root scheduler, insertion failures will continue to trigger scheduler
abort via scx_error(), so existing code doesn't need to check the return
value. Backward compatibility is maintained through compat wrappers.
Also update scx_bpf_dsq_move() documentation to clarify that it can return
false for sub-schedulers when @dsq_id points to a disallowed local DSQ.
Reviewed-by: Changwoo Min <changwoo@igalia.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions
