on_each_cpu_mask(9)
Okay bestie, buckle up π β this is the on_each_cpu_mask(9) page from the Kernel API Manual, and it's literally about running a function on processors specified by cpumask, which may include the local processor. ππ
πΈ NAME πΈ
on_each_cpu_maskβ run a function on processors specified bycpumask, which may include the local processor. β¨
β¨ SYNOPSIS β¨
void on_each_cpu_mask (const struct cpumask *mask , smp_call_func_t func , void *info , bool wait );
π ARGUMENTS π
maskβ the set of cpus to run on (only runs on the online subset). π«Άfuncβ the function to run. This must be fast and non-blocking, no cap. β‘infoβ an arbitrary pointer to pass to the function. literally whatever pointer you need to hand over. πwaitβ iftrue, wait (atomically) until the function has completed on other CPUs. π«
π¦ DESCRIPTION π¦
Okay so here's the tea: if wait is true, then it returns once func has returned. Periodt. π
π¨ Warning bestie: you must not call this function with disabled interrupts, or from a hardware interrupt handler, or from a bottom half handler. That's a hard no β those vibes do not mix. π
The one exception is iconic: it may be used during early boot while early_boot_irqs_disabled is set. πβ¨
π₯ SEE ALSO π₯
- Kernel file
./include/linux/smp.hπ smp_processor_id(9)π
xoxo, your kernel bestie π β this page lives in ./include/linux, is dated October 2026, and goes by on_each_cpu_mask(9). π«Άβ¨
π¦ 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