projects/linux·commit da175d06

mm: vmscan: evaluate the watermarks against the correct classzone

da175d06 · Mel Gorman <[email protected]> · 2011-07-08 15:39:39 -07:00

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 <[email protected]>
Reported-by: Pádraig Brady <[email protected]>
Tested-by: Pádraig Brady <[email protected]>
Tested-by: Andrew Lutomirski <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
da175d06b437093f93109ba9e5efbe44dfdf9409
Parents
d7868dae

Changes

1 files changed · +1 −1

FileStatusAddDelContent
mm/vmscan.cmodified+1−1View file

mm/vmscan.c

View file
diff --git a/mm/vmscan.c b/mm/vmscan.c
index a024586..a51b3c9 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2344,7 +2344,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;