From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,sj@kernel.org,lienze@kylinos.cn,
jm5905938@gmail.com,davidgow@davidgow.net,brendan.higgins@linux.dev,
saileshnandanavanam@gmail.com,akpm@linux-foundation.org
Subject: + mm-damon-tests-core-kunit-add-test-for-damon_call.patch added to mm-new branch
Date: Tue, 24 Nov 2026 09:16:38 -0800 [thread overview]
Message-ID: <20261124171638.D1E8D1F000C4@smtp.kernel.org> (raw)
In-Reply-To: <20261124153021.90142-5-sj@kernel.org>
The patch titled
Subject: mm/damon/tests/core-kunit: add test for damon_call()
has been added to the -mm mm-new branch. Its filename is
mm-damon-tests-core-kunit-add-test-for-damon_call.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-tests-core-kunit-add-test-for-damon_call.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Sailesh Nandanavanam <saileshnandanavanam@gmail.com>
Subject: mm/damon/tests/core-kunit: add test for damon_call()
Date: Tue, 24 Nov 2026 07:30:20 -0800
A newly allocated damon_ctx has call_controls_obsolete set, meaning no
kdamond is available to handle call requests. damon_call() should
return -ECANCELED in that case instead of queueing the request and
waiting forever. When call_controls_obsolete is unset and
damon_call_control->repeat is set, damon_call() should return 0
without waiting for kdamond. Add a kunit test for the two cases.
Link: https://patch.msgid.link/20261124153021.90142-5-sj@kernel.org
Signed-off-by: Sailesh Nandanavanam <saileshnandanavanam@gmail.com>
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Aveline Noir <jm5905938@gmail.com>
Reviewed-by: Aveline Noir <jm5905938@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@davidgow.net>
Cc: Enze Li <lienze@kylinos.cn>
mm/damon/tests/core-kunit.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--- a/mm/damon/tests/core-kunit.h~mm-damon-tests-core-kunit-add-test-for-damon_call
+++ a/mm/damon/tests/core-kunit.h
@@ -2724,6 +2724,27 @@ static void damos_test_sz_ops_filter_pas
damon_destroy_ctx(c);
}
+static void damon_test_call(struct kunit *test)
+{
+ struct damon_ctx *ctx;
+ struct damon_call_control control = {};
+ int ret;
+
+ ctx = damon_new_ctx();
+ if (!ctx)
+ kunit_skip(test, "ctx alloc fail");
+
+ ret = damon_call(ctx, &control);
+ KUNIT_EXPECT_EQ(test, ret, -ECANCELED);
+
+ ctx->call_controls_obsolete = false;
+ control.repeat = true;
+ ret = damon_call(ctx, &control);
+ KUNIT_EXPECT_EQ(test, ret, 0);
+
+ damon_destroy_ctx(ctx);
+}
+
static struct kunit_case damon_test_cases[] = {
KUNIT_CASE(damon_test_target),
KUNIT_CASE(damon_test_regions),
@@ -2771,6 +2792,7 @@ static struct kunit_case damon_test_case
KUNIT_CASE(damos_test_esz_goal_temporal),
KUNIT_CASE(damon_test_last_region_quota_reset),
KUNIT_CASE(damos_test_sz_ops_filter_passed_last),
+ KUNIT_CASE(damon_test_call),
{},
};
_
Patches currently in -mm which might be from saileshnandanavanam@gmail.com are
mm-damon-tests-core-kunit-add-test-for-damon_call.patch
next prev parent reply other threads:[~2026-11-24 17:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 15:30 [PATCH 0/4] mm/damon: improve efficiency (paddr, core), fix a selftest, add a kunit SJ Park
2026-11-24 15:30 ` [PATCH 1/4] mm/damon/paddr: skip non-LRU folios as a whole in pageout SJ Park
2026-11-24 17:16 ` + mm-damon-paddr-skip-non-lru-folios-as-a-whole-in-pageout.patch added to mm-new branch Andrew Morton
2026-11-24 15:30 ` [PATCH 2/4] mm/damon/core: skip apply_probes() when no probes are installed SJ Park
2026-11-24 17:16 ` + mm-damon-core-skip-apply_probes-when-no-probes-are-installed.patch added to mm-new branch Andrew Morton
2026-11-24 15:30 ` [PATCH 3/4] selftests/damon/damos_quota: skip the last sample when counting exceeds SJ Park
2026-11-24 17:16 ` + selftests-damon-damos_quota-skip-the-last-sample-when-counting-exceeds.patch added to mm-new branch Andrew Morton
2026-11-24 15:30 ` [PATCH 4/4] mm/damon/tests/core-kunit: add test for damon_call() SJ Park
2026-11-24 17:16 ` Andrew Morton [this message]
2026-11-24 15:39 ` [PATCH 0/4] mm/damon: improve efficiency (paddr, core), fix a selftest, add a kunit sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124171638.D1E8D1F000C4@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@davidgow.net \
--cc=jm5905938@gmail.com \
--cc=lienze@kylinos.cn \
--cc=mm-commits@vger.kernel.org \
--cc=saileshnandanavanam@gmail.com \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.