From: Gregory Price <gourry@gourry.net>
To: Matthew Wilcox <willy@infradead.org>
Cc: Yongting Lin <linyongting@bytedance.com>,
Jonathan.Cameron@huawei.com, akpm@linux-foundation.org,
alok.rathore@samsung.com, balbirs@nvidia.com, bharata@amd.com,
byungchul@sk.com, dave.hansen@intel.com, dave@stgolabs.net,
david@kernel.org, donettom@linux.ibm.com,
joshua.hahnjy@gmail.com, kinseyho@google.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
mgorman@techsingularity.net, mingo@redhat.com,
nifan.cxl@gmail.com, peterz@infradead.org,
raghavendra.kt@amd.com, riel@surriel.com, rientjes@google.com,
shivankg@amd.com, sj@kernel.org, weixugc@google.com,
xuezhengchu@huawei.com, yiannis@zptcorp.com,
ying.huang@linux.alibaba.com, yuanchu@google.com, ziy@nvidia.com
Subject: Re: [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure
Date: Wed, 12 Aug 2026 22:21:26 -0400 [thread overview]
Message-ID: <an0qJpFYBPL7V-CR@fedora> (raw)
In-Reply-To: <anlQp9LQw471t3YU@casper.infradead.org>
On Mon, Aug 10, 2026 at 05:16:39AM +0100, Matthew Wilcox wrote:
> On Mon, Aug 10, 2026 at 11:38:14AM +0800, Yongting Lin wrote:
> > On Tue, Jul 28, 2026 at 07:24:46PM +0100, Matthew Wilcox wrote:
> >
> > From our perspective, this is not merely a hypothetical use case. We
> > are actively developing and evaluating CXL tiered-memory systems, and
> > expect promoting CXL-resident pages that become hot back to DRAM to be
> > a practical requirement.
>
> But what *is* your use case? Truly hot data ends up in L1/L2/L3 no
> matter whether it came across the ridiculously high latency CXL link or
> from regular DRAM. So we're talking about "warm" data that's presumably
> measured in gigabytes (since current server CPUs have about half a
> gigabyte of LLC)
>
Speaking for myself (not Yongting Lin) - our use case is pretty straight
forward and deployed at scale today, with plans to expand on it in
future generations.
We have systems with 1TB+ of memory, with a 768GB/256GB DRAM/CXL split.
We're expecting these numbers to grow, along with density of work.
On these systems we use both scaled and stacked workloads (single and
multi-container) where we do have a decent amount of warm data landing
on CXL. In fact, we're looking to make that a more explicit scenario
to reduce per-workload variance (higher floors, lower ceilings).
See Joshua's Tiered Memcg Limits work [0]
[0] https://lore.kernel.org/all/20260807202059.2620949-1-joshua.hahnjy@gmail.com/
Right now this works when mixing workloads which largely use mapped
memory, but for workloads using unmapped pagecache, they end up
permanently demoted to CXL because NUMA Balancing can't promote page
cache (but reclaim can demote it, and the page allocator can fallback
to CXL).
PGHot at least gives us the *full* solution that NUMA balancing does not.
> I see the basis for saying "this task is low priority, it gets its memory
> allocated on CXL" and "this task is high priority, it gets its memory
> allocated on DRAM". I don't see the use case where we're trying to figure
> out that region A of this task is sufficiently warmer than region B, and so
> we want to demote region B back to CXL and promote region A back to DRAM.
>
We find the vast, vast majority of "low priority" work ends up pushed
out to swap / fully invalidated anyway, and not even taking up much of
any memory in the first place. This work is not the problem - it's
usually things like system updates or monitors etc.
Actual user work wanting X-GB of memory is almost never willing to
take the latency hit of 100% CXL - and even if you did that, you
actually cause bandwidth issues for the rest of the system due to
limited bandwidth compared to local DRAM.
Something to remember: Demotion does not respect cpusets or mempolicy,
and page cache is owned by the first-toucher, so cpuset limitations
break for page cache in general. (This is one of many reasons I've
been exploring the private nodes series).
===
For actual tangible problems:
We've found fallback allocations landing on CXL is preferable to forcing
reclaim to run and demote to CXL before a new DRAM allocation can be
made. e.g. zone_reclaim_mode=0x0 is better than 0xf. ZRM induced stalls
are just always worse than eating a CXL page and moving it later.
This directly results in hot memory (in fact many gbs of it) on CXL.
This is especially prevelent when workloads spinup after the top tier
is already / near full. The tier-aware memcg stuff should help with
this, but it still requires both demotion and promotion to level out
the usage between tiers to an acceptable ratio.
I'm not looking for a system that can predict the future and maximize
performance. At best I'd like a system that nudges placement in the
right direction over a long period for better workload consistency.
> I particularly don't see a case for trying to do it on single-page
> granularity. There's just too much damn information to track. Maybe at
> a 2MB or 1GB boundary, but not per page.
I largely agree with you here. If you look at the other work my
colleagues have been doing - it's been heavily focused on making
THPs more reliable and even pushing towards 1GB THPs. We're getting
to a point where 4kb just doesn't make sense anymore for many things.
~Gregory
next prev parent reply other threads:[~2026-08-13 2:21 UTC|newest]
Thread overview: 40+ 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-30 6:34 ` Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 3/8] mm: Hot page tracking and promotion - pghot Bharata B Rao
2026-07-31 16:14 ` Bharata B Rao
2026-07-28 5:43 ` [PATCH v8 4/8] mm: pghot: Precision mode for pghot Bharata B Rao
2026-07-31 16:27 ` 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-08-03 8:23 ` 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-08-04 5:00 ` 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-08-04 5:20 ` 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-08-10 3:38 ` Yongting Lin
2026-08-10 4:16 ` Matthew Wilcox
2026-08-10 5:35 ` Bharata B Rao
2026-08-11 7:15 ` Yongting Lin
2026-08-13 2:21 ` Gregory Price [this message]
2026-08-10 14:37 ` SJ Park
2026-08-11 6:37 ` Yongting Lin
2026-07-29 9:35 ` Bharata B Rao
2026-07-29 13:54 ` SJ Park
2026-08-04 1:23 ` SJ Park
2026-08-06 5:49 ` Bharata B Rao
2026-08-06 13:44 ` SJ Park
2026-08-10 4:46 ` Bharata B Rao
2026-08-10 14:25 ` 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=an0qJpFYBPL7V-CR@fedora \
--to=gourry@gourry.net \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=alok.rathore@samsung.com \
--cc=balbirs@nvidia.com \
--cc=bharata@amd.com \
--cc=byungchul@sk.com \
--cc=dave.hansen@intel.com \
--cc=dave@stgolabs.net \
--cc=david@kernel.org \
--cc=donettom@linux.ibm.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kinseyho@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linyongting@bytedance.com \
--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