bpf_cpumask_release(9)
πΈ NAME πΈ
bpf_cpumask_release β bestie, this is the one that lets go of a BPF cpumask you grabbed earlier π
(this is a page from the Kernel API Manual, and yes she is iconic for it)
β¨ SYNOPSIS β¨
__bpf_kfunc void bpf_cpumask_release (struct bpf_cpumask *cpumask );
π ARGUMENTS π
cpumaskβ the cpumask that's getting released. that's her. that's the one you're letting go π«Ά
π DESCRIPTION π
okay so. bpf_cpumask_release releases a previously acquired reference to a BPF cpumask. very demure, very mindful β you took a reference, now you're giving it back π₯
and here's the part where it gets main character: when the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator. so like, the actual free doesn't happen on the spot β it happens later, in that RCU callback, courtesy of the BPF memory allocator. no cap, that's literally it πβ¨
ngl the "final reference" thing matters β drop the last one and the object is on its way out, just not instantly. RCU callback era π¦
π SEE ALSO π
- Kernel file
./kernel/bpf/cpumask.c struct bpf_cpumask(9)bpf_cpumask_create(9)bpf_cpumask_acquire(9)bpf_cpumask_first(9)bpf_cpumask_first_zero(9)bpf_cpumask_first_and(9)bpf_cpumask_set_cpu(9)bpf_cpumask_clear_cpu(9)bpf_cpumask_test_cpu(9)bpf_cpumask_test_and_set_cpu(9)bpf_cpumask_test_and_clear_cpu(9)bpf_cpumask_setall(9)bpf_cpumask_clear(9)bpf_cpumask_and(9)bpf_cpumask_or(9)bpf_cpumask_xor(9)bpf_cpumask_equal(9)bpf_cpumask_intersects(9)bpf_cpumask_subset(9)bpf_cpumask_empty(9)bpf_cpumask_full(9)bpf_cpumask_copy(9)bpf_cpumask_any_distribute(9)bpf_cpumask_any_and_distribute(9)bpf_cpumask_weight(9)bpf_cpumask_populate(9)
the whole friend group, fr fr π§ββοΈ
and that's the page, bestie π this one lives at ./kernel/bpf, and it's dated October 2026 β screenshot it, cite it, send it to the group chat, periodt π
π¦ 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