cpuset_hotplug_update_tasks(9)
π cpuset_hotplug_update_tasks(9) π
okay so bestie, we're in the Kernel API Manual today and this one is literally about keeping your cpuset from falling apart when hardware ghosts you π«Ά
β¨ NAME β¨
cpuset_hotplug_update_tasks β update tasks in a cpuset for hotunplug
like, the whole vibe is: stuff goes offline, and this function makes sure the tasks land somewhere safe π¦
πΈ SYNOPSIS πΈ
void cpuset_hotplug_update_tasks (struct cpuset *cs , struct tmpmasks
*tmp );
no cap, that's the whole signature π
π ARGUMENTS π
csβ the cpuset in interest π like, the one we're actually looking attmpβ thetmpmasksstructure pointer β¨ a little scratch space situation
π₯ DESCRIPTION π₯
okay so here's what happens, bestie. It compares cs's cpu and mem masks against top_cpuset, and if some of them have gone offline, it updates cs accordingly. iykyk β offline stuff is not it π
and then the dramatic part: if cs ends up with no CPU or memory, all its tasks are moved to the nearest ancestor with both resources. like, the tasks get rehomed to the closest ancestor that actually has both, fr fr ππ
not me stressing about a cpuset with zero resources β but that's exactly the case this handles, so it's fine, we're fine π
π SEE ALSO π
Kernel file ./kernel/cgroup/cpuset.c and honestly the whole friend group:
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)cpuset_update_tasks_nodemask(9)update_prstate(9)cpuset_css_alloc(9)cpuset_init(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)
okay that's the whole page, go off π β¨
sign-off time π: this lil page lives in./kernel/cgroup, dated October 2026, and it's literally titledcpuset_hotplug_update_tasks(9)β slay, bye bestie π
π¦ 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