Re: [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure
From: SJ Park
Date: Fri Sep 25 2026 - 05:57:36 EST
Hello Davidlohr,
On Thu, 24 Sep 2026 19:12:26 -0700 Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote:
[...]
> So perhaps any mm interface for this stuff should just not be designed
> around sampling, and instead proper hardware sources?
Makes sense to me. I proposed [1] damos_add_folios() in LSFMMBPF'25 for a
reason that is similar to your points in my humble view. To quote from the
slide [2],
+/**
+ * damos_add_folios - Add a list of folios as highest priority target for given
+ * damos.
+ * @scheme: DAMOS scheme for the specific access-aware operation.
+ * @folios: List of folios to apply the access-aware operation.
+ *
+ * If a kernel component finds folios that eligible for a specific memory
+ * management operation (e.g., CXL-promotion or demotion), execution of the
+ * operation can be requested to be done by DAMOS using this function. The
+ * execution of the operation will be asynchronously done by DAMOS worker
+ * thread. DAMOS features for resource control (DAMOS quotas) will also be
+ * applied.
+ */
+void damos_add_folios(struct damos *scheme, struct list_head *folios)
> A lot of the complexity in pghot can be removed without this imo (per-pfn
> metadata, accumulate+decay phase). Of course we still have the problem
> to evaluate the cost of replacing a chunk from the top tier(s) with the
> what the low tier is reporting has "hot". And this is particularly true
> with chmu with limited full system memory visibility (as opposed to IBS,
> for example). I don't really have a good answer for this, other than the
> user could use proactive reclaim along with the per-device tunables
> (ie unit sizes and thresholds for chmu) to configure things realistically
> for their use cases - prob. easier said than done.
As the above quote says, the API caller can still use DAMOS features for fine
controls such as quotas, filtrers and quota auto-tuning. We could add more
optimized features for the API callers. My rough idea was that such
operation-focused features could help serving this kind of additional
requirements.
We didn' find a real request for damos_add_folios() so far, though. And hence
no progress has made for that since LSFMMBPF'25, and I have no plan to work on
it for now.
[1] https://lwn.net/Articles/1016525/
[2] https://github.com/damonitor/talks/blob/master/2025/lsfmmbpf/damon_requirements_lsfmmbpf_2025.pdf
Thanks,
SJ
[...]