aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0987ac9f0a4e..b7381d11f021 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1708,7 +1708,6 @@ static bool __zone_watermark_ok(struct zone *z, unsigned int order,
1708{ 1708{
1709 /* free_pages my go negative - that's OK */ 1709 /* free_pages my go negative - that's OK */
1710 long min = mark; 1710 long min = mark;
1711 long lowmem_reserve = z->lowmem_reserve[classzone_idx];
1712 int o; 1711 int o;
1713 long free_cma = 0; 1712 long free_cma = 0;
1714 1713
@@ -1723,7 +1722,7 @@ static bool __zone_watermark_ok(struct zone *z, unsigned int order,
1723 free_cma = zone_page_state(z, NR_FREE_CMA_PAGES); 1722 free_cma = zone_page_state(z, NR_FREE_CMA_PAGES);
1724#endif 1723#endif
1725 1724
1726 if (free_pages - free_cma <= min + lowmem_reserve) 1725 if (free_pages - free_cma <= min + z->lowmem_reserve[classzone_idx])
1727 return false; 1726 return false;
1728 for (o = 0; o < order; o++) { 1727 for (o = 0; o < order; o++) {
1729 /* At the next order, this order's pages become unavailable */ 1728 /* At the next order, this order's pages become unavailable */
@@ -3254,7 +3253,7 @@ void show_free_areas(unsigned int filter)
3254 ); 3253 );
3255 printk("lowmem_reserve[]:"); 3254 printk("lowmem_reserve[]:");
3256 for (i = 0; i < MAX_NR_ZONES; i++) 3255 for (i = 0; i < MAX_NR_ZONES; i++)
3257 printk(" %lu", zone->lowmem_reserve[i]); 3256 printk(" %ld", zone->lowmem_reserve[i]);
3258 printk("\n"); 3257 printk("\n");
3259 } 3258 }
3260 3259
@@ -5575,7 +5574,7 @@ static void calculate_totalreserve_pages(void)
5575 for_each_online_pgdat(pgdat) { 5574 for_each_online_pgdat(pgdat) {
5576 for (i = 0; i < MAX_NR_ZONES; i++) { 5575 for (i = 0; i < MAX_NR_ZONES; i++) {
5577 struct zone *zone = pgdat->node_zones + i; 5576 struct zone *zone = pgdat->node_zones + i;
5578 unsigned long max = 0; 5577 long max = 0;
5579 5578
5580 /* Find valid and maximum lowmem_reserve in the zone */ 5579 /* Find valid and maximum lowmem_reserve in the zone */
5581 for (j = i; j < MAX_NR_ZONES; j++) { 5580 for (j = i; j < MAX_NR_ZONES; j++) {