[Devel] [PATCH RHEL9 COMMIT] mm/oom_kill: account berserker kills to process memcg

Konstantin Khorenko khorenko at virtuozzo.com
Mon Dec 27 18:52:30 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.37
------>
commit 94b61cd11017d6af03174d482538c6c3474f27f6
Author: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Date:   Mon Dec 27 18:52:30 2021 +0300

    mm/oom_kill: account berserker kills to process memcg
    
    General __oom_kill_process() accounts oom kills to process memcg. Change
    berserker to do the same.
    
    Fixes: 2f05d2c4df61 ("oom: resurrect berserker mode")
    https://jira.sw.ru/browse/PSBM-131983
    Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 mm/oom_kill.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 20e6ef9c449e..47c8f292a0e8 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -1063,7 +1063,7 @@ static void oom_berserker(struct oom_control *oc)
 		}
 
 		count_vm_event(OOM_KILL);
-		memcg_memory_event(memcg, MEMCG_OOM_KILL);
+		memcg_memory_event_mm(p->mm, MEMCG_OOM_KILL);
 
 		do_send_sig_info(SIGKILL, SEND_SIG_PRIV, p, PIDTYPE_TGID);
 


More information about the Devel mailing list