diff options
| author | Li Zhijian <lizhijian@fujitsu.com> | 2025-01-10 20:21:32 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-17 10:05:36 +0100 |
| commit | 4b6930831479f2fff76a9acc3829744d10cf70b8 (patch) | |
| tree | a2046533ad1fea19c715f401076114a14ff1b7ce /scripts/objdiff | |
| parent | a403eca86c5895edf11ae8ee773ef597b381b42f (diff) | |
| download | linux-4b6930831479f2fff76a9acc3829744d10cf70b8.tar.gz linux-4b6930831479f2fff76a9acc3829744d10cf70b8.tar.bz2 linux-4b6930831479f2fff76a9acc3829744d10cf70b8.zip | |
mm/vmscan: accumulate nr_demoted for accurate demotion statistics
commit a479b078fddb0ad7f9e3c6da22d9cf8f2b5c7799 upstream.
In shrink_folio_list(), demote_folio_list() can be called 2 times.
Currently stat->nr_demoted will only store the last nr_demoted( the later
nr_demoted is always zero, the former nr_demoted will get lost), as a
result number of demoted pages is not accurate.
Accumulate the nr_demoted count across multiple calls to
demote_folio_list(), ensuring accurate reporting of demotion statistics.
[lizhijian@fujitsu.com: introduce local nr_demoted to fix nr_reclaimed double counting]
Link: https://lkml.kernel.org/r/20250111015253.425693-1-lizhijian@fujitsu.com
Link: https://lkml.kernel.org/r/20250110122133.423481-1-lizhijian@fujitsu.com
Fixes: f77f0c751478 ("mm,memcg: provide per-cgroup counters for NUMA balancing operations")
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Acked-by: Kaiyang Zhao <kaiyang2@cs.cmu.edu>
Tested-by: Donet Tom <donettom@linux.ibm.com>
Reviewed-by: Donet Tom <donettom@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
