|
@@ -1612,7 +1612,7 @@ again:
|
|
|
}
|
|
|
|
|
|
__mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order));
|
|
|
- if (zone_page_state(zone, NR_ALLOC_BATCH) == 0 &&
|
|
|
+ if (atomic_long_read(&zone->vm_stat[NR_ALLOC_BATCH]) <= 0 &&
|
|
|
!zone_is_fair_depleted(zone))
|
|
|
zone_set_flag(zone, ZONE_FAIR_DEPLETED);
|
|
|
|
|
@@ -5701,9 +5701,8 @@ static void __setup_per_zone_wmarks(void)
|
|
|
zone->watermark[WMARK_HIGH] = min_wmark_pages(zone) + (tmp >> 1);
|
|
|
|
|
|
__mod_zone_page_state(zone, NR_ALLOC_BATCH,
|
|
|
- high_wmark_pages(zone) -
|
|
|
- low_wmark_pages(zone) -
|
|
|
- zone_page_state(zone, NR_ALLOC_BATCH));
|
|
|
+ high_wmark_pages(zone) - low_wmark_pages(zone) -
|
|
|
+ atomic_long_read(&zone->vm_stat[NR_ALLOC_BATCH]));
|
|
|
|
|
|
setup_zone_migrate_reserve(zone);
|
|
|
spin_unlock_irqrestore(&zone->lock, flags);
|