scx_cmask_ref_from_cpumask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– scx_cmask_ref_from_cpumask(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for scx_cmask_ref_from_cpumask(9) β€” yes, that whole mouthful. it's giving kernel API internals but make it cute ✨ and we're gonna get through it together, no cap.


🌸 NAME 🌸

scx_cmask_ref_from_cpumask β€” Populate @ref's arena cmask from a cpumask πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

void scx_cmask_ref_from_cpumask (const struct scx_cmask_ref *ref , const
       struct cpumask *cpumask );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ref β€” a kern-bound ref, see scx_cmask_ref_init_kern 🫢
  • cpumask β€” cpus to translate into cids ⭐

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the vibe: this function writes ref's active range one word at a time, and it sets each cid's bit when its cpu is in cpumask. πŸ’–

the offsets and length come from ref's trusted geometry, and the stores use WRITE_ONCE because BPF may read concurrently β€” so the arena header is never read. periodt. 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./kernel/sched/ext/cid.c β€” and these besties right here:


xoxo bestie πŸ’– β€” source/version: ./kernel/sched/ext, date: October 2026, page: scx_cmask_ref_from_cpumask(9).

πŸ“¦ where this page comes from