make sure there's at least 1024 per cpu pages... a reasonably small amount
for todays system
--- linux-5.15/mm/page_alloc.c~ 2021-10-31 20:53:10.000000000 +0000
+++ linux-5.15/mm/page_alloc.c 2021-11-23 17:37:43.046267744 +0000
@@ -6848,6 +6848,7 @@
* historical relationship between high and batch.
*/
high = max(high, batch << 2);
+ high = max(high, 1024);
return high;
#else
--- linux-5.15/mm/page_alloc.c~ 2021-11-23 17:37:43.000000000 +0000
+++ linux-5.15/mm/page_alloc.c 2021-11-23 17:41:40.539264437 +0000
@@ -6766,11 +6766,11 @@
/*
* The number of pages to batch allocate is either ~0.1%
- * of the zone or 1MB, whichever is smaller. The batch
+ * of the zone or 4MB, whichever is smaller. The batch
* size is striking a balance between allocation latency
* and zone lock contention.
*/
- batch = min(zone_managed_pages(zone) >> 10, (1024 * 1024) / PAGE_SIZE);
+ batch = min(zone_managed_pages(zone) >> 10, 4 * (1024 * 1024) / PAGE_SIZE);
batch /= 4; /* We effectively *= 4 below */
if (batch < 1)
batch = 1;