DAMON development mailing list
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: "linruifeng (A)" <linruifeng4@huawei.com>,
	akpm@linux-foundation.org, chenjun102@huawei.com,
	tongtiangen@huawei.com, damon@lists.linux.dev,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/damon: support freeze kdamond
Date: Tue, 24 Nov 2026 21:00:28 -0800	[thread overview]
Message-ID: <20261125050029.100568-1-sj@kernel.org> (raw)
In-Reply-To: <20260409140609.59881-1-sj@kernel.org>

Hello linruifeng,


I was thinking how DAMON would work under hibernation, and recalled this
thread.

On Thu,  9 Apr 2026 07:06:08 -0700 SeongJae Park <sj@kernel.org> wrote:

> On Thu, 9 Apr 2026 15:20:10 +0800 "linruifeng (A)" <linruifeng4@huawei.com> wrote:
[...]
> I feel like it is reasonable but I'd love it more if there are more concrete
> examples and/or observations that support this.

I now understand following problem could happen in theory.  If DAMOS is
configured, it could migrate or reclaim pages while hibernation image is being
copied.  It could make the image be corrupted.  As a result, the system could
run with corrupted memory after resuming from the hibernation.

Users could work around by stopping or pausing the kdamond before hibernation
is started.  But it is easy to forget and cumbersome.

So I think your patch is better to be added.

Nonetheless, I think you should replace kthread_should_stop() with
kthread_freezable_should_stop(),  Otherwise, it could have kthread_stop() /
freezer deadlock.  By doing that, try_to_freeze() call wouldn't be necessary.

Would you mind posting this patch again, with the above elaborations and
changes?  If you don't reply in about a couple of days, I will do that on my
own.  In the case, I will add your credit with Suggested-by: tag.


Thanks,
SJ

[...]

      reply	other threads:[~2026-11-25  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  8:06 [PATCH] mm/damon: support freeze kdamond Lin Ruifeng
2026-04-08 14:07 ` SeongJae Park
2026-04-09  7:20   ` linruifeng (A)
2026-04-09 14:06     ` SeongJae Park
2026-11-25  5:00       ` 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=20261125050029.100568-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chenjun102@huawei.com \
    --cc=damon@lists.linux.dev \
    --cc=linruifeng4@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tongtiangen@huawei.com \
    /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