Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/14] mm/damon: minor improvements for code readability and tests
@ 2026-05-20  6:28 SeongJae Park
  2026-05-20  6:28 ` [RFC PATCH 01/14] mm/damon/core: safely handle no region case in damon_set_regions() SeongJae Park
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: SeongJae Park @ 2026-05-20  6:28 UTC (permalink / raw)
  Cc: SeongJae Park, Andrew Morton, Brendan Higgins, David Gow,
	Shuah Khan, damon, kunit-dev, linux-kernel, linux-kselftest,
	linux-mm

Implement minor improvements on code readability and tests for DAMON.

First seven patches are for DAMON code readability and resulting
maintenance.  Patches 1 and 2 make damon_set_regions() safer and easier
to read.  Patches 3 and 4 remove fragmented DAMON API use cases. Patches
5-7 hides unused core functions that are unnecessarily exposed to API
callers.

The following seven patches are for DAMON tests improvement.  Patches 8
and 9 adds and removes DAMON_DEBUG_SANITY verifications to ensure
reasonable test coverage without too high overhead.  Patch 10 adds a new
kunit test for damon_set_regions().  Patch 11 makes sysfs.py selftest
more gracefully finishes under test failures.  Patches 12-13 adds simple
sysfs.sh test cases for the monitoring intervals goal directory, the
addr_unit file and the pause file.

SeongJae Park (14):
  mm/damon/core: safely handle no region case in damon_set_regions()
  mm/damon/core: do not use region out of a loop in damon_set_regions()
  samples/damon/mtier: replace damon_add_region() with
    damon_set_regions()
  mm/damon/tests/vaddr-kunit: replace damon_add_region() with
    damon_set_regions()
  mm/damon/core: hide damon_add_region()
  mm/damon/core: hide damon_insert_region()
  mm/damon/core: hide damon_destroy_region()
  mm/damon/core: add kdamond_call() debug_sanity check
  mm/damon/core: remove damon_verify_nr_regions()
  mm/damon/tests/core-kunit: add damon_set_regions() test cases
  selftests/damon/sysfs.py: stop kdamonds before failing
  selftests/damon/sysfs.sh: test monitoring intervals goal dir
  selftests/damon/sysfs.sh: test addr_unit file existence
  selftests/damon/sysfs.sh: test pause file existence

 include/linux/damon.h                  |  13 ---
 mm/damon/core.c                        |  92 ++++++++++++----
 mm/damon/tests/core-kunit.h            | 142 +++++++++++++++++++++----
 mm/damon/tests/vaddr-kunit.h           |  16 +--
 samples/damon/mtier.c                  |  10 +-
 tools/testing/selftests/damon/sysfs.py |   4 +
 tools/testing/selftests/damon/sysfs.sh |  14 +++
 7 files changed, 223 insertions(+), 68 deletions(-)


base-commit: 8b8727a18b7f247aed7e0476b92d07fc59c04cb8
-- 
2.47.3


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-05-20  6:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20  6:28 [RFC PATCH 00/14] mm/damon: minor improvements for code readability and tests SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 01/14] mm/damon/core: safely handle no region case in damon_set_regions() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 02/14] mm/damon/core: do not use region out of a loop " SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 03/14] samples/damon/mtier: replace damon_add_region() with damon_set_regions() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 04/14] mm/damon/tests/vaddr-kunit: " SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 05/14] mm/damon/core: hide damon_add_region() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 06/14] mm/damon/core: hide damon_insert_region() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 07/14] mm/damon/core: hide damon_destroy_region() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 08/14] mm/damon/core: add kdamond_call() debug_sanity check SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 09/14] mm/damon/core: remove damon_verify_nr_regions() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 10/14] mm/damon/tests/core-kunit: add damon_set_regions() test cases SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 11/14] selftests/damon/sysfs.py: stop kdamonds before failing SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 12/14] selftests/damon/sysfs.sh: test monitoring intervals goal dir SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 13/14] selftests/damon/sysfs.sh: test addr_unit file existence SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 14/14] selftests/damon/sysfs.sh: test pause " SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox