[PATCH 0/2] mm/damon: introduce DAMOS filter type for active pages

Nhat Pham posted 2 patches 9 months ago
Documentation/mm/damon/design.rst | 2 ++
include/linux/damon.h             | 2 ++
mm/damon/paddr.c                  | 3 +++
mm/damon/sysfs-schemes.c          | 1 +
4 files changed, 8 insertions(+)
[PATCH 0/2] mm/damon: introduce DAMOS filter type for active pages
Posted by Nhat Pham 9 months ago
The memory reclaim algorithm categorizes pages into active and inactive
lists, separately for file and anon pages. The system's performance
relies heavily on the (relative and absolute) accuracy of this
categorization.

This patch series add a new DAMOS filter for pages' activeness, giving
us visibility into the access frequency of the pages on each list. This
insight can help us diagnose issues with the active-inactive balancing
dynamics, and make decisions to optimize reclaim efficiency and memory
utilization.

For instance, we might decide to enable DAMON_LRU_SORT, if we find that
there are pages on the active list that are infrequently accessed, or
less frequently accessed than pages on the inactive list.

Nhat Pham (2):
  mm/damon: implement a new DAMOS filter type for active pages
  Docs/mm/damon/design: document active DAMOS filter type

 Documentation/mm/damon/design.rst | 2 ++
 include/linux/damon.h             | 2 ++
 mm/damon/paddr.c                  | 3 +++
 mm/damon/sysfs-schemes.c          | 1 +
 4 files changed, 8 insertions(+)


base-commit: 40caf747267c18b6206e26a37d6ea6b695236c11
-- 
2.47.1
Re: [PATCH 0/2] mm/damon: introduce DAMOS filter type for active pages
Posted by SeongJae Park 9 months ago
Hi Nhat,

On Tue, 18 Mar 2025 11:30:27 -0700 Nhat Pham <nphamcs@gmail.com> wrote:

> The memory reclaim algorithm categorizes pages into active and inactive
> lists, separately for file and anon pages. The system's performance
> relies heavily on the (relative and absolute) accuracy of this
> categorization.
> 
> This patch series add a new DAMOS filter for pages' activeness, giving
> us visibility into the access frequency of the pages on each list. This
> insight can help us diagnose issues with the active-inactive balancing
> dynamics, and make decisions to optimize reclaim efficiency and memory
> utilization.
> 
> For instance, we might decide to enable DAMON_LRU_SORT, if we find that
> there are pages on the active list that are infrequently accessed, or
> less frequently accessed than pages on the inactive list.

I agree to all the points, and thank you very much for this great patch series.

For other readers' information, DAMOS filters are for visibility of not only
the human users, but also DAMOS itself.  This new filter type will also be very
useful at making DAMOS schemes that respects LRU information (e.g., reclaim
DAMON-found cold pages but only if it is on inactive LRU list).


Thanks,
SJ

[...]