From: SeongJae Park <sj@kernel.org>
To: Liew Rui Yan <aethernet65535@gmail.com>
Cc: SeongJae Park <sj@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [PATCH] mm/damon: validate addr_unit to be power of 2
Date: Fri, 27 Mar 2026 17:14:04 -0700 [thread overview]
Message-ID: <20260328001405.4253-1-sj@kernel.org> (raw)
In-Reply-To: <20260327145627.10419-1-aethernet65535@gmail.com>
On Fri, 27 Mar 2026 22:56:27 +0800 Liew Rui Yan <aethernet65535@gmail.com> wrote:
> Hi SeongJae,
>
> Thank you for the detailed explaination and for pointing out the
> 'PAGE_SIZE' limitation. You are right; and I should have accounted for
> that.
>
> However, I performend further testing to address your confusion
> regarding kdamond's termination. My patch didn't fix anything.
>
> Here is my reproduction:
>
> # Log (Both with and without this patch):
>
> # cd /sys/module/damon_lru_sort/parameters/
> # echo Y > enabled
> # echo 3 > addr_unit
> # ps aux | rg "[k]damond"
> root 71 0.0 0.0 0 0 ? I 22:26 0:00 [kdamond.0]
> # echo Y > commit_inputs
> bash: echo: write error: Invalid argument
> # cat kdamond_pid
> 71
> # ps aux | rg "[k]damond"
> # ... kdamond terminated
>
> I am very sorry for the noise caused by my misunderstanding of the
> sashiko review.
>
> The real question I am facing now is:
> Should kdamond terminate itself when damon_commit_ctx() fails due to
> invalid user inputs?
It would be better to not terminate. But not a big deal. Users could be wary
of the consequence, as long as it is well documented.
From my perspective, therefore, code maintenance is more important. If we can
make DAMON not terminated by invalid user inputs caused damon_commit_ctx() but
it introduces a significant amount of code complexity, I don't think that's a
good deal.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-03-28 0:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 6:26 [PATCH] mm/damon: validate addr_unit to be power of 2 Liew Rui Yan
2026-03-27 6:45 ` Liew Rui Yan
2026-03-27 12:10 ` Liew Rui Yan
2026-03-27 8:11 ` (sashiko review) " Liew Rui Yan
2026-03-27 8:27 ` Liew Rui Yan
2026-03-27 14:14 ` SeongJae Park
2026-03-27 14:56 ` Liew Rui Yan
2026-03-28 0:14 ` SeongJae Park [this message]
2026-03-28 2:26 ` Liew Rui Yan
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=20260328001405.4253-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=aethernet65535@gmail.com \
--cc=damon@lists.linux.dev \
--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