linux/mm/damon
SeongJae Park 25e8acbcf1 mm/damon/tests/core-kunit: skip damon_test_nr_accesses_to_accesses_bp() if aggr_interval is zero
The aggregation interval of test purpose damon_attrs for
damon_test_nr_accesses_to_accesses_bp() becomes zero on 32 bit
architecture, since size of int and long types are same.  As a result,
damon_nr_accesses_to_accesses_bp() call with the test data triggers
divide-by-zero exception.  damon_nr_accesses_to_accesses_bp() shouldn't
be called with such data, and the non-test code avoids that by checking
the case on damon_update_monitoring_results().  Skip the test code in
the case, and add an explicit caution of the case on the comment for the
test target function.

Link: https://lkml.kernel.org/r/20240905162423.74053-1-sj@kernel.org
Fixes: 5e06ad5900 ("mm/damon/core-test: test max_nr_accesses overflow caused divide-by-zero")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/c771b962-a58f-435b-89e4-1211a9323181@roeck-us.net
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: David Gow <davidgow@google.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-09 16:39:14 -07:00
..
tests mm/damon/tests/core-kunit: skip damon_test_nr_accesses_to_accesses_bp() if aggr_interval is zero 2024-09-09 16:39:14 -07:00
core.c mm/damon/tests/core-kunit: skip damon_test_nr_accesses_to_accesses_bp() if aggr_interval is zero 2024-09-09 16:39:14 -07:00
dbgfs.c mm/damon: move kunit tests to tests/ subdirectory with _kunit suffix 2024-09-03 21:15:58 -07:00
Kconfig mm/damon: rename CONFIG_DAMON_DBGFS to DAMON_DBGFS_DEPRECATED 2024-02-22 10:24:45 -08:00
lru_sort.c Revert "mm/damon/lru_sort: adjust local variable to dynamic allocation" 2024-09-09 16:39:00 -07:00
Makefile mm/damon/modules: deduplicate init steps for DAMON context setup 2022-11-30 15:01:26 -08:00
modules-common.c mm/damon: update email of SeongJae 2023-12-20 14:48:13 -08:00
modules-common.h mm/damon/modules: deduplicate init steps for DAMON context setup 2022-11-30 15:01:26 -08:00
ops-common.c mm/damon/ops-common: avoid divide-by-zero during region hotness calculation 2023-10-25 16:47:15 -07:00
ops-common.h mm/damon/ops-common: atomically test and clear young on ptes and pmds 2023-06-09 16:25:55 -07:00
paddr.c mm/damon/paddr: initialize nr_succeeded in __damon_pa_migrate_folio_list() 2024-07-04 18:05:50 -07:00
reclaim.c mm/damon/reclaim: remove unnecessary code for online tuning 2024-07-03 19:30:14 -07:00
sysfs-common.c mm/damon/sysfs: make kobj_type structures constant 2023-02-09 16:51:45 -08:00
sysfs-common.h mm/damon/sysfs-schemes: rename *_set_{schemes,scheme_filters,quota_score,schemes}() 2024-07-03 19:30:14 -07:00
sysfs-schemes.c mm/damon/sysfs-schemes: rename *_set_{schemes,scheme_filters,quota_score,schemes}() 2024-07-03 19:30:14 -07:00
sysfs.c mm/damon: move kunit tests to tests/ subdirectory with _kunit suffix 2024-09-03 21:15:58 -07:00
vaddr.c mm/damon: move kunit tests to tests/ subdirectory with _kunit suffix 2024-09-03 21:15:58 -07:00