commit da175d06b437093f93109ba9e5efbe44dfdf9409

When deciding if kswapd is sleeping prematurely, the classzone is taken
into account but this is different to what balance_pgdat() and the
allocator are doing.  Specifically, the DMA zone will be checked based on
the classzone used when waking kswapd which could be for a GFP_KERNEL or
GFP_HIGHMEM request.  The lowmem reserve limit kicks in, the watermark is
not met and kswapd thinks it's sleeping prematurely keeping kswapd awake in
error.

Signed-off-by: Mel Gorman <mgor...@suse.de>
Reported-by: Pádraig Brady <p...@draigbrady.com>
Tested-by: Pádraig Brady <p...@draigbrady.com>
Tested-by: Andrew Lutomirski <l...@mit.edu>
Acked-by: Rik van Riel <r...@redhat.com>
Reviewed-by: Minchan Kim <minchan....@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motoh...@jp.fujitsu.com>
Cc: Johannes Weiner <han...@cmpxchg.org>
Cc: <sta...@kernel.org>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
---
 mm/vmscan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index a4711ff..f4dab3d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2279,7 +2279,7 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int 
order, long remaining,
                }
 
                if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone),
-                                                       classzone_idx, 0))
+                                                       i, 0))
                        all_zones_ok = false;
                else
                        balanced += zone->present_pages;
-- 
1.7.3.4

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to