mm/damon/sysfs-test: add a unit test for damon_sysfs_set_targets()
authorSeongJae Park <sj@kernel.org>
Sun, 22 Oct 2023 21:07:34 +0000 (21:07 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Oct 2023 23:47:15 +0000 (16:47 -0700)
commitb8ee5575f763c239902f8523d82103a45c153b29
treeb61aa30f596272e2a1121e83f4830b0667a41382
parent62f76a7b53bfa2ecfe1570a5b1d0d574c576a56d
mm/damon/sysfs-test: add a unit test for damon_sysfs_set_targets()

damon_sysfs_set_targets() had a bug that can result in unexpected memory
usage and monitoring overhead increase.  The bug has fixed by a previous
commit.  Add a unit test for avoiding a similar bug of future.

Link: https://lkml.kernel.org/r/20231022210735.46409-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/Kconfig
mm/damon/sysfs-test.h [new file with mode: 0644]
mm/damon/sysfs.c