]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/memcontrol.h
mm/oom_kill: count global and memory cgroup oom kills
[mirror_ubuntu-bionic-kernel.git] / include / linux / memcontrol.h
index b2a5b1cd4e552bbb188476275d97a68aec41decd..72d0853beb31fbbf6658954962cfb86465c70982 100644 (file)
@@ -582,8 +582,11 @@ static inline void count_memcg_event_mm(struct mm_struct *mm,
 
        rcu_read_lock();
        memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
-       if (likely(memcg))
+       if (likely(memcg)) {
                this_cpu_inc(memcg->stat->events[idx]);
+               if (idx == OOM_KILL)
+                       cgroup_file_notify(&memcg->events_file);
+       }
        rcu_read_unlock();
 }
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE