cpuset_hotplug_update_tasks(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 at
  • tmp β€” the tmpmasks structure 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:


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 titled cpuset_hotplug_update_tasks(9) β€” slay, bye bestie πŸ’œ
πŸ“¦ where this page comes from