Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269494

Re: [PATCH 02/14] mm: vmscan: simplify memcg vs. global shrinker invocation

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH 02/14] mm: vmscan: simplify memcg vs. global shrinker invocation
Date 2015-11-14 16:10 +0100
Message-ID <quKCJ-5Cl-3@gated-at.bofh.it> (permalink)
References <qu9MR-79j-5@gated-at.bofh.it> <qu9MR-79j-11@gated-at.bofh.it> <quIhA-3Zt-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Nov 14, 2015 at 03:36:50PM +0300, Vladimir Davydov wrote:
> On Thu, Nov 12, 2015 at 06:41:21PM -0500, Johannes Weiner wrote:
> > @@ -2432,20 +2447,6 @@ static bool shrink_zone(struct zone *zone, struct scan_control *sc,
> >  			}
> >  		} while ((memcg = mem_cgroup_iter(root, memcg, &reclaim)));
> >  
> > -		/*
> > -		 * Shrink the slab caches in the same proportion that
> > -		 * the eligible LRU pages were scanned.
> > -		 */
> > -		if (global_reclaim(sc) && is_classzone)
> > -			shrink_slab(sc->gfp_mask, zone_to_nid(zone), NULL,
> > -				    sc->nr_scanned - nr_scanned,
> > -				    zone_lru_pages);
> > -
> > -		if (reclaim_state) {
> > -			sc->nr_reclaimed += reclaim_state->reclaimed_slab;
> > -			reclaim_state->reclaimed_slab = 0;
> > -		}
> > -
> 
> AFAICS this patch deadly breaks memcg-unaware shrinkers vs LRU balance:
> currently we scan (*total* LRU scanned / *total* LRU pages) of all such
> objects; with this patch we'd use the numbers from the root cgroup
> instead. If most processes reside in memory cgroups, the root cgroup
> will have only a few LRU pages and hence the pressure exerted upon such
> objects will be unfairly severe.

You're absolutely right, good catch.

Please disregard this patch. It's not necessary for this series after
v2, I just kept it because I thought it's a nice simplification that's
possible after making root_mem_cgroup public.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 02/14] mm: vmscan: simplify memcg vs. global shrinker invocation Johannes Weiner <hannes@cmpxchg.org> - 2015-11-13 00:50 +0100
  Re: [PATCH 02/14] mm: vmscan: simplify memcg vs. global shrinker  invocation David Miller <davem@davemloft.net> - 2015-11-13 17:00 +0100
  Re: [PATCH 02/14] mm: vmscan: simplify memcg vs. global shrinker  invocation Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-14 13:40 +0100
    Re: [PATCH 02/14] mm: vmscan: simplify memcg vs. global shrinker  invocation Johannes Weiner <hannes@cmpxchg.org> - 2015-11-14 16:10 +0100

csiph-web