Skip to content

KFunc scx_bpf_dsq_move_to_local

v6.13

This function moves a task from a DSQ to the current CPU's local DSQ.

Note

A newer version of this kfunc (scx_bpf_dsq_move_to_local___v2) as been added in 7.1. At some point in the future the new kfunc will be renamed to become this kfunc, effectively modifying its function signature. Use a compatibility layer when using across multiple kernel versions.

Definition

Move a task from the non-local DSQ identified by dsq_id to the current CPU's local DSQ for execution. Can only be called from sched_ext_ops.dispatch.

This function flushes the in-flight dispatches from scx_bpf_dsq_insert before trying to move from the specified DSQ. It may also grab rq locks and thus can't be called under any BPF locks.

Parameters

dsq_id: DSQ to move task from

Returns

Returns true if a task has been moved, false if there isn't any task to move.

Signature

bool scx_bpf_dsq_move_to_local(u64 dsq_id)

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome