Re: [PATCH RFC v3] mm: memory-tiering: Fix PGPROMOTE_CANDIDATE counting

From: Zhijian Li (Fujitsu)
Date: Wed Jul 23 2025 - 23:35:59 EST




On 22/07/2025 22:16, Ruan Shiyang wrote:
> From: Li Zhijian<lizhijian@xxxxxxxxxxx>
>

I believe you are the actual author of this patch, so please change to yourself :)


> Cc: Juri Lelli<juri.lelli@xxxxxxxxxx>
> Cc: Vincent Guittot<vincent.guittot@xxxxxxxxxx>
> Cc: Dietmar Eggemann<dietmar.eggemann@xxxxxxx>
> Cc: Steven Rostedt<rostedt@xxxxxxxxxxx>
> Cc: Ben Segall<bsegall@xxxxxxxxxx>
> Cc: Mel Gorman<mgorman@xxxxxxx>
> Cc: Valentin Schneider<vschneid@xxxxxxxxxx>
> Reported-by: Yasunori Gotou (Fujitsu)<y-goto@xxxxxxxxxxx>
> Signed-off-by: Li Zhijian<lizhijian@xxxxxxxxxxx>
> Signed-off-by: Ruan Shiyang<ruansy.fnst@xxxxxxxxxxx>
> ---
> include/linux/mmzone.h | 2 ++
> kernel/sched/fair.c | 6 ++++--
> mm/vmstat.c | 1 +
> 3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 283913d42d7b..6216e2eecf3b 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -231,6 +231,8 @@ enum node_stat_item {
> #ifdef CONFIG_NUMA_BALANCING
> PGPROMOTE_SUCCESS, /* promote successfully */
> PGPROMOTE_CANDIDATE, /* candidate pages to promote */

Additionally, I think the current comment for PGPROMOTE_CANDIDATE is inaccurate. If possible, I'd like to refine it along with this patch.
For example:
/*
* Candidate pages for promotion based on hint fault latency. This counter
* is used to control the promotion rate and adjust the hotness threshold.
*/
What are your thoughts, @Ying?



> + PGPROMOTE_CANDIDATE_NOLIMIT, /* candidate pages without considering
> + * hot threshold */

Similarly, the comment for PGPROMOTE_CANDIDATE_NOLIMIT can also be made more precise.


Thanks
Zhijian

> #endif