Messages in this thread Patch in this message | | | From | Vasily Averin <> | Subject | [PATCH memcg 1/3] mm: do not firce global OOM from inside dying tasks | Date | Wed, 20 Oct 2021 15:12:19 +0300 |
| |
There is no sense to force global OOM if current task is dying.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com> --- mm/oom_kill.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 831340e7ad8b..1deef8c7a71b 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -1137,6 +1137,9 @@ void pagefault_out_of_memory(void) if (mem_cgroup_oom_synchronize(true)) return; + if (fatal_signal_pending(current)) + return; + if (!mutex_trylock(&oom_lock)) return; out_of_memory(&oc); -- 2.32.0
| |