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


Groups > linux.kernel > #1453291 > unrolled thread

Re: [PATCH] mm: vmscan: fix memcg-aware shrinkers not called on global reclaim

Started byJohannes Weiner <hannes@cmpxchg.org>
First post2016-08-01 18:00 +0200
Last post2016-08-01 18:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mm: vmscan: fix memcg-aware shrinkers not called on  global reclaim Johannes Weiner <hannes@cmpxchg.org> - 2016-08-01 18:00 +0200

#1453291 — Re: [PATCH] mm: vmscan: fix memcg-aware shrinkers not called on global reclaim

FromJohannes Weiner <hannes@cmpxchg.org>
Date2016-08-01 18:00 +0200
SubjectRe: [PATCH] mm: vmscan: fix memcg-aware shrinkers not called on global reclaim
Message-ID<s1nNf-8fZ-13@gated-at.bofh.it>
On Mon, Aug 01, 2016 at 04:03:10PM +0300, Vladimir Davydov wrote:
> We must call shrink_slab() for each memory cgroup on both global and
> memcg reclaim in shrink_node_memcg(). Commit d71df22b55099 accidentally
> changed that so that now shrink_slab() is only called with memcg != NULL
> on memcg reclaim. As a result, memcg-aware shrinkers (including
> dentry/inode) are never invoked on global reclaim. Fix that.
> 
> Fixes: d71df22b55099 ("mm, vmscan: begin reclaiming pages on a per-node basis")
> Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>

Ouch, I missed that in the review. The change looked so obviously
correct, but the shrink_slab() interface is a little deceiving. It
would be great if shrink_slab() could handle root_mem_cgroup/NULL and
then we'd always call it from inside the loop. But AFAICS we need the
global call to get the cumulative scanned/lru_pages ratio from all of
the memcgs reclaimed... grr. Oh well.

This fix looks correct to me, anyway.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web