cpuset_handle_hotplug(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’–


πŸ¦‹ that's the page!! this one lives in ./kernel/cgroup, dated October 2026, and it's filed under cpuset_handle_hotplug(9). slay, go touch some cpusets responsibly, ily, bye πŸ’œπŸŒΈ
πŸ“¦ where this page comes from