__cpuhp_rem...e_cpuslocked(9)
π
__cpuhp_rem...e_cpuslocked β from the Kernel API Manual, bestie
Okay so this one's from the Kernel API Manual, section 9, and it's lowkey the cleanup crew of CPU hotplug states. Let's get into it π§
πΈ NAME
__cpuhp_remove_state_cpuslocked β remove the callbacks for a hotplug machine state. Yes, remove. It's giving spring cleaning for your CPU state machine π
β¨ SYNOPSIS
void __cpuhp_remove_state_cpuslocked (enum cpuhp_state state , bool invoke );
π ARGUMENTS
stateβ the state to remove. Like, the actualenum cpuhp_stateyou want gone from the machine. Pick your target πinvokeβ if it'strue, the teardown function gets invoked for cpus wherecpu state >= state. Sotruemeans "yes bestie, actually run the teardown",falsemeans "just remove it, no theatrics" π
π₯ DESCRIPTION
Real talk: the caller needs to hold cpus read locked while calling this function. No cap, that's a requirement, not a suggestion π
And the teardown callback is currently not allowed to fail. So think about module removal before you commit, fr fr β because this thing cannot back out gracefully for you π
β οΈ Say it with me: teardown callback = no failing. Plan your module removal accordingly, periodt.
π¦ SEE ALSO
Kernel file ./kernel/cpu.c, plus the whole friend group:
struct cpuhp_cpu_state(9)struct cpuhp_step(9)cpuhp_invoke_callback(9)cpuhp_ap_update_sync_state(9)cpuhp_ap_report_dead(9)cpuhp_ap_sync_alive(9)clear_tasks_mm_cpumask(9)cpu_device_down(9)notify_cpu_starting(9)cpu_device_up(9)bringup_hibernate_cpu(9)__cpuhp_setup_state_cpuslocked(9)
π That's the whole vibe. Source: ./kernel, dated October 2026, and the page itself is __cpuhp_rem...e_cpuslocked(9). Stay locked (read locked, specifically), bestie β mwah π
π
π¦ 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