lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Oct 2017 13:40:47 +0200
From:   Michal Hocko <>
To:     Roman Gushchin <>
Cc:, Vladimir Davydov <>,
        Johannes Weiner <>,
        Tetsuo Handa <>,
        David Rientjes <>,
        Andrew Morton <>,
        Tejun Heo <>,,,,
Subject: Re: [v10 3/6] mm, oom: cgroup-aware OOM killer

On Wed 04-10-17 16:46:35, Roman Gushchin wrote:
> Traditionally, the OOM killer is operating on a process level.
> Under oom conditions, it finds a process with the highest oom score
> and kills it.
> This behavior doesn't suit well the system with many running
> containers:
> 1) There is no fairness between containers. A small container with
> few large processes will be chosen over a large one with huge
> number of small processes.
> 2) Containers often do not expect that some random process inside
> will be killed. In many cases much safer behavior is to kill
> all tasks in the container. Traditionally, this was implemented
> in userspace, but doing it in the kernel has some advantages,
> especially in a case of a system-wide OOM.
> To address these issues, the cgroup-aware OOM killer is introduced.
> Under OOM conditions, it looks for the biggest leaf memory cgroup
> and kills the biggest task belonging to it. The following patches
> will extend this functionality to consider non-leaf memory cgroups
> as well, and also provide an ability to kill all tasks belonging
> to the victim cgroup.
> The root cgroup is treated as a leaf memory cgroup, so it's score
> is compared with leaf memory cgroups.
> Due to memcg statistics implementation a special algorithm
> is used for estimating it's oom_score: we define it as maximum
> oom_score of the belonging tasks.

Thanks for separating the group_oom part. This is getting in the
mergeable state. I will ack it once the suggested fixes are folded in.
There is some clean up potential on top (I find the oc->chosen_memcg
quite ugly and will post a patch on top of yours) but that can be done
> Signed-off-by: Roman Gushchin <>
> Cc: Michal Hocko <>
> Cc: Vladimir Davydov <>
> Cc: Johannes Weiner <>
> Cc: Tetsuo Handa <>
> Cc: David Rientjes <>
> Cc: Andrew Morton <>
> Cc: Tejun Heo <>
> Cc:
> Cc:
> Cc:
> Cc:
> Cc:
Michal Hocko

Powered by blists - more mailing lists