From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,stable@vger.kernel.org,sj@kernel.org,
devnexen@gmail.com,evanfengff@gmail.com,akpm@linux-foundation.org
Subject: + mm-damon-core-do-not-overwrite-wmarksactivated-in-damos_commit.patch added to mm-hotfixes-unstable branch
Date: Mon, 23 Nov 2026 09:48:27 -0800 [thread overview]
Message-ID: <20261123174827.BDB531F000C4@smtp.kernel.org> (raw)
In-Reply-To: <20261123150049.81317-4-sj@kernel.org>
The patch titled
Subject: mm/damon/core: do not overwrite wmarks.activated in damos_commit()
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-damon-core-do-not-overwrite-wmarksactivated-in-damos_commit.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-core-do-not-overwrite-wmarksactivated-in-damos_commit.patch
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Yifan Feng <evanfengff@gmail.com>
Subject: mm/damon/core: do not overwrite wmarks.activated in damos_commit()
Date: Mon, 23 Nov 2026 07:00:48 -0800
damos_commit() copies the whole wmarks struct from the source scheme,
including the private 'activated' field. The source scheme is a new
one, so the field is always true there.
As a result, a commit turns on a scheme that the watermarks turned off.
If the metric is between mid and high at that time, the scheme keeps
running, though it should stay off until the metric goes below mid.
DAMON_RECLAIM and DAMON_LRU_SORT use the same path for commit_inputs.
Save 'activated' before the copy and restore it after. Do not restore
it for DAMOS_WMARK_NONE, because nothing sets it again in that case and
the scheme would stay off.
Link: https://patch.msgid.link/20261123150049.81317-4-sj@kernel.org
Fixes: 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
Signed-off-by: Yifan Feng <evanfengff@gmail.com>
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: SJ Park <sj@kernel.org>
Cc: David Carlier <devnexen@gmail.com>
Cc: <stable@vger.kernel.org> # 6.11.x
mm/damon/core.c | 3 +++
1 file changed, 3 insertions(+)
--- a/mm/damon/core.c~mm-damon-core-do-not-overwrite-wmarksactivated-in-damos_commit
+++ a/mm/damon/core.c
@@ -1567,6 +1567,7 @@ static struct damos *damon_nth_scheme(in
static int damos_commit(struct damos *dst, struct damos *src)
{
+ bool activated = dst->wmarks.activated;
int err;
dst->pattern = src->pattern;
@@ -1578,6 +1579,8 @@ static int damos_commit(struct damos *ds
return err;
dst->wmarks = src->wmarks;
+ if (dst->wmarks.metric != DAMOS_WMARK_NONE)
+ dst->wmarks.activated = activated;
dst->target_nid = src->target_nid;
err = damos_commit_dests(&dst->migrate_dests, &src->migrate_dests);
_
Patches currently in -mm which might be from evanfengff@gmail.com are
mm-damon-core-fix-damos_walk-hang-with-zero-watermarks-interval.patch
mm-damon-core-do-not-overwrite-wmarksactivated-in-damos_commit.patch
prev parent reply other threads:[~2026-11-23 17:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 15:00 [PATCH mm-hotfixes-unstable 0/3] mm/damon: three fixes for idle_time overflow and damos_walk() hang SJ Park
2026-11-23 15:00 ` [PATCH mm-hotfixes-unstable 1/3] mm/damon/stat: avoid 32-bit overflow in idle time milliseconds SJ Park
2026-11-23 17:48 ` + mm-damon-stat-avoid-32-bit-overflow-in-idle-time-milliseconds.patch added to mm-hotfixes-unstable branch Andrew Morton
2026-11-23 15:00 ` [PATCH mm-hotfixes-unstable 2/3] mm/damon/core: fix damos_walk() hang with zero watermarks interval SJ Park
2026-11-23 17:48 ` + mm-damon-core-fix-damos_walk-hang-with-zero-watermarks-interval.patch added to mm-hotfixes-unstable branch Andrew Morton
2026-11-23 15:00 ` [PATCH mm-hotfixes-unstable 3/3] mm/damon/core: do not overwrite wmarks.activated in damos_commit() SJ Park
2026-11-23 17:48 ` Andrew Morton [this message]
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=20261123174827.BDB531F000C4@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=devnexen@gmail.com \
--cc=evanfengff@gmail.com \
--cc=mm-commits@vger.kernel.org \
--cc=sj@kernel.org \
--cc=stable@vger.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