scx_bpf_task_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_bpf_task_cpu(9)

okay so real quick, this is from the Kernel API Manual bestie, we're in kernel-doc land, section 9, and it's genuinely one of the shorter ones so you can absolutely do this 🫢


✨ NAME ✨

scx_bpf_task_cpu β€” literally just tells you which CPU a task is currently associated with. that's it. that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

__bpf_kfunc s32 scx_bpf_task_cpu (const struct task_struct *p );

no cap, copy that signature exactly, don't go "fixing" the spacing, the spacing is iconic πŸ’…


✨ ARGUMENTS ✨

  • p β€” the task of interest, aka the one you're being nosy about πŸ‘€ it's a const struct task_struct *, so you're looking, not touching. we love boundaries.

✨ SEE ALSO ✨

the kernel file this lives in is ./kernel/sched/ext/ext.c β€” go touch grass in there if you want, and then there's this whole friend group of related pages, all of them, not one skipped, i promise 🌸:

like yes that's a lot of besties but every single one of them is in the group chat, no one gets left on read πŸ’€


lowkey important: this page has no options, no env vars, no exit statuses, no bugs section. what you see is what you get, and what you get is a CPU lookup. slay ✨

that's the whole page bestie!! πŸŒˆπŸ’– sourced from ./kernel/sched/ext and dated October 2026 β€” see you in the next manpage, mwah πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from