mm: make pcp decay work with onhz
Subsystems (2)
PATCH 1/1 mm: make pcp decay work with onhz
From: MengEn Sun <[email protected]>
when a cpu stops tick, quiet_vmstat may flush all the per cpu statistics counter.
while, the shepherd is needed those counters to kick the vmstat_work.
when a cpu in nohz with a lot of pcp pages, and do not do page allocating and freeing. the pcp pages of the cpu may not be hold for a long time
we make shepherd keep a eye on the pcp high_min and high_max
--- mm/vmstat.c | 5 +++++ 1 file changed, 5 insertions(+)
mm/vmstat.c +5 -0
@@ -2024,8 +2024,13 @@ static bool need_update(int cpu)for_each_populated_zone (zone) {struct per_cpu_zonestat *pzstats =per_cpu_ptr (zone->per_cpu_zonestats, cpu); +struct per_cpu_pages *pcp =per_cpu_ptr (zone->per_cpu_pageset, cpu);struct per_cpu_nodestat *n; +/* in onhz or nohz full make pcp decay work */ +if (pcp->high_max > pcp->high_min) +return true; +/* * The fast way of checking if there are any vmstat diffs. */
Signature · 1 line
2.43.5
Andrew Morton
maintainerQuoted 1 line · On Fri, 11 Oct 2024 18:36:10 +0800 [email protected] wrote:
Subject: [PATCH] mm: make pcp decay work with onhz
"NOHZ".
Quoted 8 lines
Date: Fri, 11 Oct 2024 18:36:10 +0800
X-Mailer: git-send-email 2.39.3From: MengEn Sun <[email protected]>
when a cpu stops tick,
quiet_vmstatmay flush all the per cpu statistics counter.
Quoted 8 lines
while, the shepherd is needed those counters to kick the
vmstat_work.when a cpu in nohz with a lot of pcp pages, and do not do page allocating and freeing. the pcp pages of the cpu may not be hold for a long time
we make shepherd keep a eye on the pcp
high_minandhigh_max
I can see what you're saying here, but it's hard to understand. Please spend a little time clarifying the text? And please start sentences with a capital letter!
mm/vmstat.c static bool need_update(int cpu) · line 2030
Quoted 10 lines
mm/vmstat.c +2
-0@@ -2024,8 +2024,13 @@ static bool need_update(int cpu)for_each_populated_zone (zone) {struct per_cpu_zonestat *pzstats =per_cpu_ptr (zone->per_cpu_zonestats, cpu); +struct per_cpu_pages *pcp =per_cpu_ptr (zone->per_cpu_pageset, cpu);struct per_cpu_nodestat *n; +/* in onhz or nohz full make pcp decay work */
"NOHZ".
Quoted 7 lines
mm/vmstat.c +3
-0+if (pcp->high_max > pcp->high_min) +return true; +/* * The fast way of checking if there are any vmstat diffs. */
PATCH 1/1 mm: make pcp decay work with onhz
Quoted 21 lines · On Sat, 12 Oct 2024 15:43:28 -0700 [email protected] wrote:
Quoted 1 line · On Fri, 11 Oct 2024 18:36:10 +0800 [email protected] wrote:
Subject: [PATCH] mm: make pcp decay work with onhz
"NOHZ".
Quoted 15 lines
Date: Fri, 11 Oct 2024 18:36:10 +0800
X-Mailer: git-send-email 2.39.3From: MengEn Sun <[email protected]>
when a cpu stops tick,
quiet_vmstatmay flush all the per cpu statistics counter.while, the shepherd is needed those counters to kick the
vmstat_work.when a cpu in nohz with a lot of pcp pages, and do not do page allocating and freeing. the pcp pages of the cpu may not be hold for a long time
Quoted 5 lines
Quoted 1 line
we make shepherd keep a eye on the pcp
high_minandhigh_maxI can see what you're saying here, but it's hard to understand. Please spend a little time clarifying the text? And please start sentences with a capital letter!
Thank you for your suggestion
I will create a v2 version, and make text clarifyed
Quoted 21 lines
mm/vmstat.c static bool need_update(int cpu) · line 2030
Quoted 11 lines
mm/vmstat.c +2
-0@@ -2024,8 +2024,13 @@ static bool need_update(int cpu)for_each_populated_zone (zone) {struct per_cpu_zonestat *pzstats =per_cpu_ptr (zone->per_cpu_zonestats, cpu); +struct per_cpu_pages *pcp =per_cpu_ptr (zone->per_cpu_pageset, cpu);struct per_cpu_nodestat *n; +/* in onhz or nohz full make pcp decay work */ "NOHZ".
Quoted 7 lines
mm/vmstat.c +3
-0+if (pcp->high_max > pcp->high_min) +return true; +/* * The fast way of checking if there are any vmstat diffs. */