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

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-kinseyho@google.com/
---

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

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

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

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



             reply	other threads:[~2025-09-10 23:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10 23:51 Kinsey Ho [this message]
2025-09-10 23:51 ` [RFC PATCH v2 1/2] mm: mglru: generalize page table walk Kinsey Ho
2025-09-10 23:51 ` [RFC PATCH v2 2/2] mm: klruscand: use mglru scanning for page promotion Kinsey Ho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250910235121.2544928-1-kinseyho@google.com \
    --to=kinseyho@google.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=alok.rathore@samsung.com \
    --cc=axelrasmussen@google.com \
    --cc=balbirs@nvidia.com \
    --cc=byungchul@sk.com \
    --cc=dave.hansen@intel.com \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=gourry@gourry.net \
    --cc=hannes@cmpxchg.org \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=nifan.cxl@gmail.com \
    --cc=peterz@infradead.org \
    --cc=raghavendra.kt@amd.com \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=sj@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=xuezhengchu@huawei.com \
    --cc=yiannis@zptcorp.com \
    --cc=ying.huang@linux.alibaba.com \
    --cc=yuanchu@google.com \
    --cc=zhengqi.arch@bytedance.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox