lkml.org 
[lkml]   [2018]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch -mm] mm, memcg: evaluate root and leaf memcgs fairly on oom
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 can work here,
> > > we probably need something better scaling.
> > >
> >
> > Why do you think an atomic_long_add() is too expensive when we're already
> > disabling irqs and dong try_charge()?
>
> Hard to say without having full code :)
> try_charge() is batched, if you'll batch it too, it will probably work.
>

The full code is what's specified above: it does the
atomic_long_add(nr_pages) in mem_cgroup_charge_skmem() and
atomic_long_add(-nr_pages) mem_cgroup_uncharge_skmem().

The patch is comparing the root mem cgroup and leaf mem cgroups fairly.
For this, it requires that we have stats that can be directly compared or
at least very close approximations. We don't want to get in a situation
where root and leaf mem cgroups are being compared based on different
stats.

\
 
 \ /
  Last update: 2018-03-15 21:02    [W:0.067 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site