scx_cmask_ref_copy(9)
π scx_cmask_ref_copy(9)
okay so first things first, this is a page from the Kernel API Manual, section 9, and the star of the show is scx_cmask_ref_copy. bestie, we're in the kernel scheduler files rn, so hydrate and pay attention π
β¨ NAME β¨
scx_cmask_ref_copy β literally copies @src into the arena cmask that @ref is pointing at π«Ά
π SYNOPSIS π
void scx_cmask_ref_copy (const struct scx_cmask_ref *ref , const struct
scx_cmask *src );
that's it, that's the whole signature, no cap β¨
πΈ ARGUMENTS πΈ
refβ a validated ref. like, it's already been checked, so it's good to go πsrcβ a stable kernel cmask. this is the source of truth we're copying from π¦
π§ DESCRIPTION π§
so here's the vibe check π₯ β the bits that live inside the intersection of ref's snapshotted range and src's range take src's values. everything outside that intersection? left completely untouched, exactly as it was π
and the stores on ref->src use WRITE_ONCE, because BPF may be reading and writing at the same time π so like... concurrency is real, we're being safe about it, periodt.
π SEE ALSO π
okay so there's a whole friend group here, iykyk:
- Kernel file
./kernel/sched/ext/cid.c 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_init_kern(9)scx_cmask_ref_shard(9)scx_cmask_ref_or(9)scx_cmask_ref_from_cpumask(9)
π and that's the whole page bestie! this one's straight out of ./kernel/sched/ext, dated October 2026, and the page is scx_cmask_ref_copy(9) β go forth and copy those cmasks ππβ
π¦ 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