summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@techsingularity.net>2016-07-28 18:45:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-28 19:07:41 -0400
commit38087d9b0360987a6db46c2c2c4ece37cd048abe (patch)
tree07227c8348c008c502457be9027c0654e000f45e /mm/page_alloc.c
parent31483b6ad205784d3a82240865135bef5c97c105 (diff)
mm, vmscan: simplify the logic deciding whether kswapd sleeps
kswapd goes through some complex steps trying to figure out if it should stay awake based on the classzone_idx and the requested order. It is unnecessarily complex and passes in an invalid classzone_idx to balance_pgdat(). What matters most of all is whether a larger order has been requsted and whether kswapd successfully reclaimed at the previous order. This patch irons out the logic to check just that and the end result is less headache inducing. Link: http://lkml.kernel.org/r/1467970510-21195-10-git-send-email-mgorman@techsingularity.net Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@surriel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 35e2d0f9d44f..81586410c59c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6039,7 +6039,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
6039 unsigned long end_pfn = 0; 6039 unsigned long end_pfn = 0;
6040 6040
6041 /* pg_data_t should be reset to zero when it's allocated */ 6041 /* pg_data_t should be reset to zero when it's allocated */
6042 WARN_ON(pgdat->nr_zones || pgdat->classzone_idx); 6042 WARN_ON(pgdat->nr_zones || pgdat->kswapd_classzone_idx);
6043 6043
6044 reset_deferred_meminit(pgdat); 6044 reset_deferred_meminit(pgdat);
6045 pgdat->node_id = nid; 6045 pgdat->node_id = nid;