Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] mm/damon: move zero damos quota target_value handling to the core layer
@ 2026-08-13  5:44 SJ Park
  2026-08-13  5:44 ` [RFC PATCH 1/3] mm/damon/core: error damos_commit_quota_goal() for zero target_value SJ Park
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: SJ Park @ 2026-08-13  5:44 UTC (permalink / raw)
  Cc: SJ Park, Andrew Morton, damon, linux-kernel, linux-mm

Having zero DAMOS quota target value can cause division by zero.  DAMON
API callers are checking the target value parameters to avoid that.  It
is easy to make mistakes in some of the multiple API callers.  Move that
to the core layer.

Patch 1 adds the corner case handling into the core layer DAMON
parameters validation logic.  Patches 2 and 3 remove no more needed
DAMON API callers side handling of the corner case in DAMON_LRU_SORT and
DMON_SAMPLIE_MTIER, respectively.

SJ Park (3):
  mm/damon/core: error damos_commit_quota_goal() for zero target_value
  Revert "mm/damon/lru_sort: error out for >10000 active_mem_bp"
  Revert "samples/damon/mtier: error out for zero quota goal target
    values"

 mm/damon/core.c       | 22 ++++++++++++++++------
 mm/damon/lru_sort.c   |  2 --
 samples/damon/mtier.c |  3 ---
 3 files changed, 16 insertions(+), 11 deletions(-)


base-commit: bb9dee2c45b87e872d6b1d5f812ebafaa952b7c5
-- 
2.47.3


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

end of thread, other threads:[~2026-08-13  5:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13  5:44 [RFC PATCH 0/3] mm/damon: move zero damos quota target_value handling to the core layer SJ Park
2026-08-13  5:44 ` [RFC PATCH 1/3] mm/damon/core: error damos_commit_quota_goal() for zero target_value SJ Park
2026-08-13  5:44 ` [RFC PATCH 2/3] Revert "mm/damon/lru_sort: error out for >10000 active_mem_bp" SJ Park
2026-08-13  5:44 ` [RFC PATCH 3/3] Revert "samples/damon/mtier: error out for zero quota goal target values" SJ Park

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