cpuset_handle_hotplug(9)
π cpuset_handle_hotplug β the kernel API manual, bestie edition β¨
okay so this is a page from the Kernel API Manual and honestly? it's a whole vibe. it's cpuset_handle_hotplug(9), and it does exactly one thing but she does it thoroughly. let's get into it π«Ά
πΈ NAME πΈ
cpuset_handle_hotplug β handle CPU/memory hot{,un}plug for a cpuset
like, both directions. hotplug AND hotunplug. the braces are doing the lord's work there π
β¨ SYNOPSIS β¨
void cpuset_handle_hotplug (void );
that's it. that's the whole signature. she takes nothing and gives everything π
π ARGUMENTS π
voidβ no arguments. zero. none. not a single one. she doesn't need your input, she's booked and busy π
π₯ DESCRIPTION π₯
okay so listen. this function gets called after either CPU or memory configuration has changed, and it updates the cpuset accordingly. that's the whole job description bestie β¨
the top_cpuset is always synchronized to cpu_active_mask and N_MEMORY β and yes that's necessary, because it's what makes cpusets transparent (like, of no affect) on systems that are actively using CPU hotplug but making no active use of cpusets. no cap, that's the whole point π«Ά
non-root cpusets are only affected by offlining. so if any CPUs or memory nodes have been taken down, cpuset_hotplug_update_tasks is invoked on all descendants. the whole family gets the update, not just the top π§
β οΈ note that CPU offlining during suspend is ignored. we don't modify cpusets across suspend/resume cycles at all. not even a little. not even a vibe check π
CPU / memory hotplug is handled synchronously. no async shenanigans, no "we'll get to it later", she does it right then π
π SEE ALSO π
first up, the kernel file, bestie β go read the source, it's giving main character energy:
./kernel/cgroup/cpuset.c
and then the whole group chat of related functions, all of them, in order, because we don't skip anyone at this table π
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_hotplug_update_tasks(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)
π¦ that's the page!! this one lives in./kernel/cgroup, dated October 2026, and it's filed undercpuset_handle_hotplug(9). slay, go touch some cpusets responsibly, ily, bye ππΈ
π¦ 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