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

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Mon Dec 13 11:46:40 MSK 2021


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 20e6ef9..47c8f29 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);
 
-- 
1.8.3.1



More information about the Devel mailing list