partition_is_populated(9)
π 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):
cpuset_lock(9)cpuset_full_lock(9)alloc_cpumasks(9)alloc_tmpmasks(9)free_tmpmasks(9)dup_or_alloc_cpuset(9)free_cpuset(9)cpus_excl_conflict(9)cpuset_update_tasks_cpumask(9)compute_effective_cpumask(9)compute_effective_nodemask(9)rm_siblings_excl_cpus(9)update_parent_effective_cpumask(9)compute_partition_effective_cpumask(9)update_sibling_cpumasks(9)validate_partition(9)partition_cpus_change(9)update_cpumask(9)update_exclusive_cpumask(9)cpuset_update_tasks_nodemask(9)update_prstate(9)cpuset_css_alloc(9)cpuset_init(9)cpuset_hotplug_update_tasks(9)cpuset_handle_hotplug(9)cpuset_init_smp(9)cpuset_cpus_allowed_locked(9)cpuset_cpus_allowed(9)cpuset_cpus_allowed_fallback(9)cpuset_mems_allowed(9)cpuset_nodemask_valid_mems_allowed(9)cpuset_nodes_allowed(9)cpuset_spread_node(9)cpuset_mem_spread_node(9)cpuset_mems_allowed_intersects(9)cpuset_print_current_mems_allowed(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
- 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