stop_one_cpu(9)
okay so bestie, we're in the Kernel API Manual and this whole page is about stop_one_cpu(9) β yes, the one that stops a cpu πβ¨ buckle up.
π NAME π
stop_one_cpu β stop a cpu ππ
π SYNOPSIS π
int stop_one_cpu (unsigned int cpu , cpu_stop_fn_t fn , void *arg );
πΈ ARGUMENTS πΈ
cpuβ the cpu to stop πfnβ the function to execute β¨argβ the argument passed tofnπ
π¦ DESCRIPTION π¦
So basically: execute fn(arg) on cpu π
. fn runs in a process context, at the highest priority, preempting any task on the cpu and straight-up monopolizing it π. This function returns after the execution is complete, periodt.
β οΈ Important vibe check: this function does not guarantee thatcpustays online tillfncompletes. Ifcpugoes down in the middle, execution may happen partially or fully on different cpus π. Sofnshould either be ready for that, or the caller should make surecpustays online until this function completes. no cap.
π΄ CONTEXT π΄
Might sleep. literally allowed to snooze π€
π« RETURN π«
-ENOENTiffn(arg)was not executed becausecpuwas offline π¬- otherwise, the return value of
fnπ«Ά
π₯ SEE ALSO π₯
Kernel file ./kernel/stop_machine.c β go peek bestie π. Also check out stop_two_cpus(9), stop_one_cpu_nowait(9), stop_cpus(9), and stop_machine_from_inactive_cpu(9) π
source/version: ./kernel Β· date: October 2026 Β· page: stop_one_cpu(9) β byeee bestie, go stop a cpu responsibly π
β¨π
π¦ 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