acrn-kernel/mm/damon
SeongJae Park 4c815c3a48 mm/damon/lru_sort: fix quota status loss due to online tunings
commit 13d0599ab3b2ff17f798353f24bcbef1659d3cfc upstream.

For online parameters change, DAMON_LRU_SORT creates new schemes based on
latest values of the parameters and replaces the old schemes with the new
one.  When creating it, the internal status of the quotas of the old
schemes is not preserved.  As a result, charging of the quota starts from
zero after the online tuning.  The data that collected to estimate the
throughput of the scheme's action is also reset, and therefore the
estimation should start from the scratch again.  Because the throughput
estimation is being used to convert the time quota to the effective size
quota, this could result in temporal time quota inaccuracy.  It would be
recovered over time, though.  In short, the quota accuracy could be
temporarily degraded after online parameters update.

Fix the problem by checking the case and copying the internal fields for
the status.

Link: https://lkml.kernel.org/r/20240216194025.9207-3-sj@kernel.org
Fixes: 40e983cca9 ("mm/damon: introduce DAMON-based LRU-lists Sorting")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>	[6.0+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-01 13:26:32 +01:00
..
Kconfig
Makefile
core-test.h
core.c mm/damon/core: make damon_start() waits until kdamond_fn() starts 2024-01-01 12:39:08 +00:00
dbgfs-test.h
dbgfs.c
lru_sort.c mm/damon/lru_sort: fix quota status loss due to online tunings 2024-03-01 13:26:32 +01:00
modules-common.h
ops-common.c mm/damon/ops-common: avoid divide-by-zero during region hotness calculation 2023-11-28 17:07:09 +00:00
ops-common.h
paddr.c
reclaim.c
sysfs.c mm/damon/sysfs: eliminate potential uninitialized variable warning 2023-12-13 18:39:12 +01:00
vaddr-test.h mm/damon/vaddr-test: fix memory leak in damon_do_test_apply_three_regions() 2023-10-06 14:57:03 +02:00
vaddr.c