All of lore.kernel.org
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: SJ Park <sj@kernel.org>
Cc: sashiko-bot@kernel.org, damon@lists.linux.dev
Subject: Re: [PATCH 1/2] mm/damon/core: initialize damos_quota_goal->last_psi_total
Date: Wed, 26 Aug 2026 22:20:53 -0700	[thread overview]
Message-ID: <20260827052054.108913-1-sj@kernel.org> (raw)
In-Reply-To: <20260827045035.94611-1-sj@kernel.org>

On Wed, 26 Aug 2026 21:50:34 -0700 SJ Park <sj@kernel.org> wrote:

> On Thu, 27 Aug 2026 04:45:47 +0000 sashiko-bot@kernel.org wrote:
[...]
> > [Severity: High]
> > This is a pre-existing issue, but does this switch statement omit the
> > DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP metric?
> > 
> > When a user configures a DAMOS quota goal using the
> > DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP metric via sysfs, a new quota goal is
> > allocated in damos_new_quota_goal() via kmalloc_obj(), where the memory is
> > not zeroed. 
> > 
> > Because DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP is missing from the switch statement
> > in damos_commit_quota_goal_union(), its nid field is not copied over during
> > parameter updates. This leaves the node ID uninitialized and potentially
> > causes eligible memory queries to evaluate using garbage data, completely
> > breaking the metric's functionality.
> 
> Good catch.  I will separately work on this.

Actually the fix will be quite straightforward.  I will add that as a part of
the next version of this series.


Thanks,
SJ

[...]

  reply	other threads:[~2026-08-27  5:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  4:29 [PATCH 0/2] mm/damon: fix wrong behaviors in DAMOS PSI goal and sysfs refresh_ms SJ Park
2026-08-27  4:29 ` [PATCH 1/2] mm/damon/core: initialize damos_quota_goal->last_psi_total SJ Park
2026-08-27  4:45   ` sashiko-bot
2026-08-27  4:50     ` SJ Park
2026-08-27  5:20       ` SJ Park [this message]
2026-08-27  4:29 ` [PATCH 2/2] mm/damon/sysfs: set next refresh jiffies per sysfs context SJ Park
2026-08-27  4:35   ` sashiko-bot
2026-08-27  4:42 ` [PATCH 0/2] mm/damon: fix wrong behaviors in DAMOS PSI goal and sysfs refresh_ms 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=20260827052054.108913-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 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.