mbox series

[0/7] mm/damon: add a DAMOS filter type for page granularity access recheck

Message ID 20240426195247.100306-1-sj@kernel.org (mailing list archive)
Headers show
Series mm/damon: add a DAMOS filter type for page granularity access recheck | expand

Message

SeongJae Park April 26, 2024, 7:52 p.m. UTC
Changes from RFC v2
(https://lore.kernel.org/r/20240311204545.47097-1-sj@kernel.org)
- Add documentation
- Add Tested-by: Honggyu Kim <honggyu.kim@sk.com>
- Wordsmith commit messages

Changes from RFC v1
(https://lore.kernel.org/r/20240307030013.47041-1-sj@kernel.org)
- Mark the folio as old if it was young
- Rename __damon_pa_young() to damon_folio_young_one()

DAMON provides its best-effort accuracy-overhead tradeoff under the
user-defined ranges of acceptable level of the monitoring accuracy and
overhead.  A recent discussion for tiered memory management support from
DAMON[1] concluded that finding memory regions of specific access
pattern with low overhead despite of low accuracy via DAMON first, and
then double checking the access of the region again in a finer (e.g.,
page) granularity could be a useful strategy for some DAMOS schemes.

Add a new type of DAMOS filter, namely 'young' for such a case.  It
checks each page of DAMOS target region is accessed since the last
check, and filters it out or in if 'matching' parameter is 'true' or
'false', respectively.

Because this is a filter type that applied in page granularity, the
support depends on DAMON operations set, similar to 'anon' and 'memcg'
DAMOS filter types.  Implement the support on the DAMON operations set
for the physical address space, 'paddr', since one of the expected
usages[1] is based on the physical address space.

[1] https://lore.kernel.org/r/20240227235121.153277-1-sj@kernel.org

SeongJae Park (7):
  mm/damon/paddr: implement damon_folio_young()
  mm/damon/paddr: implement damon_folio_mkold()
  mm/damon: add DAMOS filter type YOUNG
  mm/damon/paddr: implement DAMOS filter type YOUNG
  Docs/mm/damon/design: document 'young page' type DAMOS filter
  Docs/admin-guide/mm/damon/usage: update for young page type DAMOS
    filter
  Docs/ABI/damon: update for 'youg page' type DAMOS filter

 .../ABI/testing/sysfs-kernel-mm-damon         |  6 +-
 Documentation/admin-guide/mm/damon/usage.rst  | 26 ++++----
 Documentation/mm/damon/design.rst             | 20 +++---
 include/linux/damon.h                         |  2 +
 mm/damon/paddr.c                              | 64 ++++++++++++-------
 mm/damon/sysfs-schemes.c                      |  1 +
 6 files changed, 70 insertions(+), 49 deletions(-)


base-commit: 4b4dd809460911d6c406bb45d2c627a9e5734468