diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 0175b943f5e525d40d0e83475fd793b9ea9c43e1..de6efa6d5763f8c09dd8ff0555a0cb426d931f6f 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -1145,7 +1145,11 @@ bool out_of_memory(struct oom_control *oc) select_bad_process(oc); /* Found nothing?!?! */ if (!oc->chosen) { - dump_global_header(oc, NULL); + if (is_memcg_oom(oc) && __ratelimit(&oom_memcg_rs)) + dump_memcg_header(oc, NULL); + else if (!is_memcg_oom(oc)) + dump_global_header(oc, NULL); + pr_warn("Out of memory and no killable processes...\n"); /* * If we got here due to an actual allocation at the