From: SJ Park <sj@kernel.org>
To: Aveline Noir <jm5905938@gmail.com>
Cc: SJ Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Shubhang Kaushik <sh@gentwo.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Fernand Sieber <sieberf@amazon.com>,
Leonard Foerster <foersleo@amazon.de>,
SeongJae Park <sjpark@amazon.de>,
Shakeel Butt <shakeel.butt@linux.dev>
Subject: Re: [PATCH] mm/damon: align MMU notifier range when clearing PMD young bit
Date: Thu, 22 Oct 2026 17:20:17 -0700 [thread overview]
Message-ID: <20261023002018.102560-1-sj@kernel.org> (raw)
In-Reply-To: <179267916870.2.5637290691657871645.damon-pmd-align-draft@gmail.com>
Hello Aveline,
'hkml patch check' [1] says you forgot Cc-ing below people who are recommended
by get_maintainer.pl. I Cc-ed them. Please Cc all recipients who
get_maitnainer.pl is recommending, from the next time. 'hkml patch format' [2]
could also help you doing so.
- Fernand Sieber <sieberf@amazon.com>
- Leonard Foerster <foersleo@amazon.de>
- SeongJae Park <sjpark@amazon.de>
- Shakeel Butt <shakeel.butt@linux.dev>
On Thu, 22 Oct 2026 22:26:08 +0800 Aveline Noir <jm5905938@gmail.com> wrote:
> damon_pmdp_mkold() clears the young bit of a PMD but notifies
> [addr, addr + HPAGE_PMD_SIZE), where addr can be an unaligned sampling
> address. This can miss part of the sampled huge page and age secondary
> mappings in the next one.
>
> Align addr to HPAGE_PMD_MASK so both operations cover the same huge page.
Looks good to me. Thank you for fixing.
>
> Fixes: 3f49584b262c ("mm/damon: implement primitives for the virtual memory address spaces")
This is an improvement of monitoring accuracy that DAMON provide only best
effort. So not Cc-ing stable@ makes sense to me.
> Link: https://lore.kernel.org/r/20261021-damon-align-pte-young-notifier-v1-1-d0365ac45b66@gentwo.org/
The is a link to Shubhang's pte_mkold() patch. When you add Link: to your
patch, please add a context on the commit message, from the next time.
I assume you added this link because you mentioned you will send this patch on
the thread, with your nice review of the patch. However, I think this patch
explains its context very well, and therefore this link is not needed.
> Signed-off-by: Aveline Noir <jm5905938@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
I applied this patch to damon/next [3] tree after dropping the Link: tag. We
are now in the middle of the merge window. It may be better to give mm.git
maintainer (Andrew Morton) time to work on pull request, 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. Let
me know if you think this is really urgent or the Link: tag should be kept. If
not, no action from your side is needed for now.
> ---
> Tested both aligned and unaligned addresses on 2 MiB THPs in an x86-64 KVM
> guest with a recording MMU notifier; all ranges matched the sampled PMD.
Thank you for doing the test and sharing the results. Were you also able to
confirm the expected wrong behavior (missing part of the sampled huge page and
age secondary mapping), too?
[1] https://github.com/sjp38/hackermail/blob/master/USAGE.md#checking-patches
[2] https://github.com/sjp38/hackermail/blob/master/USAGE.md#formatting-patches
[3] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-10-23 0:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 14:26 Aveline Noir
2026-10-23 0:20 ` 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=20261023002018.102560-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=foersleo@amazon.de \
--cc=jm5905938@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sh@gentwo.org \
--cc=shakeel.butt@linux.dev \
--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®