lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250706200018.42704-1-sj@kernel.org>
Date: Sun,  6 Jul 2025 13:00:04 -0700
From: SeongJae Park <sj@...nel.org>
To: 
Cc: SeongJae Park <sj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	damon@...ts.linux.dev,
	kernel-team@...a.com,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: [RFC PATCH 00/14] mm/damon: remove damon_callback

damon_callback was the only way for communicating with DAMON for
contexts running on its worker thread.  The interface is flexible
and simple.  But as DAMON evolves with more features, damon_callback
has become somewhat too old.  With runtime parameters update, for example,
its lack of synchronization support was found to be inconvenient.
Arguably it is also not easy to use correctly since the callers should
understand when each callback is called, and implication of the return
values from the callbacks.

To replace it, damon_call() and damos_walk() are introduced.  And those
replaced a few damon_callback use cases.  Some use cases of
damon_callback such as parallel or repetitive DAMON internal data
reading and additional cleanups cannot simply be replaced by
damon_call() and damos_walk(), though.

To allow those replaceable, extend damon_call() for parallel and/or
repeated callbacks and modify the core/ops layers for additional
resources cleanup.  With the updates, replace the remaining
damon_callback usages and finally remove damon_callback.

SeongJae Park (14):
  mm/damon: accept parallel damon_call() requests
  mm/damon/core: introduce repeat mode damon_call()
  mm/damon/stat: use damon_call() repeat mode instead of damon_callback
  mm/damon/reclaim: use damon_call() repeat mode instead of
    damon_callback
  mm/damon/lru_sort: use damon_call() repeat mode instead of
    damon_callback
  samples/damon/prcl: use damon_call() repeat mode instead of
    damon_callback
  samples/damon/wsse: use damon_call() repeat mode instead of
    damon_callback
  mm/damon/core: do not call ops.cleanup() when destroying targets
  mm/damon/core: add cleanup_target() ops callback
  mm/damon/vaddr: put pid in cleanup_target()
  mm/damon/sysfs: remove damon_sysfs_destroy_targets()
  mm/damon/core: destroy targets when kdamond_fn() finish
  mm/damon/sysfs: remove damon_sysfs_before_terminate()
  mm/damon/core: remove damon_callback

 include/linux/damon.h        |  44 ++++---------
 mm/damon/core.c              | 116 ++++++++++++++++++-----------------
 mm/damon/lru_sort.c          |  70 ++++++++++-----------
 mm/damon/reclaim.c           |  62 +++++++++----------
 mm/damon/stat.c              |  17 ++++-
 mm/damon/sysfs.c             |  41 +------------
 mm/damon/tests/core-kunit.h  |   4 +-
 mm/damon/tests/vaddr-kunit.h |   2 +-
 mm/damon/vaddr.c             |   6 ++
 samples/damon/prcl.c         |  18 ++++--
 samples/damon/wsse.c         |  16 ++++-
 11 files changed, 189 insertions(+), 207 deletions(-)


base-commit: d7932983411c60940e9b834ac554c33e0ca6f2ef
-- 
2.39.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ