Re: [RFC PATCH 0/4] DAMON based 2-tier memory management for CXL memory

From: SeongJae Park
Date: Wed Jan 17 2024 - 16:24:31 EST


On Wed, 17 Jan 2024 13:11:03 -0800 SeongJae Park <sj@xxxxxxxxxx> wrote:

[...]
> Hi Honggyu,
>
> On Wed, 17 Jan 2024 20:49:25 +0900 Honggyu Kim <honggyu.kim@xxxxxx> wrote:
>
> > Hi SeongJae,
> >
> > Thanks very much for your comments in details.
> >
> > On Tue, 16 Jan 2024 12:31:59 -0800 SeongJae Park <sj@xxxxxxxxxx> wrote:
> >
[...]
> > > To this end, I feel the problem might be able te be simpler, because this
> > > patchset is trying to provide two sophisticated operations, while I think a
> > > simpler approach might be possible. My humble simpler idea is adding a DAMOS
> > > operation for moving pages to a given node (like sys_move_phy_pages RFC[1]),
> > > instead of the promote/demote. Because the general pages migration can handle
> > > multiple cases including the promote/demote in my humble assumption.
[...]
> > > In more detail, users could decide which is the appropriate node for promotion
> > > or demotion and use the new DAMOS action to do promotion and demotion. Users
> > > would requested to decide which node is the proper promotion/demotion target
> > > nodes, but that decision wouldn't be that hard in my opinion.
> > >
> > > For this, 'struct damos' would need to be updated for such argument-dependent
> > > actions, like 'struct damos_filter' is haing a union.
> >
> > That might be a better solution. I will think about it.
>
> More specifically, I think receiving an address range as the argument might
> more flexible than just NUMA node. Maybe we can imagine proactively migrating
> cold movable pages from normal zones to movable zones, to avoid normal zone
> memory pressure.

Yet another crazy idea. Finding hot regions in the middle of cold region and
move to besides of other hot pages. As a result, memory is sorted by access
temperature even in same node, and the system gains more spatial locality,
which benefits general locality-based algorithms including DAMON's adaptive
regions adjustment.


Thanks,
SJ

[...]