Re: [PATCH v5 13/13] mm: Clear shrinker bit if there are no objects related to memcg

2018-05-16 Thread Vladimir Davydov
On Tue, May 15, 2018 at 11:55:04AM +0300, Kirill Tkhai wrote: > >> @@ -586,8 +586,23 @@ static unsigned long shrink_slab_memcg(gfp_t > >> gfp_mask, int nid, > >>continue; > >> > >>ret = do_shrink_slab(, shrinker, priority); > >> - if (ret ==

Re: [PATCH v5 13/13] mm: Clear shrinker bit if there are no objects related to memcg

2018-05-15 Thread Kirill Tkhai
On 15.05.2018 08:59, Vladimir Davydov wrote: > On Thu, May 10, 2018 at 12:54:15PM +0300, Kirill Tkhai wrote: >> To avoid further unneed calls of do_shrink_slab() >> for shrinkers, which already do not have any charged >> objects in a memcg, their bits have to be cleared. >> >> This patch

Re: [PATCH v5 13/13] mm: Clear shrinker bit if there are no objects related to memcg

2018-05-14 Thread Vladimir Davydov
On Thu, May 10, 2018 at 12:54:15PM +0300, Kirill Tkhai wrote: > To avoid further unneed calls of do_shrink_slab() > for shrinkers, which already do not have any charged > objects in a memcg, their bits have to be cleared. > > This patch introduces a lockless mechanism to do that > without races

[PATCH v5 13/13] mm: Clear shrinker bit if there are no objects related to memcg

2018-05-10 Thread Kirill Tkhai
To avoid further unneed calls of do_shrink_slab() for shrinkers, which already do not have any charged objects in a memcg, their bits have to be cleared. This patch introduces a lockless mechanism to do that without races without parallel list lru add. After do_shrink_slab() returns SHRINK_EMPTY