From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jonathan Corbet <corbet@lwn.net>, Ze Zuo <zuoze1@huawei.com>,
damon@lists.linux.dev, kernel-team@meta.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [RFC PATCH 00/10] mm/damon: support address space larger than damon-core address space
Date: Tue, 15 Apr 2025 21:25:41 -0700 [thread overview]
Message-ID: <20250416042551.158131-1-sj@kernel.org> (raw)
DAMON core layer has its own address space that uses 'unsigned long' for
handling addresses. The underlying DAMON operations set implementation
translates the core layer address to the real address space that it is
working for. For example, vaddr and fvaddr translates the core layer
addresses to virtual addresses.
However, all operations set layer simply assumes the core layer address
will be same to those for the given address space. Since the core layer
address uses 'unsigned long', it is ok for virtual addresses. In case
of physical address space, however, there can be some cases where
'unsigned long' cannot handle whole address. For example, 32bit arm
machines with large physical address extension (LPAE) is such a case[1].
Arm with LPAE is the only reported use case, but similar cases could
happen in future.
Add a new core layer parameter called 'addr_unit'. Operations set layer
can translate a core layer address to the real address by multiplying
the parameter value to the core layer address. Support of the parameter
is up to each operations layer implementation, though. For example,
operations set implementations for virtual address space can simply
ignore the parameter. Add the support on paddr, which is the DAMON
operations set implementation for the physical address space, as we have
a clear use case for that.
Patches Sequence
================
The first patch implements the new parameter on DAMON kernel API.
Following five patches (patch 2-6) incrementally add support of the new
parameter on paddr operations set, for monitoring operations and DAMOS
operations for each DAMOS actions.
The seventh patch implements DAMON sysfs ABI for letting users control
the parameter.
Final three patches (patches 8-10) documents the new ABI on design,
usage, and ABI documents, respectively.
[1] https://lore.kernel.org/20250408075553.959388-1-zuoze1@huawei.com
SeongJae Park (10):
mm/damon/core: add damon_ctx->addr_unit
mm/damon/paddr: support addr_unit for access monitoring
mm/damon/paddr: support addr_unit for DAMOS_PAGEOUT
mm/damon/paddr: support addr_unit for DAMOS_LRU_[DE]PRIO
mm/damon/paddr: support addr_unit for MIGRATE_{HOT,COLD}
mm/damon/paddr: support addr_unit for DAMOS_STAT
mm/damon/sysfs: implement addr_unit file under context dir
Docs/mm/damon/design: document 'address unit' parameter
Docs/admin-guide/mm/damon/usage: document addr_unit file
Docs/ABI/damon: document addr_unit file
.../ABI/testing/sysfs-kernel-mm-damon | 7 ++
Documentation/admin-guide/mm/damon/usage.rst | 11 ++-
Documentation/mm/damon/design.rst | 16 +++-
include/linux/damon.h | 2 +
mm/damon/core.c | 3 +
mm/damon/paddr.c | 95 ++++++++++++-------
mm/damon/sysfs.c | 26 +++++
7 files changed, 119 insertions(+), 41 deletions(-)
base-commit: b32e0b4ccfbe176a541e7feee0cdaebb957738e7
--
2.39.5
next reply other threads:[~2025-04-16 4:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 4:25 SeongJae Park [this message]
2025-04-16 4:25 ` [RFC PATCH 01/10] mm/damon/core: add damon_ctx->addr_unit SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 02/10] mm/damon/paddr: support addr_unit for access monitoring SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 03/10] mm/damon/paddr: support addr_unit for DAMOS_PAGEOUT SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 04/10] mm/damon/paddr: support addr_unit for DAMOS_LRU_[DE]PRIO SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 05/10] mm/damon/paddr: support addr_unit for MIGRATE_{HOT,COLD} SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 06/10] mm/damon/paddr: support addr_unit for DAMOS_STAT SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 07/10] mm/damon/sysfs: implement addr_unit file under context dir SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 08/10] Docs/mm/damon/design: document 'address unit' parameter SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 09/10] Docs/admin-guide/mm/damon/usage: document addr_unit file SeongJae Park
2025-04-16 4:25 ` [RFC PATCH 10/10] Docs/ABI/damon: " SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250416042551.158131-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=damon@lists.linux.dev \
--cc=kernel-team@meta.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=zuoze1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox