* [PATCH 7.1.y] Linux 7.1.4
[not found] <2026072015-wilder-coastland-ba7c@gregkh>
@ 2026-07-21 5:30 ` SJ Park
2026-07-21 5:33 ` SJ Park
2026-07-21 5:32 ` [PATCH 7.1.y] mm/damon/core: trace esz at first setup SJ Park
1 sibling, 1 reply; 3+ messages in thread
From: SJ Park @ 2026-07-21 5:30 UTC (permalink / raw)
To: stable
Cc: damon, Greg Kroah-Hartman, Ronald Warsow, Brett A C Sheffield,
Florian Fainelli, Justin M. Forbes, Peter Schneider,
Salvatore Bonaccorso, Miguel Ojeda, Takeshi Ogasawara,
Ron Economos, Shuah Khan, Pavel Machek (CIP), Barry K. Nathan,
Mark Brown
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20260716133047.772246337@linuxfoundation.org
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Pavel Machek (CIP) <pavel@nabladev.com>
Link: https://lore.kernel.org/r/20260717101912.682013354@linuxfoundation.org
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Pavel Machek (CIP) <pavel@nabladev.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Barry K. Nathan <barryn@pobox.com>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 11b44c8a72235..b3496dd21312c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 7
PATCHLEVEL = 1
-SUBLEVEL = 3
+SUBLEVEL = 4
EXTRAVERSION =
NAME = Baby Opossum Posse
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 7.1.y] mm/damon/core: trace esz at first setup
[not found] <2026072015-wilder-coastland-ba7c@gregkh>
2026-07-21 5:30 ` [PATCH 7.1.y] Linux 7.1.4 SJ Park
@ 2026-07-21 5:32 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-07-21 5:32 UTC (permalink / raw)
To: stable; +Cc: damon, SeongJae Park, Andrew Morton
From: SeongJae Park <sj@kernel.org>
DAMON traces effective size quota from the second update, only if a change
has been made by the update. Tracing only changed updates was an
intentional decision to avoid unnecessary same value tracing. Always
skipping the first value is just an unintended mistake.
The mistake makes the tracepoint based investigation incomplete, because
the first effective size quota is never traced. It is not a big issue
when the 'consist' quota tuner is used, because it keeps changing the
quota in the usual setup.
However, when the 'temporal' tuner is used, the quota value is not changed
before the goal achievement status is completely changed. For example, if
the DAMOS scheme is started with an under-achieved goal, the quota is set
to the maximum value, and kept the same value until the goal is achieved.
Because DAMON skips the first value, the user cannot know what effective
quota the current scheme is using. Only after the goal is achieved, the
effective quota is changed to zero, and traced.
Unconditionally trace the initial quota value to fix this problem.
Note that the 'temporal' quota tuner was introduced by commit af738a6a00c1
("mm/damon/core: introduce DAMOS_QUOTA_GOAL_TUNER_TEMPORAL"), which was
added to 7.1-rc1. But even with the 'consist' quota tuner, the tracing is
unintentionally incomplete. Hence this commit marks the introduction of
the trace event as the broken commit.
Link: https://lore.kernel.org/20260520150311.80925-1-sj@kernel.org
Fixes: a86d695193bf ("mm/damon: add trace event for effective size quota")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> # 6.17.x
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 7e6cc35f5283eab81a14231a64ecd640b690c48c)
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 3dbbbfdeff719..f993d5a92df25 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2453,6 +2453,8 @@ static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
if (!quota->total_charged_sz && !quota->charged_from) {
quota->charged_from = jiffies;
damos_set_effective_quota(quota, c);
+ if (trace_damos_esz_enabled())
+ damos_trace_esz(c, s, quota);
}
/* New charge window starts */
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread