Re: [PATCH RFC] mm/damon/core: preserve region age differences during merging

From: Aveline Noir

Date: Mon Nov 30 2026 - 12:41:18 EST


Hi SJ,
Thanks for your reply

On Tue, Dec 1, 2026 at 2:53 AM SJ Park <sj@xxxxxxxxxx> wrote:
>
> On Mon, 30 Nov 2026 23:25:42 +1100 Aveline Noir <jm5905938@xxxxxxxxx> wrote:
>
> > DAMOS can split a region to fit the remaining quota and reset the age of
> > the part it acts on. If the two parts still have similar access
> > frequencies, a merge can bring the size-weighted age below the scheme's
> > minimum age and delay work on the untouched part.
>
> But it will eventually be processed. In real time workload that runs for
> long time, I don't feel like this could be a real problem.
> >
> > On the first merge pass, keep adjacent regions separate if either has no
> > accesses and their ages differ by more than both ten aggregation
> > intervals and the younger region's age.
>
> To me, this feels like an arbitrary heuristic that made without clear
> reasoning. I'm concerned about the complexity.

Hmm. I think you're right.

> > I'm not sure how this change would behave in production. I ran an
> > eight-range SQLite workload for 900 seconds per run with PADDR, a
> > 120-second minimum age, and THP=never.
>
> Do you mean you ran DAMOS_PAGEOUT?

Yep

> With only given information, I understand this patch can make DAMOS more
> aggressive. Correct me if I'm wrong. This result concerns me, since users
> might show more memory saving but also performance regression.
>
> >
> > So I then tried lower limits.
>
> What is the lower limits? Lower minimum age?
It's the maximum number of regions. The minimum age stayed at 120 seconds.
> I'm not sure from where "300" regions came out.

I tried a few limits in this particular setup, and 300 seemed to strike
a good balance here.

> I'm not clearly understanding what this means. I understand you are saying
> the impact of this patch can be tuned, though. I don't feel like it is a
> good justification for the complexity of this patch.
>
...
>
> To me, unfortunately, this looks like adding too much complecity for unclear
> benefit.

Thanks for your advice SJ :)
Your opinions are helpful. Looks like blocking merges based on age isn't a
good approach after all, and tuning doesn't seem to help much either...
Maybe I'll try something else then.

Thanks~
Aveline