Skip to content

Commit 966b16d

Browse files
fenrus75xdevs23
authored andcommitted
add a per cpu minimum high watermark an tune batch size
make sure there's at least 1024 per cpu pages... a reasonably small amount for todays system Signed-off-by: Simão Gomes Viana <[email protected]>
1 parent 8be41a0 commit 966b16d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mm/page_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5632,11 +5632,11 @@ static int zone_batchsize(struct zone *zone)
56325632

56335633
/*
56345634
* The number of pages to batch allocate is either ~0.1%
5635-
* of the zone or 1MB, whichever is smaller. The batch
5635+
* of the zone or 4MB, whichever is smaller. The batch
56365636
* size is striking a balance between allocation latency
56375637
* and zone lock contention.
56385638
*/
5639-
batch = min(zone_managed_pages(zone) >> 10, SZ_1M / PAGE_SIZE);
5639+
batch = min(zone_managed_pages(zone) >> 10, 4 * SZ_1M / PAGE_SIZE);
56405640
batch /= 4; /* We effectively *= 4 below */
56415641
if (batch < 1)
56425642
batch = 1;

0 commit comments

Comments
 (0)