cpuset_updat...sks_nodemask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

cpuset_update_tasks_nodemask β€” bestie, this is the one that goes through every task in a cpuset and updates their nodemasks for you πŸ’…

(it lives in the Kernel API Manual, iykyk ✨)


✨ SYNOPSIS ✨

void cpuset_update_tasks_nodemask (struct cpuset *cs );

πŸŽ€ ARGUMENTS πŸŽ€

  • cs β€” the cpuset whose tasks all need their mems_allowed mask changed. that's the whole assignment, no cap 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: it iterates through each and every task of cs, updating its mems_allowed to the effective cpuset's. literally one by one, no skipping, she's thorough πŸ’–

the important part β€” and hear me out β€” this function gets called with cpuset_mutex held, so cpuset membership stays stable the entire time. nothing's shifting around under her feet. iconic behavior, honestly πŸ”₯

here's the little crew she's rolling with:

  • cpuset_change_task_nodemask: guarantee_online_mems
  • mpol_rebind_mm: effective_mems
  • cpuset_migrate_mm: guarantee_online_mems
  • old_mems_allowed: guarantee_online_mems

and for v2 specifically: guarantee_online_mems should return a node mask that is the same as the effective_mems of current cpuset. that's the vibe check for v2, don't forget it ⭐


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./kernel/cgroup/cpuset.c β€” and the whole friend group, aka:

cpuset_lock(9), cpuset_full_lock(9), partition_is_populated(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), 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)

go read them too, they're all eating, fr fr πŸ‘‘


🧚 that's the whole page bestie. ./kernel/cgroup, October 2026 β€” mwah, take care of her πŸ’…πŸ’–πŸŒΈ
πŸ“¦ where this page comes from