diff options
author | Mel Gorman <mel@csn.ul.ie> | 2011-01-13 18:46:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:37 -0500 |
commit | 355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b (patch) | |
tree | 26be6f89cac5b6f5b321cf74103444ae8775c3eb /mm | |
parent | 4d40502ea580c35414a1466d86f96484910ebaec (diff) |
mm: kswapd: treat zone->all_unreclaimable in sleeping_prematurely similar to balance_pgdat()
After DEF_PRIORITY, balance_pgdat() considers all_unreclaimable zones to
be balanced but sleeping_prematurely does not. This can force kswapd to
stay awake longer than it should. This patch fixes it.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Eric B Munson <emunson@mgebm.net>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Simon Kirby <sim@hostway.ca>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index dafb9d91b604..388a0447b8e8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2244,8 +2244,16 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining) | |||
2244 | if (!populated_zone(zone)) | 2244 | if (!populated_zone(zone)) |
2245 | continue; | 2245 | continue; |
2246 | 2246 | ||
2247 | if (zone->all_unreclaimable) | 2247 | /* |
2248 | * balance_pgdat() skips over all_unreclaimable after | ||
2249 | * DEF_PRIORITY. Effectively, it considers them balanced so | ||
2250 | * they must be considered balanced here as well if kswapd | ||
2251 | * is to sleep | ||
2252 | */ | ||
2253 | if (zone->all_unreclaimable) { | ||
2254 | balanced += zone->present_pages; | ||
2248 | continue; | 2255 | continue; |
2256 | } | ||
2249 | 2257 | ||
2250 | if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone), | 2258 | if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone), |
2251 | 0, 0)) | 2259 | 0, 0)) |