|
|
Log in / Subscribe / Register

mm: multi-gen LRU scanning for page promotion

From:  Kinsey Ho <kinseyho-AT-google.com>
To:  linux-mm-AT-kvack.org, linux-kernel-AT-vger.kernel.org
Subject:  [RFC PATCH v2 0/2] mm: multi-gen LRU scanning for page promotion
Date:  Wed, 10 Sep 2025 16:51:19 -0700
Message-ID:  <20250910235121.2544928-1-kinseyho@google.com>
Cc:  Jonathan.Cameron-AT-huawei.com, dave.hansen-AT-intel.com, gourry-AT-gourry.net, hannes-AT-cmpxchg.org, mgorman-AT-techsingularity.net, mingo-AT-redhat.com, peterz-AT-infradead.org, raghavendra.kt-AT-amd.com, riel-AT-surriel.com, rientjes-AT-google.com, sj-AT-kernel.org, weixugc-AT-google.com, willy-AT-infradead.org, ying.huang-AT-linux.alibaba.com, ziy-AT-nvidia.com, dave-AT-stgolabs.net, nifan.cxl-AT-gmail.com, xuezhengchu-AT-huawei.com, yiannis-AT-zptcorp.com, akpm-AT-linux-foundation.org, david-AT-redhat.com, byungchul-AT-sk.com, kinseyho-AT-google.com, joshua.hahnjy-AT-gmail.com, yuanchu-AT-google.com, balbirs-AT-nvidia.com, alok.rathore-AT-samsung.com, lorenzo.stoakes-AT-oracle.com, axelrasmussen-AT-google.com, Liam.Howlett-AT-oracle.com, vbabka-AT-suse.cz, rppt-AT-kernel.org, surenb-AT-google.com, mhocko-AT-suse.com, zhengqi.arch-AT-bytedance.com, shakeel.butt-AT-linux.dev
Archive-link:  Article

This patch series introduces a software-based approach to identifying
hot pages for promotion in tiered memory systems, particularly those
leveraging CXL-attached memory, by utilizing the Multi-Generational
LRU (MGLRU) framework. This method is designed to complement
hardware-based hotness detection mechanisms like Intel PMU sampling, AMD
IBS, or dedicated CXL memory monitoring units, providing a more
comprehensive view of page access patterns, similar to kmmscand [1].

We propose to utilize MGLRU's existing infrastructure to provide hot
page information. A key benefit here is the reuse of the MGLRU page
table walk code, thus avoiding the overhead and duplication of effort
involved in implementing a separate page table scanning mechanism. The
working set reporting proposal [2] also reuses MGLRU's infrastructure,
but focuses on cold page detection. It provides its own aging daemon,
which could additionally provide hot page information by integrating
this proof-of-concept.

This series is based on and relies on [3] as the aggregation and
promotion engine to implement the promotion policies. This is still in
the RFC stage as a proof-of-concept and requires more rigorous testing.

---
v2: Fixed a correctness issue during page table walk, where, on resume,
one page found with the access-bit set was incorrectly not added to the
pghot data structure provided by [3].

v1: https://lore.kernel.org/linux-mm/20250324220301.1273038-1...
---

[1] [RFC PATCH V3 00/17] mm: slowtier page promotion based on PTE A bit
https://lore.kernel.org/linux-mm/20250814153307.1553061-1...

[2] [PATCH v4 0/9] mm: workingset reporting
https://lore.kernel.org/linux-mm/20241127025728.3689245-1...

[3] [RFC PATCH v2 0/8] mm: Hot page tracking and promotion infrastructure
https://lore.kernel.org/linux-mm/20250910144653.212066-1-...

Kinsey Ho (2):
  mm: mglru: generalize page table walk
  mm: klruscand: use mglru scanning for page promotion

 include/linux/mmzone.h |   5 ++
 mm/Kconfig             |   8 ++
 mm/Makefile            |   1 +
 mm/internal.h          |   4 +
 mm/klruscand.c         | 118 +++++++++++++++++++++++++++
 mm/vmscan.c            | 181 +++++++++++++++++++++++++++++++----------
 6 files changed, 272 insertions(+), 45 deletions(-)
 create mode 100644 mm/klruscand.c

-- 
2.51.0.384.g4c02a37b29-goog




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds