Re: [RFC, PATCH 00/12] userfaultfd: working set tracking for VM guest memory

SeongJae Park
2026-04-24T00:26:39Z

On Thu, 23 Apr 2026 14:57:34 -0400 Peter Xu <peterx@redhat.com> wrote:

> On Thu, Apr 23, 2026 at 07:08:00PM +0100, Kiryl Shutsemau wrote:
> > On Thu, Apr 23, 2026 at 10:50:06AM -0400, Peter Xu wrote:
[...]
> > > - Whether we have explored other approaches on page hotness tracking
[...]
> > DAMON is built around sampling. It is good for working set estimation,
> > but I don't think it is directly useful for eviction decision. It can
> > miss hot pages. LRU rotation will also loose info.
>
> Exactly. If we need to collect ACCESS bit (or anything similar) for
> eviction accuracy pusrpose, IIUC we need per-page info, we can't estimate
> by sampling.

That's a fair argument.

Nonetheless, there are some companies who use DAMON [1] for a similar eviction
purpose on their products.

Also, page level accuracy issue was indeed concerns from many people. DAMON
therefore provides page level DAMOS filter [2]. The idea is finding a large
region of cold pages in low overhead first, then do page level access recheck
on page of the region using the filter, just before doing the eviction.

DAMON-based memory tiering also uses it [3], to avoid wrongly
promoting/demoting cold/hot pages in DAMON-claimed hot/cold regions. The
evaluation result was not very bad, and a few more users reported positive test
results.

Also, DAMON can be used for page level monitoring [5] and open to changes for
users. Actually a work [6] for making DAMON-based page level monitoring more
lightweight is ongoing.

I understand no one fits all and the decision is up to each user :)
Nevertheless, I will be happy to help if you have any question or request for
DAMON.

[1] https://cdn.amazon.science/ee/a4/41ff11374f2f865e5e24de11bd17/resource-management-in-aurora-serverless.pdf
[2] https://origin.kernel.org/doc/html/latest/mm/damon/design.html#filters
[3] https://github.com/damonitor/damo/blob/next/scripts/mem_tier.sh#L40
[4] https://www.phoronix.com/news/DAMON-Self-Tuned-Memory-Tiering
[5] https://origin.kernel.org/doc/html/latest/mm/damon/faq.html#can-i-simply-monitor-page-granularity
[6] https://lore.kernel.org/20260423004211.7037-1-akinobu.mita@gmail.com

Thanks,
SJ …