partition_is_populated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… partition_is_populated(9)

okay so bestie, this is a page from the Kernel API Manual β€” yes, the Kernel API Manual, we're in the big leagues now πŸŽ€ β€” and it's all about one lil function that answers one very important question: is there anyone home in this partition or not? πŸ‘€


✨ NAME ✨

partition_is_populated β€” literally just checking if a partition has tasks in it, no cap 🫢


🌸 SYNOPSIS 🌸

bool partition_is_populated (struct cpuset *cs , struct cpuset
*excluded_child );

she takes two struct cpuset * pointers and hands you back a bool, iconic behaviour honestly πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cs β€” the partition root we're checking, like the main character of this whole operation πŸ‘‘
  • excluded_child β€” a child cpuset that gets excluded from the task checking. like, "not you, bestie, sit this one out" πŸ™ˆ

⭐ RETURN ⭐

returns true if there are tasks, and false if there aren't. that's it, that's the whole vibe check πŸ”₯


πŸ’œ DESCRIPTION πŸ’œ

so cs should be a valid partition root, or a cpuset that's about to become a partition root β€” either one works, we're flexible like that πŸ’…

excluded_child should be non-NULL when this cpuset is going to become a partition itself. like when it's stepping into its own main character era ✨

🚨 okay important note: a remote partition is not allowed underneath a valid local or remote partition. so if a non-partition root child is populated, the whole partition is considered populated. literally the whole thing. no exceptions 🫢

🧚 SEE ALSO 🧚

the kernel file ./kernel/cgroup/cpuset.c and honestly a whole friend group of functions, all of them tagged with (9):

like, go read those too if you wanna be as obsessed with cpusets as we are πŸ˜­πŸ’€


kisses and good vibes, this page lives in ./kernel/cgroup, dated October 2026, and it's partition_is_populated(9) forever and ever πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from