Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Vladimir Davydov
On Tue, Sep 04, 2018 at 10:52:46AM -0700, Roman Gushchin wrote: > Reparenting of all pages is definitely an option to consider, Reparenting pages would be great indeed, but I'm not sure we could do that, because we'd have to walk over page lists of semi-active kmem caches and do it consistently wh

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Michal Hocko
[now CC Vladimir for real] On Tue 04-09-18 20:06:31, Michal Hocko wrote: > On Tue 04-09-18 10:52:46, Roman Gushchin wrote: > > On Tue, Sep 04, 2018 at 06:14:31PM +0200, Michal Hocko wrote: > [...] > > > I am not opposing your patch but I am trying to figure out whether that > > > is the best appro

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Michal Hocko
On Tue 04-09-18 10:52:46, Roman Gushchin wrote: > On Tue, Sep 04, 2018 at 06:14:31PM +0200, Michal Hocko wrote: [...] > > I am not opposing your patch but I am trying to figure out whether that > > is the best approach. > > I don't think the current logic does make sense. Why should cgroups > with

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Roman Gushchin
On Tue, Sep 04, 2018 at 06:14:31PM +0200, Michal Hocko wrote: > On Tue 04-09-18 08:34:49, Roman Gushchin wrote: > > On Tue, Sep 04, 2018 at 09:00:05AM +0200, Michal Hocko wrote: > > > On Mon 03-09-18 13:28:06, Roman Gushchin wrote: > > > > On Mon, Sep 03, 2018 at 08:29:56PM +0200, Michal Hocko wrot

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Michal Hocko
On Tue 04-09-18 08:34:49, Roman Gushchin wrote: > On Tue, Sep 04, 2018 at 09:00:05AM +0200, Michal Hocko wrote: > > On Mon 03-09-18 13:28:06, Roman Gushchin wrote: > > > On Mon, Sep 03, 2018 at 08:29:56PM +0200, Michal Hocko wrote: > > > > On Fri 31-08-18 14:31:41, Roman Gushchin wrote: > > > > > O

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Roman Gushchin
On Tue, Sep 04, 2018 at 09:00:05AM +0200, Michal Hocko wrote: > On Mon 03-09-18 13:28:06, Roman Gushchin wrote: > > On Mon, Sep 03, 2018 at 08:29:56PM +0200, Michal Hocko wrote: > > > On Fri 31-08-18 14:31:41, Roman Gushchin wrote: > > > > On Fri, Aug 31, 2018 at 05:15:39PM -0400, Rik van Riel wrot

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-04 Thread Michal Hocko
On Mon 03-09-18 13:28:06, Roman Gushchin wrote: > On Mon, Sep 03, 2018 at 08:29:56PM +0200, Michal Hocko wrote: > > On Fri 31-08-18 14:31:41, Roman Gushchin wrote: > > > On Fri, Aug 31, 2018 at 05:15:39PM -0400, Rik van Riel wrote: > > > > On Fri, 2018-08-31 at 13:34 -0700, Roman Gushchin wrote: >

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-03 Thread Roman Gushchin
On Mon, Sep 03, 2018 at 08:29:56PM +0200, Michal Hocko wrote: > On Fri 31-08-18 14:31:41, Roman Gushchin wrote: > > On Fri, Aug 31, 2018 at 05:15:39PM -0400, Rik van Riel wrote: > > > On Fri, 2018-08-31 at 13:34 -0700, Roman Gushchin wrote: > > > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > >

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-09-03 Thread Michal Hocko
On Fri 31-08-18 14:31:41, Roman Gushchin wrote: > On Fri, Aug 31, 2018 at 05:15:39PM -0400, Rik van Riel wrote: > > On Fri, 2018-08-31 at 13:34 -0700, Roman Gushchin wrote: > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > index fa2c150ab7b9..c910cf6bf606 100644 > > > --- a/mm/vmscan.c > > >

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-08-31 Thread Rik van Riel
On Fri, 2018-08-31 at 14:31 -0700, Roman Gushchin wrote: > On Fri, Aug 31, 2018 at 05:15:39PM -0400, Rik van Riel wrote: > > On Fri, 2018-08-31 at 13:34 -0700, Roman Gushchin wrote: > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > index fa2c150ab7b9..c910cf6bf606 100644 > > > --- a/mm/vmscan

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-08-31 Thread Roman Gushchin
On Fri, Aug 31, 2018 at 05:15:39PM -0400, Rik van Riel wrote: > On Fri, 2018-08-31 at 13:34 -0700, Roman Gushchin wrote: > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index fa2c150ab7b9..c910cf6bf606 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -476,6 +476,10 @@ static unsigned lon

Re: [PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-08-31 Thread Rik van Riel
On Fri, 2018-08-31 at 13:34 -0700, Roman Gushchin wrote: > diff --git a/mm/vmscan.c b/mm/vmscan.c > index fa2c150ab7b9..c910cf6bf606 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -476,6 +476,10 @@ static unsigned long do_shrink_slab(struct > shrink_control *shrinkctl, > delta = freeabl

[PATCH] mm: slowly shrink slabs with a relatively small number of objects

2018-08-31 Thread Roman Gushchin
Commit 9092c71bb724 ("mm: use sc->priority for slab shrink targets") changed the way how target the slab pressure is calculated and made it priority-based: delta = freeable >> priority; delta *= 4; do_div(delta, shrinker->seeks); The problem is that on a default priority (which is 12)