Re: [PATCH v1] mm/damon/stat: roll back context on damon_call() failure

From: 최유호

Date: Fri May 29 2026 - 11:31:43 EST


Dear SJ

On Fri, 29 May 2026 at 10:44, SeongJae Park <sj@xxxxxxxxxx> wrote:

> But, having one damon_ctx object in the memory is a real problem? Why?

I agree that keeping one `damon_ctx` is unlikely to be a serious problem.
My intention was not to address memory pressure but to maintain
failure-path consistency. If initialization fails after the context is
created and started, the internal state remains in place despite the
operation returning an error. The cleanup is then deferred until a
subsequent retry.

For this reason, I think this is worth fixing as a correctness issue.
That said, if you feel the current cleanup is sufficient, I can drop
this patch.

Best regards,
Yuho

> [...]