From: SJ Park <sj@kernel.org>
Cc: SJ Park <sj@kernel.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [RFC PATCH 3/3] Revert "samples/damon/mtier: error out for zero quota goal target values"
Date: Wed, 12 Aug 2026 22:44:30 -0700 [thread overview]
Message-ID: <20260813054432.101197-4-sj@kernel.org> (raw)
In-Reply-To: <20260813054432.101197-1-sj@kernel.org>
This reverts commit a16fd3ad9d89b05475864da97327870464611736.
The commit was made to avoid zero damos quota goal target value, because
it can trigger division-by-zero. Now the core layer handles the corner
case. It returns an error for any attempt setting the aero
target_value. The corner case handling in DAMON_SAMPLE_MTIER is hence
no more needed. Remove it.
Signed-off-by: SJ Park <sj@kernel.org>
---
samples/damon/mtier.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index bea45c87cc9be..27dc88bdf7a0e 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -161,9 +161,6 @@ static struct damon_ctx *damon_sample_mtier_build_ctx(bool promote)
if (!scheme)
goto free_out;
damon_set_schemes(ctx, &scheme, 1);
- /* zero target value causes division by zero in damos_quota_store() */
- if (!node0_mem_used_bp || !node0_mem_free_bp)
- goto free_out;
quota_goal = damos_new_quota_goal(
promote ? DAMOS_QUOTA_NODE_MEM_USED_BP :
DAMOS_QUOTA_NODE_MEM_FREE_BP,
--
2.47.3
prev parent reply other threads:[~2026-08-13 5:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` SJ Park [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260813054432.101197-4-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox