DAMON development mailing list
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: sashiko-bot@kernel.org
Cc: SJ Park <sj@kernel.org>, damon@lists.linux.dev
Subject: Re: [PATCH 6.12.y] mm/damon/core: don't skip damos_adjust_quota() while esz is not zero
Date: Sat,  3 Oct 2026 11:04:21 -0700	[thread overview]
Message-ID: <20261003180422.35043-1-sj@kernel.org> (raw)
In-Reply-To: <20261003175615.6AF5C1F0089E@smtp.kernel.org>

On Sat, 03 Oct 2026 17:56:15 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] mm/damon: commit message claims to use non-existent damos_quota_is_set()
> --
> 
> commit b8bc1e659853d831a5550c37c3c7adcd48423fd1
> Author: SJ Park <sj@kernel.org>
> 
> mm/damon/core: don't skip damos_adjust_quota() while esz is not zero
> 
> This commit fixes an issue where DAMOS stops working unexpectedly when a
> user disables quota using the online parameters commit feature. It addresses
> this by updating damos_adjust_quota() to not skip its work while the
> effective size quota is non-zero.
> 
> Link: https://lore.kernel.org/20260916135020.86483-1-sj@kernel.org
> 
> >     Other logic for catching that uses damos_quota_is_set(), which understands
> >     the fact and therefore checks the effective size quota in addition to the
> >     user setup.  Fix the issue by using damos_quota_is_set() in
> >     damos_adjust_quota() to determine if its works should be skipped.
> 
> [ ... ]
> 
> > diff --git a/mm/damon/core.c b/mm/damon/core.c
> > index 32737cc5f877b..2f6d60b9ca0f4 100644
> > --- a/mm/damon/core.c
> > +++ b/mm/damon/core.c
> > @@ -1677,7 +1677,8 @@ static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
> >  	unsigned long cumulated_sz;
> >  	unsigned int score, max_score = 0;
> >  
> > -	if (!quota->ms && !quota->sz && list_empty(&quota->goals))
> > +	if (!quota->esz && !quota->ms && !quota->sz &&
> > +			list_empty(&quota->goals))
> 
> [Severity: Medium]
> The commit message explicitly states the fix uses a helper function
> damos_quota_is_set(), but the code implements the check inline here in
> damos_adjust_quota() and the helper does not exist in the codebase.
> 
> Should the commit message be updated to match the inline check, or is there
> a missing patch that introduces the damos_quota_is_set() helper function?

This is a backport of the mainline commit.  I want to make the change as
minimum as possible, so no blocker in my opinion.

> 
> >  		return;
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20261003154616.22092-1-sj@kernel.org?part=1


Thanks,
SJ

  reply	other threads:[~2026-10-03 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2026100358-repayment-destitute-a6a6@gregkh>
2026-10-03 15:46 ` [PATCH 6.12.y] mm/damon/core: don't skip damos_adjust_quota() while esz is not zero SJ Park
2026-10-03 17:56   ` sashiko-bot
2026-10-03 18:04     ` SJ Park [this message]
2026-10-04 16:29   ` Sasha Levin

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=20261003180422.35043-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=sashiko-bot@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