From: sashiko-bot@kernel.org
To: "SJ Park" <sj@kernel.org>
Cc: damon@lists.linux.dev
Subject: Re: [RFC PATCH] mm/damon/core: remove unreachable damos charge_{target,addr}_from
Date: Mon, 19 Oct 2026 15:36:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-177767@kernel.org> (raw)
In-Reply-To: <20261019143713.98610-1-sj@kernel.org>
> damos_quota->charge_{target,addr}_from saves the target and region the
> scheme's quota limit is reached. damos_skip_charged_region() skips the
> target and regions before the point. The target that was assigned to
> charge_target_from could be dynamically removed from the context by the
> runtime parameters update (aka commit) feature. In this case,
> damos_skip_charged_region() cannot find if the point is passed or not,
> so the scheme is effectively disabled.
>
> Similarly, the user could also remove all the regions of the target
> using the runtime parameters update feature. It would be uncommon to do
> that, but it is a supported feature. Because the skip pointer detection
> logic (damos_skip_charged_region()) works for each region of targets,
> this result in the logic is entirely skipped and the scheme is
> effectively disabled again.
>
> The user impact is that the DAMOS scheme could suddenly stop working
> under certain uses of the runtime parameters update feature. It could
> surprise users. No crash or leak happens though. Users could also
> simply work around by re-installing the scheme.
>
> Catch the corner cases in damos_adjust_quota() and reset the pointers.
>
> Fixes: da87878010e5 ("mm/damon/sysfs: support online inputs update")
> Cc: <stable@vger.kernel.org> # 5.19.x
> Closes: https://sashiko.dev/#/bug/linux-cd0c55fc-0cc8-45d8-9637-3334811c49b8
> Signed-off-by: SJ Park <sj@kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261019143713.98610-1-sj@kernel.org?part=1
prev parent reply other threads:[~2026-10-19 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 14:37 [RFC PATCH] mm/damon/core: remove unreachable damos charge_{target,addr}_from SJ Park
2026-10-19 15:36 ` sashiko-bot [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=sashiko-outbox-177767@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=damon@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--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