Re: [RFC] mm: memcg: add priority for soft limit reclaiming

Michal Hocko
2019-09-25T06:52:56Z

On Wed 25-09-19 10:35:30, Hillf Danton wrote:
>
> On Tue, 24 Sep 2019 17:23:35 +0000 from Roman Gushchin
> >
> > On Tue, Sep 24, 2019 at 03:30:16PM +0200, Michal Hocko wrote:
> > >
> > > But really, make sure you look into the existing feature set that memcg
> > > v2 provides already and come back if you find it unsuitable and we can
> > > move from there. Soft limit reclaim is dead and we should let it RIP.
> >
> > Can't agree more here.
> >
> > Cgroup v2 memory protection mechanisms (memory.low/min) should perfectly
> > solve the described problem. If not, let's fix them rather than extend soft
> > reclaim which is already dead.
> >
> Hehe, IIUC memory.low/min is essentially drawing a line that reclaimers
> would try their best not to cross. Page preemption OTOH is near ten miles
> away from that line though it is now on the shoulder of soft reclaiming.

Dynamic low limit tuning would achieve exactly what you are after - aka
prioritizing some memory consumers over others.
--
Michal Hocko
SUSE Labs