mm-add-framework-for-pcp-high-auto-tuning.patch removed from -mm tree
The quilt patch titled
Subject: mm: add framework for PCP high auto-tuning
has been removed from the -mm tree. Its filename was
mm-add-framework-for-pcp-high-auto-tuning.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: add framework for PCP high auto-tuning
Date: Mon, 16 Oct 2023 13:29:59 +0800
The page allocation performance requirements of different workloads are usually different. So, we need to tune PCP (per-CPU pageset) high to optimize the workload page allocation performance. Now, we have a system wide sysctl knob (percpu_pagelist_high_fraction) to tune PCP high by hand. But, it's hard to find out the best value by hand. And one global configuration may not work best for the different workloads that run on the same system. One solution to these issues is to tune PCP high of each CPU automatically.
This patch adds the framework for PCP high auto-tuning. With it, pcp->high of each CPU will be changed automatically by tuning algorithm at runtime. The minimal high (pcp->high_min) is the original PCP high value calculated based on the low watermark pages. While the maximal high (pcp->high_max) is the PCP high value when percpu_pagelist_high_fraction sysctl knob is set to MIN_PERCPU_PAGELIST_HIGH_FRACTION. That is, the maximal pcp->high that can be set via sysctl knob by hand.
It's possible that PCP high auto-tuning doesn't work well for some workloads. So, when PCP high is tuned by hand via the sysctl knob, the auto-tuning will be disabled. The PCP high set by hand will be used instead.
This patch only adds the framework, so pcp->high will be set to pcp->high_min (original default) always. We will add actual auto-tuning algorithm in the following patches in the series.
---
include/linux/mmzone.h | 5 ++ mm/page_alloc.c | 71 +++++++++++++++++++++++++-------------- 2 files changed, 50 insertions(+), 26 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-add-framework-for-pcp-high-auto-tuning +4 -1
@@ -693,6 +693,8 @@ struct per_cpu_pages {spinlock_t lock;/* Protects lists field */ int count;/* number of pages in the list */ int high;/* high watermark, emptying needed */ +int high_min;/* min high watermark */ +int high_max;/* max high watermark */ int batch;/* chunk size for buddy add/remove */ u8 flags;/* protected by pcp->lock */ u8 alloc_factor;/* batch scaling factor during allocate */
@@ -852,7 +854,8 @@ struct zone {* the high and batch values are copied to individual pagesets for * faster access */ -int pageset_high; +int pageset_high_min; +int pageset_high_max;int pageset_batch;#ifndef CONFIG_SPARSEMEM
mm/page_alloc.c renamed from mm/page_alloc.c~mm-add-framework-for-pcp-high-auto-tuning +46 -25
167 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are