scx_bpf_nr_cids(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ scx_bpf_nr_cids(9) β€” from the Kernel API Manual, but make it group-chat πŸ’…

okay so bestie, this is a page from the Kernel API Manual and honestly it's one of the shortest ones you'll ever meet β€” which is kind of iconic of it ngl. tiny page, huge "I already know my worth" energy. let's get into it πŸŽ€


✨ NAME ✨

scx_bpf_nr_cids β€” Return the size of the cid space 🫢

that's it. that's the whole assignment. it tells you how many cids exist. lowkey a baddie for being that direct.


🌸 SYNOPSIS 🌸

__bpf_kfunc u32 scx_bpf_nr_cids (void );

so it's a __bpf_kfunc, it hands you back a u32, and it takes (void ) β€” which means nothing, bestie. void. it needs zero input. it's giving "I don't need you, I just need to exist" πŸ’€


πŸ“ ARGUMENTS πŸ“

  • void β€” no arguments. none. not one. not even a little guy. the function just shows up, does its thing, and leaves ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so the whole vibe here, and this is the ENTIRE description, don't blink:

  • it equals num_possible_cpus β€” so whatever that is, this is that. same number, different outfit πŸ’…
  • and all the valid cids live in [0, return value) β€” so like, the range starts at 0 and stops just before whatever number you got back. < on the right side, not <=. do NOT forget that, this is not a drill 😭
heads up bestie: that half-open interval is doing real work. 0 is in, the return value itself is not in. fr fr, don't @ me, that's literally what the notation says 🌈

⭐ SEE ALSO ⭐

also it lives in the kernel file ./kernel/sched/ext/ext.c β€” here's everybody it wants you to go meet, all of them, in order, no cuts πŸ”₯:

ninety of them. NINETY. the way this page said "here's my whole friend group" and just. kept. going. 😭🫢


and that's the whole page, bestie β€” the entire thing. go forth and vibe check your cids responsibly πŸ’œ

okay so the sign-off: this cutie is sourced from ./kernel/sched/ext and it's dated October 2026. that's the version, that's the date, that's the wrap. slay, bye! πŸ‘‘πŸ’–

πŸ“¦ where this page comes from