Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi Jonnalagadda <ravis.opensrc@gmail.com>
To: SJ Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [PATCH 2/3] mm/damon/core: apply damos core filter in __damos_valid_target()
Date: Wed,  2 Dec 2026 11:40:22 -0800	[thread overview]
Message-ID: <20261202194022.8775-1-ravis.opensrc@gmail.com> (raw)
In-Reply-To: <20261202151518.618069-3-sj@kernel.org>

On Wed, 2 Dec 2026 07:15:16 -0800, SJ Park <sj@kernel.org> wrote:

[...]

> One consequence of this change is that DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP
> will be aware of the core filters.  It is a sort of behavioral change.
> But it is hard to imagine users who really depend on the old behavior.
> The new behavior is rather more intuitive in my opinion.

[...]

> @@ -3218,7 +3224,7 @@ static phys_addr_t damos_calc_eligible_bytes(struct damon_ctx *c,
>  		damon_for_each_region(r, t) {
>  			phys_addr_t addr, end_addr;
>
> -			if (!__damos_valid_target(r, s, c))
> +			if (!__damos_valid_target(r, s, c, t))
>  				continue;

Hi SJ,

This breaks the single context memory tiering setup [1].  Each scheme
there has an address filter for its source node, but
node_eligible_mem_bp needs the eligible memory of all nodes.  With the
filter applied, the DRAM node is never counted, so the goal of the
promotion scheme reads 0 and is never met.

Could damos_calc_eligible_bytes() skip the address and target filters
and apply only the others, as RFC v4 9/9 [2] did for probe_hits_wsum?

Thanks,
Ravi

[1] https://lore.kernel.org/20260131195408.66514-1-sj@kernel.org
[2] https://lore.kernel.org/20261005-damon-perf-rfc-v3-send-2026-10-03-v4-9-b03452e137f3@gmail.com


  reply	other threads:[~2026-12-02 19:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:15 [PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method SJ Park
2026-12-02 15:15 ` [PATCH 1/3] mm/damon/tests/core-kunit: drop apply_scheme()-internal filter tests SJ Park
2026-12-02 15:15 ` [PATCH 2/3] mm/damon/core: apply damos core filter in __damos_valid_target() SJ Park
2026-12-02 19:40   ` Ravi Jonnalagadda [this message]
2026-12-02 15:15 ` [PATCH 3/3] Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior SJ 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=20261202194022.8775-1-ravis.opensrc@gmail.com \
    --to=ravis.opensrc@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --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