mem_cgroup_oom_synchronize(9)
π 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 π¦
- Kernel file
./mm/memcontrol-v1.c __memcg1_swapout(9)memcg1_swapin(9)vmpressure_prio(9)vmpressure_register_event(9)vmpressure_unregister_event(9)
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
- 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