[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241012154328.015f57635566485ad60712f3@linux-foundation.org>
Date: Sat, 12 Oct 2024 15:43:28 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: alexjlzheng@...il.com
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
alexjlzheng@...cent.com, MengEn Sun <mengensun@...cent.com>
Subject: Re: [PATCH] mm: make pcp decay work with onhz
On Fri, 11 Oct 2024 18:36:10 +0800 alexjlzheng@...il.com wrote:
> Subject: [PATCH] mm: make pcp decay work with onhz
"NOHZ".
> Date: Fri, 11 Oct 2024 18:36:10 +0800
> X-Mailer: git-send-email 2.39.3
>
> From: MengEn Sun <mengensun@...cent.com>
>
> 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
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!
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -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".
> + if (pcp->high_max > pcp->high_min)
> + return true;
> +
> /*
> * The fast way of checking if there are any vmstat diffs.
> */
> --
Powered by blists - more mailing lists