clear_tasks_mm_cpumask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clear_tasks_mm_cpumask πŸ’…

okay so bestie, welcome to the clear_tasks_mm_cpumask(9) page from the Kernel API Manual β€” pull up a chair, we're getting into it 🫢


✨ NAME ✨

clear_tasks_mm_cpumask β€” safely clear tasks' mm_cpumask for a CPU</p> πŸ’–


✨ SYNOPSIS ✨

void clear_tasks_mm_cpumask (int cpu );

✨ ARGUMENTS ✨

  • cpu β€” a CPU id. that's it. that's the whole argument. iconic minimalism 🌸

✨ DESCRIPTION ✨

okay so here's the vibe: this function walks all processes, finds a valid mm struct for each one, and then clears a corresponding bit in mm's cpumask. like, every task, one by one, mm found, bit cleared. slay πŸŽ€

and the way that this all sounds trivial?? it's not. there are various non-obvious corner cases hiding in there, and this function is literally doing its best to solve them all in a safe manner. it ate, honestly πŸ”₯

⚠️ also note, bestie: the function uses a somewhat relaxed locking scheme, so it may be called only for an already offlined CPU. not a live one. offlined. dead. done. do not come for this function with a CPU that's still out here living its life, fr fr πŸ’€

✨ SEE ALSO ✨

bestie these are the lore-adjacent ones, go read them if you want the whole cinematic universe πŸ‘‘


and that's the page!! mwah πŸ’‹ this one came from ./kernel, dated October 2026, and it's filed under clear_tasks_mm_cpumask(9) β€” go forth and offline your CPUs responsibly, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from