mem_cgroup_oom_synchronize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mem_cgroup_oom_synchronize(9) πŸ’…

okay bestie, welcome to the Kernel API Manual entry for mem_cgroup_oom_synchronize(9) β€” this is the little cleanup-and-finish-line function for memcg OOM handling, and yes, it’s giving very β€œend of page fault, tie up the loose ends” energy ✨


πŸŽ€ NAME πŸŽ€

mem_cgroup_oom_synchronize β€” complete memcg OOM handling, periodt πŸ’–


✨ SYNOPSIS ✨

bool mem_cgroup_oom_synchronize (bool handle );

🫢 ARGUMENTS 🫢

  • handle β€” actually kill/wait or just clean up the OOM state. lowkey the whole vibe check for this call tbh πŸ’…

🌸 DESCRIPTION 🌸

okay so here’s the tea: this has to be called at the end of a page fault if the memcg OOM handler was enabled. no cap, that’s the rule πŸ“Œ

Memcg supports userspace OOM handling where failed allocations must sleep on a waitqueue until the userspace task resolves the situation. and like… sleeping directly in the charge context with all kinds of locks held is not a good idea πŸ™ˆ instead, we remember an OOM state in the task, and mem_cgroup_oom_synchronize has to be called at the end of the page fault to complete the OOM handling. that’s the whole point, bestie β€” finish the OOM situation properly instead of having a chaotic nap in the charge context πŸ’€

Returns true if an ongoing memcg OOM situation was detected and completed, false otherwise. simple as that ✨


πŸ¦‹ SEE ALSO πŸ¦‹


xoxo, your Unix bestie πŸ’… β€” this page is sourced from ./mm, dated October 2026, and filed under mem_cgroup_oom_synchronize(9) in the Kernel API Manual πŸŽ€

πŸ“¦ where this page comes from