linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: SeongJae Park <sj@kernel.org>
Cc: damon@lists.linux.dev, kernel-team@meta.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 0/7] mm/damon: define and use DAMON initialization check function
Date: Mon, 15 Sep 2025 21:33:12 -0700	[thread overview]
Message-ID: <20250915213312.12892156442f3a795a0a01f5@linux-foundation.org> (raw)
In-Reply-To: <20250916033511.116366-1-sj@kernel.org>

On Mon, 15 Sep 2025 20:35:04 -0700 SeongJae Park <sj@kernel.org> wrote:

> If DAMON is tried to be used by its API callers when it is not yet
> successfully initialized, the callers could be crashed.  Such issues
> actually happened and were fixed [1].  DAMON API callers are therefore
> having their own hacks for seeing if it is safe to use DAMON or not.
> Those built on an untreliable assumption that DAMON should be ready to
> be used on module init time.  DAMON initialization could fail if
> KMEM_CACHE() fails, though.

Wait.  Is there any realistic expectation that KMEM_CACHE() will fail
when DAMON uses it?  We do have the convention of assuming that
__init-time allocations do not fail.  If they do, an oops or panic is
an acceptable response.

Are these problems actually real-world demonstrable things, or has
someone been playing with fault injection or, ...?

> Also those are basically duplications that
> make their maintenance difficult.

Unclear.  This means that the client hacks are no longer necessary after
these changes?



  parent reply	other threads:[~2025-09-16  4:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16  3:35 SeongJae Park
2025-09-16  3:35 ` [PATCH 1/7] mm/damon/core: implement damon_initialized() function SeongJae Park
2025-09-16  3:35 ` [PATCH 2/7] mm/damon/stat: use damon_initialized() SeongJae Park
2025-09-16  3:35 ` [PATCH 3/7] mm/damon/reclaim: " SeongJae Park
2025-09-16  3:35 ` [PATCH 4/7] mm/damon/lru_sort: " SeongJae Park
2025-09-16  3:35 ` [PATCH 5/7] samples/damon/wsse: " SeongJae Park
2025-09-16  3:35 ` [PATCH 6/7] samples/damon/prcl: " SeongJae Park
2025-09-16  3:35 ` [PATCH 7/7] samples/damon/mtier: " SeongJae Park
2025-09-16  4:33 ` Andrew Morton [this message]
2025-09-16  5:54   ` [PATCH 0/7] mm/damon: define and use DAMON initialization check function SeongJae Park

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=20250915213312.12892156442f3a795a0a01f5@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.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