From: Suhaas Joshi <suhaas@s-joshi.in>
To: sj@kernel.org, akpm@linux-foundation.org
Cc: damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, suhaas@s-joshi.in
Subject: [PATCH 0/2] mm/damon/core: Iterate over installed probes instead of DAMON_MAX_PROBES
Date: Wed, 7 Oct 2026 21:18:44 +0530 [thread overview]
Message-ID: <20261007154851.45368-1-suhaas@s-joshi.in> (raw)
Hello,
There were two "todo: " items of the same nature in mm/damon/core.c. Both
of these suggested that we should iterate over only installed probes while
updating (last_)probe_hits[] during merging/splitting regions, instead of
iterating over the entire array, which may have empty/unused indices.
So this patch series does exactly that. It replaces the for-loop over
[0, DAMON_MAX_PROBES) with a damon_for_each_probe() over the probe list of
the context.
These patches are based off mm-new. They pass all KUnit tests related to
damon. I have boot tested (but nothing beyond) on qemu-x86_64. Please do
let me know if I should do any specific tests and link the logs here.
Regards
Suhaas Joshi
Suhaas Joshi (2):
mm/damon/core: Use only installed probe in damon_merge_two_regions()
mm/damon/core: Copy only installed probe in damon_split_region_at()
mm/damon/core.c | 56 ++++++++++++++++++-------------
mm/damon/tests/core-kunit.h | 67 +++++++++++++++++++++++++++++++------
2 files changed, 89 insertions(+), 34 deletions(-)
--
2.55.0
next reply other threads:[~2026-10-13 3:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 15:48 Suhaas Joshi [this message]
2026-10-07 15:48 ` [PATCH 1/2] mm/damon/core: Use only installed probe in damon_merge_two_regions() Suhaas Joshi
2026-10-08 10:40 ` Liew Rui Yan
2026-10-08 10:44 ` SJ Park
2026-10-07 15:48 ` [PATCH 2/2] mm/damon/core: Copy only installed probe in damon_split_region_at() Suhaas Joshi
2026-10-08 10:44 ` Liew Rui Yan
2026-10-08 11:03 ` SJ Park
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=20261007154851.45368-1-suhaas@s-joshi.in \
--to=suhaas@s-joshi.in \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®