diff options
Diffstat (limited to 'mm/vmscan.c')
| -rw-r--r-- | mm/vmscan.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 4093b99044f6..8fde2fc223d9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -2010,7 +2010,7 @@ static inline bool compaction_ready(struct zone *zone, struct scan_control *sc) | |||
| 2010 | * a reasonable chance of completing and allocating the page | 2010 | * a reasonable chance of completing and allocating the page |
| 2011 | */ | 2011 | */ |
| 2012 | balance_gap = min(low_wmark_pages(zone), | 2012 | balance_gap = min(low_wmark_pages(zone), |
| 2013 | (zone->present_pages + KSWAPD_ZONE_BALANCE_GAP_RATIO-1) / | 2013 | (zone->managed_pages + KSWAPD_ZONE_BALANCE_GAP_RATIO-1) / |
| 2014 | KSWAPD_ZONE_BALANCE_GAP_RATIO); | 2014 | KSWAPD_ZONE_BALANCE_GAP_RATIO); |
| 2015 | watermark = high_wmark_pages(zone) + balance_gap + (2UL << sc->order); | 2015 | watermark = high_wmark_pages(zone) + balance_gap + (2UL << sc->order); |
| 2016 | watermark_ok = zone_watermark_ok_safe(zone, 0, watermark, 0, 0); | 2016 | watermark_ok = zone_watermark_ok_safe(zone, 0, watermark, 0, 0); |
| @@ -2525,7 +2525,7 @@ static bool zone_balanced(struct zone *zone, int order, | |||
| 2525 | */ | 2525 | */ |
| 2526 | static bool pgdat_balanced(pg_data_t *pgdat, int order, int classzone_idx) | 2526 | static bool pgdat_balanced(pg_data_t *pgdat, int order, int classzone_idx) |
| 2527 | { | 2527 | { |
| 2528 | unsigned long present_pages = 0; | 2528 | unsigned long managed_pages = 0; |
| 2529 | unsigned long balanced_pages = 0; | 2529 | unsigned long balanced_pages = 0; |
| 2530 | int i; | 2530 | int i; |
| 2531 | 2531 | ||
| @@ -2536,7 +2536,7 @@ static bool pgdat_balanced(pg_data_t *pgdat, int order, int classzone_idx) | |||
| 2536 | if (!populated_zone(zone)) | 2536 | if (!populated_zone(zone)) |
| 2537 | continue; | 2537 | continue; |
| 2538 | 2538 | ||
| 2539 | present_pages += zone->present_pages; | 2539 | managed_pages += zone->managed_pages; |
| 2540 | 2540 | ||
| 2541 | /* | 2541 | /* |
| 2542 | * A special case here: | 2542 | * A special case here: |
| @@ -2546,18 +2546,18 @@ static bool pgdat_balanced(pg_data_t *pgdat, int order, int classzone_idx) | |||
| 2546 | * they must be considered balanced here as well! | 2546 | * they must be considered balanced here as well! |
| 2547 | */ | 2547 | */ |
| 2548 | if (zone->all_unreclaimable) { | 2548 | if (zone->all_unreclaimable) { |
| 2549 | balanced_pages += zone->present_pages; | 2549 | balanced_pages += zone->managed_pages; |
| 2550 | continue; | 2550 | continue; |
| 2551 | } | 2551 | } |
| 2552 | 2552 | ||
| 2553 | if (zone_balanced(zone, order, 0, i)) | 2553 | if (zone_balanced(zone, order, 0, i)) |
| 2554 | balanced_pages += zone->present_pages; | 2554 | balanced_pages += zone->managed_pages; |
| 2555 | else if (!order) | 2555 | else if (!order) |
| 2556 | return false; | 2556 | return false; |
| 2557 | } | 2557 | } |
| 2558 | 2558 | ||
| 2559 | if (order) | 2559 | if (order) |
| 2560 | return balanced_pages >= (present_pages >> 2); | 2560 | return balanced_pages >= (managed_pages >> 2); |
| 2561 | else | 2561 | else |
| 2562 | return true; | 2562 | return true; |
| 2563 | } | 2563 | } |
| @@ -2745,7 +2745,7 @@ loop_again: | |||
| 2745 | * of the zone, whichever is smaller. | 2745 | * of the zone, whichever is smaller. |
| 2746 | */ | 2746 | */ |
| 2747 | balance_gap = min(low_wmark_pages(zone), | 2747 | balance_gap = min(low_wmark_pages(zone), |
| 2748 | (zone->present_pages + | 2748 | (zone->managed_pages + |
| 2749 | KSWAPD_ZONE_BALANCE_GAP_RATIO-1) / | 2749 | KSWAPD_ZONE_BALANCE_GAP_RATIO-1) / |
| 2750 | KSWAPD_ZONE_BALANCE_GAP_RATIO); | 2750 | KSWAPD_ZONE_BALANCE_GAP_RATIO); |
| 2751 | /* | 2751 | /* |
