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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e1517bb143dc..15ea511fb41c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5564,13 +5564,12 @@ static int zone_batchsize(struct zone *zone)
5564 5564
5565 /* 5565 /*
5566 * The per-cpu-pages pools are set to around 1000th of the 5566 * The per-cpu-pages pools are set to around 1000th of the
5567 * size of the zone. But no more than 1/2 of a meg. 5567 * size of the zone.
5568 *
5569 * OK, so we don't know how big the cache is. So guess.
5570 */ 5568 */
5571 batch = zone->managed_pages / 1024; 5569 batch = zone->managed_pages / 1024;
5572 if (batch * PAGE_SIZE > 512 * 1024) 5570 /* But no more than a meg. */
5573 batch = (512 * 1024) / PAGE_SIZE; 5571 if (batch * PAGE_SIZE > 1024 * 1024)
5572 batch = (1024 * 1024) / PAGE_SIZE;
5574 batch /= 4; /* We effectively *= 4 below */ 5573 batch /= 4; /* We effectively *= 4 below */
5575 if (batch < 1) 5574 if (batch < 1)
5576 batch = 1; 5575 batch = 1;