linux/mm/damon
SeongJae Park 7eca961dd7 mm/damon/core: use damos_commit_quota_goal() for new goal commit
When damos_commit_quota_goals() is called for adding new DAMOS quota goals
of DAMOS_QUOTA_USER_INPUT metric, current_value fields of the new goals
should be also set as requested.

However, damos_commit_quota_goals() is not updating the field for the
case, since it is setting only metrics and target values using
damos_new_quota_goal(), and metric-optional union fields using
damos_commit_quota_goal_union().  As a result, users could see the first
current_value parameter that committed online with a new quota goal is
ignored.  Users are assumed to commit the current_value for
DAMOS_QUOTA_USER_INPUT quota goals, since it is being used as a feedback. 
Hence the real impact would be subtle.  That said, this is obviously not
intended behavior.

Fix the issue by using damos_commit_quota_goal() which sets all quota goal
parameters, instead of damos_commit_quota_goal_union(), which sets only
the union fields.

Link: https://lkml.kernel.org/r/20251014001846.279282-1-sj@kernel.org
Fixes: 1aef9df0ee ("mm/damon/core: commit damos_quota_goal->nid")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>	[6.16+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-10-21 15:46:18 -07:00
..
tests mm/damon: add damon_ctx->min_sz_region 2025-09-13 16:55:24 -07:00
Kconfig mm/damon/Kconfig: make DAMON_STAT_ENABLED_DEFAULT depend on DAMON_STAT 2025-09-13 16:55:07 -07:00
Makefile mm/damon: introduce DAMON_STAT module 2025-07-09 22:41:55 -07:00
core.c mm/damon/core: use damos_commit_quota_goal() for new goal commit 2025-10-21 15:46:18 -07:00
lru_sort.c mm/damon/lru_sort: use damon_initialized() 2025-09-21 14:22:38 -07:00
modules-common.c mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
modules-common.h mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
ops-common.c mm: remove redundant __GFP_NOWARN 2025-09-13 16:54:58 -07:00
ops-common.h mm/damon/paddr: move filters existence check function to ops-common 2025-09-13 16:54:47 -07:00
paddr.c mm/damon/paddr: support addr_unit for DAMOS_STAT 2025-09-13 16:55:23 -07:00
reclaim.c mm/damon/reclaim: use damon_initialized() 2025-09-21 14:22:38 -07:00
stat.c mm/damon/stat: expose negative idle time 2025-09-21 14:22:39 -07:00
sysfs-common.c mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
sysfs-common.h mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
sysfs-schemes.c mm/damon/sysfs-schemes: put damos dests dir after removing its files 2025-08-19 16:35:57 -07:00
sysfs.c mm/damon/sysfs: dealloc commit test ctx always 2025-10-15 13:24:33 -07:00
vaddr.c mm/damon/vaddr: do not repeat pte_offset_map_lock() until success 2025-10-07 14:01:12 -07:00