Skip to main content

scx_ops_cid_open

Macro scx_ops_cid_open 

Source
macro_rules! scx_ops_cid_open {
    ($builder: expr, $obj_ref: expr, $ops: ident, $open_opts: expr) => { ... };
}
Expand description

Open a cid-form (struct sched_ext_ops_cid) skeleton. Pair with scx_ops_cid_load!(), which skips the fix-ups for the cpu-form-only cgroup callbacks that don’t exist in the cid form.

A cid-form scheduler registers through bpf_scx_reg_cid() rather than bpf_scx_reg(), so common.bpf.h’s prolog probe gets repointed at it. Both the cid form and bpf_scx_reg_cid() appeared in v7.2, so a kernel that accepts this skeleton always has the symbol.

An object built with SCX_ARENA_SCALAR carries the __SCX_MARKER_arena_scalar rodata marker and is loaded with BPF_F_ARENA_SCALAR. One without the marker loads as before. The flag is in bpf-next (4c651a91bdfc) and due in v7.4, so a marked object needs a kernel that has it.