linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Honggyu Kim <honggyu.kim@sk.com>
Cc: SeongJae Park <sj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	kernel_team@skhynix.com, Jonathan Corbet <corbet@lwn.net>,
	damon@lists.linux.dev, kernel-team@meta.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH 0/2] mm/damon: introduce DAMOS filter type for unmapped pages
Date: Thu, 20 Feb 2025 09:24:10 -0800	[thread overview]
Message-ID: <20250220172411.41010-1-sj@kernel.org> (raw)
In-Reply-To: <93792bf7-9507-474f-a8b0-ccd4d59742dc@sk.com>

Hello Honggyu,

On Thu, 20 Feb 2025 16:45:56 +0900 Honggyu Kim <honggyu.kim@sk.com> wrote:

> Hi SeongJae,
> 
> On 2/20/2025 7:01 AM, SeongJae Park wrote:
> > User decides whether their memory will be mapped or unmapped.  It
> > implies that the two types of memory can have different characteristics
> > and management requirements.  Provide the DAMON-observaibility
> > DAMOS-operation capability for the different types by introducing a new
> > DAMOS filter type for unmapped pages.
> 
> I asked it before at https://github.com/damonitor/damo/issues/13 about
> monitoring unused paddr area but I see this patch series is related to
> applying DAMOS action.

My understanding of "unused" memory that you mentioned is memory that not
allocated for user data.  This memory cannot get accessed by user, so DAMON
treats this memory as always not accessed.

"unmapped" memory I'm saying about here is memory that not mapped to userspace.
For example, unmapped pages in pge cache.  This memory can be accessed, for
eaxmple through page cache using read()/write() like system calls.

So I think this is not really related with the GitHub discussion.  Please let
me know if I'm missing something.

> 
> Regarding that, do you think we can skip those unused memory area using
> this filter before applying DAMOS action?

So, no.

> 
> I'm not sure if the current DAMOS tries pageout/migrate action for those
> unused area because they are detected as cold area although those will
> be imediately skiped inside action scheme.

This is the current behavior.  DAMOS will try to do whatever action to whatever
region if requested, see the action is not applicable to the page, and move on
to the next page.  Please note that filter-based page level skipping is not
that different from the page level action applicability checking.

If you know where "unused" memory located, and you want to make DAMON/S
entirely ignore it, you could use DAMON target address range, or address range
type DAMOS filter.  I'm not sure if this is what you're looking for, though.

My understanding of your concern about "unused" memory on the GitHub discussion
was more about adaptive reions adjustment efficiency.  I recently posted[1] some
ideas to improve the mechanism.  Any feedback about the idea will be welcomed
and help prioritizing it.

[1] https://lore.kernel.org/20250213222303.244724-1-sj@kernel.org


Thanks,
SJ

[...]

      reply	other threads:[~2025-02-20 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 22:01 [PATCH 0/2] mm/damon: introduce DAMOS filter type for unmapped pages SeongJae Park
2025-02-19 22:01 ` [PATCH 2/2] Docs/mm/damon/design: document unmapped DAMOS filter type SeongJae Park
2025-02-20  7:45 ` [PATCH 0/2] mm/damon: introduce DAMOS filter type for unmapped pages Honggyu Kim
2025-02-20 17:24   ` SeongJae 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=20250220172411.41010-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=damon@lists.linux.dev \
    --cc=honggyu.kim@sk.com \
    --cc=kernel-team@meta.com \
    --cc=kernel_team@skhynix.com \
    --cc=linux-doc@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).