SCX_CMASK_DEFINE_SHARD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to the Kernel API Manual page for SCX_CMASK_DEFINE_SHARD(9) πŸ’–βœ¨ This one is all about defining an on-stack cmask sized to one shard, and the vibe check is: keep your ranges in order or things get spicy in the bad way. 🫢


🌸 NAME 🌸

SCX_CMASK_DEFINE_SHARD β€” define an on-stack cmask sized to one shard</p> πŸŽ€


✨ SYNOPSIS ✨

SCX_CMASK_DEFINE_SHARD (NAME , BASE , NR_CIDS );

That’s the whole call shape, bestie β€” no cap. πŸ’…


🧚 ARGUMENTS 🧚

  • NAME β€” the variable name you’re defining. Name it cute, name it clear, just name it. πŸ’–
  • BASE β€” the first cid of the active range. That’s where the range starts, periodt.
  • NR_CIDS β€” the active range length. It must be <= SCX_CID_SHARD_MAX_CPUS, okay? This is not a drill. 😭

πŸ’€ DESCRIPTION πŸ’€

Storage is fixed at SCX_CID_SHARD_MAX_CPUS, and the active range is framed by (BASE, NR_CIDS). Think of it like the vibes are set, the storage is set, and the range has to fit inside that whole situation. ✨

🚨 Warning, bestie: passing NR_CIDS > SCX_CID_SHARD_MAX_CPUS leaves the cmask claiming more bits than the storage actually holds. And then subsequent cmask operations will overrun. That is not slay. That is a bug. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Peep the kernel file ./kernel/sched/ext/types.h, plus __SCX_CMASK_DEFINE(9) and SCX_CMASK_DEFINE(9) β€” iykyk. 🌈


Signed off with love from the source/version ./kernel/sched/ext, dated October 2026 πŸŽ€πŸ’– Mwah!

πŸ“¦ where this page comes from