KFunc scx_bpf_select_cpu_dfl
This function is the default implementation of ops.select_cpu()
Definition
Can only be called from ops.select_cpu()
if the built-in CPU selection is enabled, ops.update_idle()
is missing, or SCX_OPS_KEEP_BUILTIN_IDLE
is set. p
, prev_cpu
and wake_flags
match ops.select_cpu()
.
Parameters
p:
task_struct to select a CPU for
prev_cpu
: CPU p
was on previously
wake_flags
: SCX_WAKE_*
flags
is_idle
: out parameter indicating whether the returned CPU is idle
Returns
The picked CPU with is_idle
indicating whether the picked CPU is currently idle and thus a good candidate for direct dispatching.
Signature
s32 scx_bpf_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags, bool *is_idle)
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