lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c4779bc4-eac3-4468-8e5a-d0d20fcdde16@suse.cz>
Date: Mon, 1 Sep 2025 10:04:44 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Ruan Shiyang <ruansy.fnst@...itsu.com>, linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, lkp@...el.com,
 ying.huang@...ux.alibaba.com, akpm@...ux-foundation.org, y-goto@...itsu.com,
 mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
 mgorman@...e.de, vschneid@...hat.com, Li Zhijian <lizhijian@...itsu.com>,
 Ben Segall <bsegall@...gle.com>, stable@...r.kernel.org
Subject: Re: [PATCH v2] mm: memory-tiering: fix PGPROMOTE_CANDIDATE counting

On 9/1/25 04:05, Ruan Shiyang wrote:
> Goto-san reported confusing pgpromote statistics where the
> pgpromote_success count significantly exceeded pgpromote_candidate.
> 
> On a system with three nodes (nodes 0-1: DRAM 4GB, node 2: NVDIMM 4GB):
>  # Enable demotion only
>  echo 1 > /sys/kernel/mm/numa/demotion_enabled
>  numactl -m 0-1 memhog -r200 3500M >/dev/null &
>  pid=$!
>  sleep 2
>  numactl memhog -r100 2500M >/dev/null &
>  sleep 10
>  kill -9 $pid # terminate the 1st memhog
>  # Enable promotion
>  echo 2 > /proc/sys/kernel/numa_balancing
> 
> After a few seconds, we observeed `pgpromote_candidate < pgpromote_success`
> $ grep -e pgpromote /proc/vmstat
> pgpromote_success 2579
> pgpromote_candidate 0
> 
> In this scenario, after terminating the first memhog, the conditions for
> pgdat_free_space_enough() are quickly met, and triggers promotion.
> However, these migrated pages are only counted for in PGPROMOTE_SUCCESS,
> not in PGPROMOTE_CANDIDATE.
> 
> To solve these confusing statistics, introduce PGPROMOTE_CANDIDATE_NRL to
> count the missed promotion pages.  And also, not counting these pages into
> PGPROMOTE_CANDIDATE is to avoid changing the existing algorithm or
> performance of the promotion rate limit.
> 
> Link: https://lkml.kernel.org/r/20250729035101.1601407-1-ruansy.fnst@fujitsu.com
> Co-developed-by: Li Zhijian <lizhijian@...itsu.com>
> Signed-off-by: Ruan Shiyang <ruansy.fnst@...itsu.com>
> Reported-by: Yasunori Gotou (Fujitsu) <y-goto@...itsu.com>
> Suggested-by: Huang Ying <ying.huang@...ux.alibaba.com>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Juri Lelli <juri.lelli@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ben Segall <bsegall@...gle.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Valentin Schneider <vschneid@...hat.com>
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> Changes since v1:
>   1. change Li Zhijian from 'Signed-off-by' to 'Co-developed-by' per Vlastimil.

Note according to the docs it should be both, Co-developed-by followed by
Signed-off-by.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ