From: SJ Park <sj@kernel.org>
To: KunWu Chan <kunwu.chan@gmail.com>
Cc: SJ Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, lianux.mm@gmail.com
Subject: Re: [RFC PATCH 4/9] mm/damon/core: use damos_quota_is_set() in damos_adjust_quota()
Date: Mon, 14 Sep 2026 19:26:33 -0700 [thread overview]
Message-ID: <20260915022635.103818-1-sj@kernel.org> (raw)
In-Reply-To: <CAN_Opa8qSHcDNU8k=EWMywUADizJEhHPpuia3jMcZ13i5iYXgg@mail.gmail.com>
On Tue, 15 Sep 2026 10:19:43 +0800 KunWu Chan <kunwu.chan@gmail.com> wrote:
> On Mon, Sep 14, 2026 at 11:16 PM SJ Park <sj@kernel.org> wrote:
> >
> > On Mon, 14 Sep 2026 23:01:48 +0800 Kunwu Chan <kunwu.chan@gmail.com> wrote:
> >
> > > On Sat, 12 Sep 2026 13:08:05 -0700 SJ Park <sj@kernel.org> wrote:
[...]
> > So, if user sets only time quota, and then commits the quota to zero while the
> > esz is non-zero, esz is never reset to zero. As a result, DAMOS keeps applying
> > the action with the esz forever. Correct?
>
> Yes, the stale esz path is confirmed.
>
> One clarification, though: it does not keep applying the action
> forever. While charged_sz < stale_esz, damos_adjust_quota() still
> returns early, but damos_apply_target() continues to apply the
> scheme and damos_charge_quota() keeps increasing charged_sz.
>
> Once charged_sz >= stale_esz, damos_quota_is_full() returns true,
> so damon_do_apply_schemes() skips the scheme. Since the early return
> also prevents the charge-window handling from running,
> charged_sz is never reset, and the scheme remains permanently
> inactive.
>
> So clearing the quota can result in the scheme applying up to the
> stale esz, and then stopping permanently.
Thank you for detailed clarification, Kunwu!
>
> >
> > If so, this may deserve Cc-ing stable@. Kunwu, what do you think?
>
> I think this is a functional bug in the existing code, and Cc'ing
> stable makes sense.
Agreed. I will post this as a hotfix soon.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-09-15 2:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 20:08 [RFC PATCH 0/9] mm/damon: cleanup, clarify, and add/improve test SJ Park
2026-09-12 20:08 ` [RFC PATCH 1/9] mm/damon/api: remove NR_DAMOS_FILTER_TYPES SJ Park
2026-09-12 20:08 ` [RFC PATCH 2/9] mm/damon/core: use abs_diff() in damon_feed_loop_next_input() SJ Park
2026-09-12 20:08 ` [RFC PATCH 3/9] mm/damon/core: use mult_frac() " SJ Park
2026-09-12 20:08 ` [RFC PATCH 4/9] mm/damon/core: use damos_quota_is_set() in damos_adjust_quota() SJ Park
2026-09-14 15:01 ` Kunwu Chan
2026-09-14 15:16 ` SJ Park
2026-09-15 2:19 ` KunWu Chan
2026-09-15 2:26 ` SJ Park [this message]
2026-09-12 20:08 ` [RFC PATCH 5/9] mm/damon/core: document damon_call()/damon_start() race hang issue SJ Park
2026-09-12 20:08 ` [RFC PATCH 6/9] mm/damon/paddr: remove pa parameter from damon_pa_filter_pass() SJ Park
2026-09-12 20:08 ` [RFC PATCH 7/9] selftests/damon/sysfs_memcg_path_leak: fail only for real DAMON leak SJ Park
2026-09-12 20:08 ` [RFC PATCH 8/9] mm/damon/tests/core-kunit: test eligible_mem_bp commitment SJ Park
2026-09-12 20:08 ` [RFC PATCH 9/9] Docs/mm/damon/design: clarify bp is basis point SJ Park
2026-09-12 20:26 ` Randy Dunlap
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=20260915022635.103818-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kunwu.chan@gmail.com \
--cc=lianux.mm@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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®