[RFC PATCH v2.1 0/2] mm/damon/stat: add kdamond_pid parameter

From: SeongJae Park

Date: Thu Apr 30 2026 - 10:20:31 EST


DAMON_STAT doesn't provide the pid of its kdamond, unlike DAMON_RECLAIM
and DAMON_LRU_SORT. This makes user-space management of DAMON_STAT
unnecessarily complicated. Provide the information via a new parameter,
namely kdamond_pid, and document it.

Changes from RFC v2
- v2: https://lore.kernel.org/20260425203309.108879-1-sj@xxxxxxxxxx
- Rebase to latest mm-new.
Changes from RFC v1.2
- rfc v1.2: https://lore.kernel.org/20260416002149.87090-1-sj@xxxxxxxxxx
- Detect and use fresh kdamond pid.
Changes from RFC v1.1
- rfc v1.1: https://lore.kernel.org/20260414235912.98174-1-sj@xxxxxxxxxx
- Close the parentheses of error handling block.
Changes from RFC
- rfc: https://lore.kernel.org/20260414053742.90296-1-sj@xxxxxxxxxx
- Fix damon_kdamond_pid() failure handling.

SeongJae Park (2):
mm/damon/stat: add a parameter for reading kdamond pid
Docs/admin-guide/mm/damon/stat: document kdamond_pid parameter

Documentation/admin-guide/mm/damon/stat.rst | 7 ++++
mm/damon/stat.c | 38 +++++++++++++++++++++
2 files changed, 45 insertions(+)


base-commit: b8e00b62c650b2aa471195f663301118fde889c2
--
2.47.3