mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mm/damon/core: fix the size charged for a filter-trimmed region
@ 2026-09-21 15:24 SJ Park
  2026-09-21 15:24 ` [PATCH v2 1/2] mm/damon/core: charge only the part of a region the filter left SJ Park
  2026-09-21 15:24 ` [PATCH v2 2/2] mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region SJ Park
  0 siblings, 2 replies; 3+ messages in thread
From: SJ Park @ 2026-09-21 15:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: SJ Park, stable, Brendan Higgins, David Gow, damon, kunit-dev,
	linux-kernel, linux-kselftest, linux-mm

From: Donggeun Yoo <donggeunyoo.kernel@gmail.com>

An address range DAMOS filter that partially overlaps a monitoring region
splits it, so the scheme action reaches only one side of the boundary.
damos_apply_scheme() reads the region size before that split and never
re-reads it, so the quota charge and schemes/<S>/stats/sz_tried account for
the whole original region.

Patch 1 re-reads the size after the core filters have run.  Patch 2 adds
KUnit coverage for what the function charges and reports, for the trimmed
cases and for the cases that must not change.

Changes from v1
- v1: https://lore.kernel.org/20260917003553.2465523-1-donggeunyoo.kernel@gmail.com
- Add user impact clarification to patch 1.
- Collec R-b: from SJ.
- Rebase to the latest mm-new.

Donggeun Yoo (2):
  mm/damon/core: charge only the part of a region the filter left
  mm/damon/tests/core-kunit: test the size charged for a filter-trimmed
    region

 mm/damon/core.c             |   1 +
 mm/damon/tests/core-kunit.h | 316 ++++++++++++++++++++++++++++++++++++
 2 files changed, 317 insertions(+)


base-commit: 99528f68cc4066167e5e7135c1172be1e6315102
-- 
2.47.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-21 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 15:24 [PATCH v2 0/2] mm/damon/core: fix the size charged for a filter-trimmed region SJ Park
2026-09-21 15:24 ` [PATCH v2 1/2] mm/damon/core: charge only the part of a region the filter left SJ Park
2026-09-21 15:24 ` [PATCH v2 2/2] mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region SJ Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®