diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 63ff71830ea4..187efd47a446 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1050,7 +1050,7 @@ void split_page(struct page *page, unsigned int order) | |||
1050 | * we cheat by calling it from here, in the order > 0 path. Saves a branch | 1050 | * we cheat by calling it from here, in the order > 0 path. Saves a branch |
1051 | * or two. | 1051 | * or two. |
1052 | */ | 1052 | */ |
1053 | static struct page *buffered_rmqueue(struct zonelist *zonelist, | 1053 | static struct page *buffered_rmqueue(struct zone *preferred_zone, |
1054 | struct zone *zone, int order, gfp_t gfp_flags) | 1054 | struct zone *zone, int order, gfp_t gfp_flags) |
1055 | { | 1055 | { |
1056 | unsigned long flags; | 1056 | unsigned long flags; |
@@ -1102,7 +1102,7 @@ again: | |||
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | __count_zone_vm_events(PGALLOC, zone, 1 << order); | 1104 | __count_zone_vm_events(PGALLOC, zone, 1 << order); |
1105 | zone_statistics(zonelist, zone); | 1105 | zone_statistics(preferred_zone, zone); |
1106 | local_irq_restore(flags); | 1106 | local_irq_restore(flags); |
1107 | put_cpu(); | 1107 | put_cpu(); |
1108 | 1108 | ||
@@ -1383,7 +1383,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, | |||
1383 | struct zone **z; | 1383 | struct zone **z; |
1384 | struct page *page = NULL; | 1384 | struct page *page = NULL; |
1385 | int classzone_idx = zone_idx(zonelist->zones[0]); | 1385 | int classzone_idx = zone_idx(zonelist->zones[0]); |
1386 | struct zone *zone; | 1386 | struct zone *zone, *preferred_zone; |
1387 | nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */ | 1387 | nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */ |
1388 | int zlc_active = 0; /* set if using zonelist_cache */ | 1388 | int zlc_active = 0; /* set if using zonelist_cache */ |
1389 | int did_zlc_setup = 0; /* just call zlc_setup() one time */ | 1389 | int did_zlc_setup = 0; /* just call zlc_setup() one time */ |
@@ -1395,6 +1395,7 @@ zonelist_scan: | |||
1395 | * See also cpuset_zone_allowed() comment in kernel/cpuset.c. | 1395 | * See also cpuset_zone_allowed() comment in kernel/cpuset.c. |
1396 | */ | 1396 | */ |
1397 | z = zonelist->zones; | 1397 | z = zonelist->zones; |
1398 | preferred_zone = *z; | ||
1398 | 1399 | ||
1399 | do { | 1400 | do { |
1400 | /* | 1401 | /* |
@@ -1433,7 +1434,7 @@ zonelist_scan: | |||
1433 | } | 1434 | } |
1434 | } | 1435 | } |
1435 | 1436 | ||
1436 | page = buffered_rmqueue(zonelist, zone, order, gfp_mask); | 1437 | page = buffered_rmqueue(preferred_zone, zone, order, gfp_mask); |
1437 | if (page) | 1438 | if (page) |
1438 | break; | 1439 | break; |
1439 | this_zone_full: | 1440 | this_zone_full: |