Re: [patch -mm] mm, memcg: evaluate root and leaf memcgs fairly on oom

2018-03-15 Thread David Rientjes
On Thu, 15 Mar 2018, Roman Gushchin wrote: > > Seems like it was dropped from the patch somehow. It is intended to do > > atomic_long_add(nr_pages) in mem_cgroup_charge_skmem() and > > atomic_long_add(-nr_pages) mem_cgroup_uncharge_skmem(). > > > > > I also doubt that global atomic variable ca

Re: [patch -mm] mm, memcg: evaluate root and leaf memcgs fairly on oom

2018-03-15 Thread Roman Gushchin
On Wed, Mar 14, 2018 at 01:41:03PM -0700, David Rientjes wrote: > On Wed, 14 Mar 2018, Roman Gushchin wrote: > > > > @@ -2618,92 +2620,65 @@ static long memcg_oom_badness(struct mem_cgroup > > > *memcg, > > > if (nodemask && !node_isset(nid, *nodemask)) > > > continue;

Re: [patch -mm] mm, memcg: evaluate root and leaf memcgs fairly on oom

2018-03-14 Thread David Rientjes
On Wed, 14 Mar 2018, Roman Gushchin wrote: > > @@ -2618,92 +2620,65 @@ static long memcg_oom_badness(struct mem_cgroup > > *memcg, > > if (nodemask && !node_isset(nid, *nodemask)) > > continue; > > > > - points += mem_cgroup_node_nr_lru_pages(memcg, nid

Re: [patch -mm] mm, memcg: evaluate root and leaf memcgs fairly on oom

2018-03-14 Thread Roman Gushchin
Hello, David! Overall I like this idea. Some questions below. On Tue, Mar 13, 2018 at 05:21:09PM -0700, David Rientjes wrote: > There are several downsides to the current implementation that compares > the root mem cgroup with leaf mem cgroups for the cgroup-aware oom killer. > > For example, /p

[patch -mm] mm, memcg: evaluate root and leaf memcgs fairly on oom

2018-03-13 Thread David Rientjes
There are several downsides to the current implementation that compares the root mem cgroup with leaf mem cgroups for the cgroup-aware oom killer. For example, /proc/pid/oom_score_adj is accounted for processes attached to the root mem cgroup but not leaves. This leads to wild inconsistencies tha