All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "SJ Park" <sj@kernel.org>
Cc: 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, 03 Oct 2026 17:56:15 +0000	[thread overview]
Message-ID: <20261003175615.6AF5C1F0089E@smtp.kernel.org> (raw)
In-Reply-To: <20261003154616.22092-1-sj@kernel.org>

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?

>  		return;

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

  reply	other threads:[~2026-10-03 17:56 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 [this message]
2026-10-03 18:04     ` SJ Park
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=20261003175615.6AF5C1F0089E@smtp.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 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.