From: SJ Park <sj@kernel.org>
To: Kyuwon Cho <kyuwon.cho@skku.edu>
Cc: SJ Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Quanmin Yan <yanquanmin1@huawei.com>,
Aveline Noir <jm5905938@gmail.com>,
sashiko-bot@kernel.org, sashiko-reviews@lists.linux.dev,
damon@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [PATCH v3 0/4] mm/damon/paddr: prevent address wrap in action walks
Date: Sat, 5 Dec 2026 08:41:58 -0800 [thread overview]
Message-ID: <20261205164159.91929-1-sj@kernel.org> (raw)
In-Reply-To: <cover.1796405525.git.kyuwon.cho@skku.edu>
On Sat, 5 Dec 2026 10:52:00 +0900 Kyuwon Cho <kyuwon.cho@skku.edu> wrote:
> The four physical-address DAMOS action walks advance a page-aligned cursor
> by PAGE_SIZE or folio_size(). If the physical end of a region is near
> PHYS_ADDR_MAX, either addition can wrap the cursor to zero.
>
> Depending on where the wrap makes the loop restart, and on the folio
> states and sizes in the address range, the walk can repeat multiple times.
> In the worst case, it can be infinite.
>
> As a result, kdamond can affect unexpectedly much memory and consume
> system resources. Users cannot stop it because the busy kdamond does not
> respond to DAMON sysfs input. Regions ending near PHYS_ADDR_MAX are rare
> in practice, but the consequence is severe.
>
> Calculate each converted end once before its loop and saturate every
> PAGE_SIZE or folio-size advance at that end. Keep the fixes split by the
> commits that introduced the walks so they can be backported independently.
>
> ---
> Changes in v3:
> - Restore the impact description, including the indefinite repeat, using
> wording suggested by SJ Park.
> - Hoist each end calculation before its loop and fold the separately
> posted endpoint optimization into the fixes, as suggested by SJ Park.
> - Correct the Fixes tags after SJ Park noted that the pageout tag was too
> new. Aveline Noir identified the commit that introduced the pageout
> walk.
Thank you for doing the revisioning.
>
> The separate endpoint optimization can be dropped:
> https://lore.kernel.org/all/179636379461.1106205.7227742056101745798@skku.edu/
>
> The v3 plan discussion:
> https://lore.kernel.org/all/179640027323.1616253.15840107925779563493@skku.edu/
>
> v2:
> https://lore.kernel.org/all/179636379461.1106205.17118044826561378975@skku.edu/
>
> v1:
> https://lore.kernel.org/all/179614474316.1073623.13833808548597202010@skku.edu/
From the next time, please add changelog for all previous versions, like the
doc [1] suggests.
>
> The issue was found by an LLM-guided test generator that we are
> developing as a research prototype.
Forgot saying this to the first version. Knowing this kind of context is very
helpful for reviewing. Thank you.
>
> The sysfs test case was posted in the v2 discussion:
> https://lore.kernel.org/all/179640027309.1616249.12163670586345074790@skku.edu/
Appreicate sharing of the reproducer, too.
All looks good to me. For the series,
Reviewed-by: SJ Park <sj@kernel.org>
This patch is applied to damon/next [1] tree. I will repost it soon (~1 week)
as an mm.git merge request. So, no action from your side is needed for now.
[1] https://docs.kernel.org/process/submitting-patches.html#commentary
[2] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-12-05 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 1:52 [PATCH v3 0/4] mm/damon/paddr: prevent address wrap in action walks Kyuwon Cho
2026-12-05 1:52 ` [PATCH v3 1/4] mm/damon/paddr: prevent address wrap in pageout walks Kyuwon Cho
2026-12-05 1:52 ` [PATCH v3 2/4] mm/damon/paddr: prevent address wrap in LRU action walks Kyuwon Cho
2026-12-05 1:52 ` [PATCH v3 3/4] mm/damon/paddr: prevent address wrap in migration walks Kyuwon Cho
2026-12-05 16:37 ` SJ Park
2026-12-05 1:52 ` [PATCH v3 4/4] mm/damon/paddr: prevent address wrap in stat walks Kyuwon Cho
2026-12-05 2:08 ` [PATCH v3 0/4] mm/damon/paddr: prevent address wrap in action walks sashiko-bot
2026-12-05 16:41 ` SJ Park [this message]
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=20261205164159.91929-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=jm5905938@gmail.com \
--cc=kyuwon.cho@skku.edu \
--cc=linux-mm@kvack.org \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yanquanmin1@huawei.com \
/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.