scx_cmask_ref_init_kern(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 for nr_cids at base. 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:

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