mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: "Shubhang Kaushik (Ampere)" <sh@gentwo.org>
Cc: SJ Park <sj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Fernand Sieber <sieberf@amazon.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	SeongJae Park <sjpark@amazon.de>,
	Leonard Foerster <foersleo@amazon.de>,
	Shubhang Kaushik <shubhang@os.amperecomputing.com>,
	"Christoph Lameter (Ampere)" <cl@gentwo.org>,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/damon: align MMU notifier range when clearing PTE young bit
Date: Thu, 22 Oct 2026 07:02:31 -0700	[thread overview]
Message-ID: <20261022140232.93962-1-sj@kernel.org> (raw)
In-Reply-To: <20261021-damon-align-pte-young-notifier-v1-1-d0365ac45b66@gentwo.org>

Hello Shubhang,

On Wed, 21 Oct 2026 23:36:19 -0700 "Shubhang Kaushik (Ampere)" <sh@gentwo.org> wrote:

> DAMON selects a byte-granular sampling address.  damon_ptep_mkold()
> clears the young bit of the PTE covering that address, but passes the
> unaligned range [addr, addr + PAGE_SIZE) to MMU notifiers.
> 
> For an unaligned address, that range extends into the following page.
> KVM ages every guest page intersecting the notifier range, so it can age
> a secondary mapping for the following page although DAMON cleared only
> the sampled page's primary PTE.
> 
> Align the address before both the primary PTE operation and the
> MMU notifier call so that they cover the same page.

Thank you for finding and fixing this!

> 
> Fixes: 3f49584b262c ("mm/damon: implement primitives for the virtual memory address spaces")

I once thought if we need to Cc: stable@.  Because this is only for monitoring
accruacy improvement and DAMON is only beest-effort, I think we don't need to.

> Signed-off-by: Shubhang Kaushik (Ampere) <sh@gentwo.org>

Reviewed-by: SJ Park <sj@kernel.org>

I applied  this patch to damon/next [1] tree.  We are now in the middle of the
merge window.  It may better to focus on making mm.git changes pulled into the
mainline, rather than adding more changes that are not really urgent.  I
understand this series is not really urgent.  Hence, Andrew might not add this
patch until next -rc1 release.  In the case, I will request adding this to
mm.git after next -rc1 release.  So, no action from your side is needed for
now.  Let me know if you think this is really urgent.

[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees


Thanks,
SJ

[...]

  reply	other threads:[~2026-10-22 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22  6:36 Shubhang Kaushik (Ampere)
2026-10-22 14:02 ` SJ Park [this message]
2026-10-22 14:41 ` Aveline Noir

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=20261022140232.93962-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=damon@lists.linux.dev \
    --cc=foersleo@amazon.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sh@gentwo.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shubhang@os.amperecomputing.com \
    --cc=sieberf@amazon.com \
    --cc=sjpark@amazon.de \
    /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

all inboxes | Powered by JetHome®