cpuset_updat...sks_nodemask(9)
πΈ 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 theirmems_allowedmask 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_memsmpol_rebind_mm:effective_memscpuset_migrate_mm:guarantee_online_memsold_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
- 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