DAMON development mailing list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Karl Mehltretter" <kmehltretter@gmail.com>
Cc: damon@lists.linux.dev
Subject: Re: [PATCH 1/2] mm/damon/core: preserve the caller's quota in damon_new_scheme()
Date: Mon, 21 Sep 2026 00:38:47 +0000	[thread overview]
Message-ID: <20260921003848.3319B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921003047.12041-2-kmehltretter@gmail.com>

> damon_new_scheme() calls damos_quota_init() on the caller's quota before
> copying it to the new scheme. This clears the caller's effective quota,
> feedback input and charging state as a side effect.
> 
> damon_commit_ctx() first copies the running context into a temporary
> context for validating the proposed parameters. When
> damon_commit_schemes() creates the temporary schemes, it passes the quota
> of each running scheme to damon_new_scheme(). The quota pointer therefore
> refers to the running scheme, and damos_quota_init() clears that scheme's
> state before it is copied to the temporary scheme. Even an update
> rejected with -EINVAL loses the running quota state.
> 
> For a size quota, this discards the bytes already charged and allows the
> scheme to use a fresh quota before the reset interval has elapsed. For a
> goal-driven quota, the consist tuner loses its accumulated input and
> [ ... ]
> Fixes: 70e0c1d1bf94 ("mm/damon/core: factor out 'damos_quota' private fileds initialization")
> Cc: <stable@vger.kernel.org> # 6.19.x
> Link: https://lore.kernel.org/damon/20260702212143.0CB6D1F00A3D@smtp.kernel.org/ [1]
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260921003047.12041-1-kmehltretter@gmail.com?part=1


  reply	other threads:[~2026-09-21  0:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  0:30 [PATCH 0/2] mm/damon: preserve quota state when constructing schemes Karl Mehltretter
2026-09-21  0:30 ` [PATCH 1/2] mm/damon/core: preserve the caller's quota in damon_new_scheme() Karl Mehltretter
2026-09-21  0:38   ` sashiko-bot [this message]
2026-09-21 17:11   ` SJ Park
2026-09-22 12:08     ` SJ Park
2026-09-23 21:46       ` Karl Mehltretter
2026-09-24  7:33         ` SJ Park
2026-09-21  0:30 ` [PATCH 2/2] mm/damon/tests/core-kunit: test preservation of caller quota state Karl Mehltretter
2026-09-21  0:36   ` sashiko-bot
2026-09-22 12:28   ` 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=20260921003848.3319B1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=kmehltretter@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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