Skip to content

Commit 17d7ddf

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 31fa778 commit 17d7ddf

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
@@ -5821,11 +5821,11 @@ static int zone_batchsize(struct zone *zone)
58215821

58225822
/*
58235823
* The number of pages to batch allocate is either ~0.1%
5824-
* of the zone or 1MB, whichever is smaller. The batch
5824+
* of the zone or 4MB, whichever is smaller. The batch
58255825
* size is striking a balance between allocation latency
58265826
* and zone lock contention.
58275827
*/
5828-
batch = min(zone_managed_pages(zone) >> 10, SZ_1M / PAGE_SIZE);
5828+
batch = min(zone_managed_pages(zone) >> 10, 4 * SZ_1M / PAGE_SIZE);
58295829
batch /= 4; /* We effectively *= 4 below */
58305830
if (batch < 1)
58315831
batch = 1;

0 commit comments

Comments
 (0)