mm-page_alloc-scale-the-number-of-pages-that-are-batch-allocated.patch removed from -mm tree
The quilt patch titled
Subject: mm, page_alloc: scale the number of pages that are batch allocated
has been removed from the -mm tree. Its filename was
mm-page_alloc-scale-the-number-of-pages-that-are-batch-allocated.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Huang Ying <[email protected]>
Subject: mm, page_alloc: scale the number of pages that are batch allocated
Date: Mon, 16 Oct 2023 13:29:58 +0800
When a task is allocating a large number of order-0 pages, it may acquire the zone->lock multiple times allocating pages in batches. This may unnecessarily contend on the zone lock when allocating very large number of pages. This patch adapts the size of the batch based on the recent pattern to scale the batch size for subsequent allocations.
On a 2-socket Intel server with 224 logical CPU, we run 8 kbuild instances in parallel (each with make -j 28) in 8 cgroup. This simulates the kbuild server that is used by 0-Day kbuild service. With the patch, the cycles% of the spinlock contention (mostly for zone lock) decreases from 12.6% to 11.0% (with PCP size == 367).
---
include/linux/mmzone.h | 3 +- mm/page_alloc.c | 53 +++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 11 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-page_alloc-scale-the-number-of-pages-that-are-batch-allocated +2 -1
@@ -695,9 +695,10 @@ struct per_cpu_pages {int high;/* high watermark, emptying needed */ int batch;/* chunk size for buddy add/remove */ u8 flags;/* protected by pcp->lock */ +u8 alloc_factor;/* batch scaling factor during allocate */ u8 free_factor;/* batch scaling factor during free */ #ifdef CONFIG_NUMA -short expire;/* When 0, remote pagesets are drained */ +u8 expire;/* When 0, remote pagesets are drained */ #endif /* Lists of pages, one per migrate type stored on the pcp-lists */
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-scale-the-number-of-pages-that-are-batch-allocated +43 -10
73 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are