From: Bharata B Rao <bharata@amd.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<Jonathan.Cameron@huawei.com>, <dave.hansen@intel.com>,
<gourry@gourry.net>, <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>,
<david@kernel.org>, <byungchul@sk.com>, <kinseyho@google.com>,
<joshua.hahnjy@gmail.com>, <yuanchu@google.com>,
<balbirs@nvidia.com>, <alok.rathore@samsung.com>,
<shivankg@amd.com>, <donettom@linux.ibm.com>
Subject: Re: [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure
Date: Wed, 29 Jul 2026 15:05:10 +0530 [thread overview]
Message-ID: <125de6c4-2fc7-4202-9199-347effe63112@amd.com> (raw)
In-Reply-To: <20260728111401.b6d674baf8e56a27c55e0c52@linux-foundation.org>
On 28-Jul-26 11:44 PM, Andrew Morton wrote:
> On Tue, 28 Jul 2026 11:13:48 +0530 Bharata B Rao <bharata@amd.com> wrote:
>
>> This patchset introduces pghot, a subsystem for hot page tracking and
>> promotion.
>
> Can DAMON be used to do this sort of thing adequately?
That really depends on the goal I believe, let me expand...
DAMON can indeed migrate hot pages today via DAMOS_MIGRATE_HOT, and
IIUC it can even do promotion and demotion together that auto-tunes
to a target node utilization. So for someone who wants to write a
per-workload, per-process tiering policy from user space, DAMON is a
good fit and I don't think pghot competes with it there.
But the intent behind pghot isn't really to be another migration
policy. It is to build a common in-kernel infrastructure that can act
as a single promotion subsystem, fed by multiple sources, with the
promotion engine and its heuristics (rate limiting, dynamic threshold)
living in one place rather than in the scheduler. Hint faults are just
the first source. The IBS Memory Profiler, which gives access
information directly from the hardware, is the other one. CXL HMU can be
another potential source. Hence the design centers on an exact, per-PFN
record that any of these sources can update, rather than on sampling.
The per-page, source-driven model is where the two differ the most.
DAMON estimates hotness by sampling one page per region per interval,
which is low overhead and self-contained, but it may miss a hot page
inside a region. pghot records every reported access at PFN granularity,
so it does not miss, but in turn it relies on a source to report the access.
The other practical difference is that pghot works with no user-space
agent at all. With numa_balancing=2 the promotion just happens, and in
fact pghot takes over the mode-2 promotion path that currently sits in
the scheduler. DAMON, outside of its built-in modules, expects a
controller in user space to drive it, IIUC.
So I would see DAMON and pghot as complementary rather than one replacing
the other. In fact DAMON could well become one of the sources feeding
pghot, and conversely pghot's batched, rate-limited engine could serve
as a migration backend.
>
> Thanks, I'll await review input on this.
>
> AI review had much to say:
> https://sashiko.dev/#/patchset/20260728054356.291998-1-bharata@amd.com
Thanks, will address those comments.
Regards,
Bharata.
next prev parent reply other threads:[~2026-07-29 14:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 5:43 [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 1/8] mm: migrate: Allow misplaced migration without VMA Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 2/8] mm: migrate: Add promote_misplaced_memcg_folios() Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 3/8] mm: Hot page tracking and promotion - pghot Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 4/8] mm: pghot: Precision mode for pghot Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 5/8] mm: sched: move NUMA balancing tiering promotion to pghot Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 6/8] x86/ibs: Move IBS caps definitions into its own header Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 7/8] x86/mm/ibs: In-kernel driver for AMD IBS Memory Profiler Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 8/8] x86/mm/ibs: Add runtime controls for IBS memprofiler Bharata B Rao
2026-07-28 5:55 ` [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure - microbenchmark numbers Bharata B Rao
2026-07-28 5:59 ` [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure - NAS BT Bharata B Rao
2026-07-28 6:02 ` [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure - Graph500 Bharata B Rao
2026-07-28 6:05 ` [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure - redis-memtier Bharata B Rao
2026-07-28 6:17 ` [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure - llama-bench Bharata B Rao
2026-07-28 18:14 ` [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure Andrew Morton
2026-07-28 18:24 ` Matthew Wilcox
2026-07-28 18:57 ` Gregory Price
2026-07-28 19:20 ` David Hildenbrand (Arm)
2026-07-28 19:59 ` Gregory Price
2026-07-29 11:45 ` Bharata B Rao
2026-07-29 9:35 ` Bharata B Rao [this message]
2026-07-29 13:54 ` SJ Park
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=125de6c4-2fc7-4202-9199-347effe63112@amd.com \
--to=bharata@amd.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=alok.rathore@samsung.com \
--cc=balbirs@nvidia.com \
--cc=byungchul@sk.com \
--cc=dave.hansen@intel.com \
--cc=dave@stgolabs.net \
--cc=david@kernel.org \
--cc=donettom@linux.ibm.com \
--cc=gourry@gourry.net \
--cc=joshua.hahnjy@gmail.com \
--cc=kinseyho@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--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=shivankg@amd.com \
--cc=sj@kernel.org \
--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=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