linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: vmscan: fix memcg-aware shrinkers not called on global reclaim
@ 2016-08-01 13:03 Vladimir Davydov
  2016-08-01 13:18 ` Michal Hocko
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vladimir Davydov @ 2016-08-01 13:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mel Gorman, Hillf Danton, Johannes Weiner, Vlastimil Babka,
	Michal Hocko, Joonsoo Kim, Minchan Kim, Rik van Riel, linux-mm,
	linux-kernel

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>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 650d26832569..374d95d04178 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2561,7 +2561,7 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 			shrink_node_memcg(pgdat, memcg, sc, &lru_pages);
 			node_lru_pages += lru_pages;
 
-			if (!global_reclaim(sc))
+			if (memcg)
 				shrink_slab(sc->gfp_mask, pgdat->node_id,
 					    memcg, sc->nr_scanned - scanned,
 					    lru_pages);
-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-02  9:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01 13:03 [PATCH] mm: vmscan: fix memcg-aware shrinkers not called on global reclaim Vladimir Davydov
2016-08-01 13:18 ` Michal Hocko
2016-08-01 13:21   ` Vladimir Davydov
2016-08-01 13:27     ` Michal Hocko
2016-08-01 15:15 ` Johannes Weiner
2016-08-02  0:11 ` Minchan Kim
2016-08-02  9:32 ` Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox