aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 884ae08c16cc..b0875871820d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2226,6 +2226,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont,
2226{ 2226{
2227 struct zonelist *zonelist; 2227 struct zonelist *zonelist;
2228 unsigned long nr_reclaimed; 2228 unsigned long nr_reclaimed;
2229 int nid;
2229 struct scan_control sc = { 2230 struct scan_control sc = {
2230 .may_writepage = !laptop_mode, 2231 .may_writepage = !laptop_mode,
2231 .may_unmap = 1, 2232 .may_unmap = 1,
@@ -2242,7 +2243,14 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont,
2242 .gfp_mask = sc.gfp_mask, 2243 .gfp_mask = sc.gfp_mask,
2243 }; 2244 };
2244 2245
2245 zonelist = NODE_DATA(numa_node_id())->node_zonelists; 2246 /*
2247 * Unlike direct reclaim via alloc_pages(), memcg's reclaim doesn't
2248 * take care of from where we get pages. So the node where we start the
2249 * scan does not need to be the current node.
2250 */
2251 nid = mem_cgroup_select_victim_node(mem_cont);
2252
2253 zonelist = NODE_DATA(nid)->node_zonelists;
2246 2254
2247 trace_mm_vmscan_memcg_reclaim_begin(0, 2255 trace_mm_vmscan_memcg_reclaim_begin(0,
2248 sc.may_writepage, 2256 sc.may_writepage,