scx_cmask_ref_init_kern(9)
π scx_cmask_ref_init_kern β bestie, let's bind that ref
okay so real talk, this one's from the Kernel API Manual (section 9, kernel developer land, very β¨serious businessβ¨ but we're gonna get through it together).
π NAME π
scx_cmask_ref_init_kern β bind a scx_cmask_ref to a kernel-owned cmask. that's it, that's the whole vibe: you got a ref, you got a cmask, we're introducing them. π«Ά
β¨ SYNOPSIS β¨
void scx_cmask_ref_init_kern (struct scx_sched *sch , struct scx_cmask
*m , u32 base , u32 nr_cids , struct scx_cmask_ref *ref );
like, look at her. five params, no return, zero notes. she's giving "void function, no drama." π
πΈ ARGUMENTS πΈ
schβ the scheduler that the cmask belongs to. her home base, her people, iykyk.mβ kernel address of the target cmask π and important: the storage there is sized fornr_cidsatbase. like, the space has to already fit, bestie, don't come in undersized.baseβ first cid of the active range. the starting line. πnr_cidsβ active range length. how many cids we're working with, fr fr.refβ output ref. this is where the freshly-bound ref goes π
π¦ DESCRIPTION π¦
so this is basically scx_cmask_ref_init's chill, more careful sibling. the difference? here the geometry is supplied by the caller, not read from m's header. and that matters because β not me being dramatic β a concurrent BPF write to the header literally could not steer later sizing or offsets in this version. π‘οΈ
you pass in the trusted geometry, it rewrites the header from that trusted geometry, and then it binds ref to it. periodt. clean, predictable, no sneaky header shenanigans. πβ¨
ngl the whole point here is trust: the numbers come from you, not from a header that something else might be poking at. that's the entire glow-up. π
π₯ SEE ALSO π₯
Kernel file ./kernel/sched/ext/cid.c β go read the source, bestie, it ate:
scx_cid_publish_tables(9)scx_cid_retire_tables(9)scx_cid_init(9)scx_cmask_clear(9)scx_cmask_fill(9)scx_bpf_cid_override(9)scx_bpf_cid_to_cpu(9)scx_bpf_cpu_to_cid(9)scx_cmask_subset(9)scx_cmask_empty(9)scx_bpf_cid_topo(9)scx_cmask_ref_init(9)scx_cmask_ref_shard(9)scx_cmask_ref_or(9)scx_cmask_ref_copy(9)scx_cmask_ref_from_cpumask(9)
like... a whole friend group. go say hi. π§π
okay that's the page!! this one lives under ./kernel/sched/ext in the Kernel API Manual, dated October 2026, and she's filed as scx_cmask_ref_init_kern(9). mwah, go bind some refs responsibly ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms