From: SJ Park <sj@kernel.org>
To: Kunwu Chan <kunwu.chan@gmail.com>
Cc: SJ Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH REPOST 5/5] mm/damon/vaddr: support pgidle_unset probe filter type
Date: Fri, 11 Sep 2026 06:32:31 -0700 [thread overview]
Message-ID: <20260911133232.91581-1-sj@kernel.org> (raw)
In-Reply-To: <20260911100427.2804601-1-kunwu.chan@gmail.com>
Hi Kunwu,
On Fri, 11 Sep 2026 18:04:26 +0800 Kunwu Chan <kunwu.chan@gmail.com> wrote:
> On Wed, 9 Sep 2026 07:04:07 -0700 SJ Park <sj@kernel.org> wrote:
>
> > DAMON virtual address space operation set (vaddr) does not support
> > pgidle_unset probe filter type. Add the support.
> >
> > Signed-off-by: SJ Park <sj@kernel.org>
> > ---
> > mm/damon/vaddr.c | 55 ++++++++++++++++++++++++++++++++++++++++++------
> > 1 file changed, 48 insertions(+), 7 deletions(-)
> >
> > diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
> > index 45239f05e113b..9a38dc89a156e 100644
> > --- a/mm/damon/vaddr.c
> > +++ b/mm/damon/vaddr.c
> > @@ -522,13 +522,49 @@ static void damon_va_prep_probes(struct damon_ctx *ctx, bool set_samples)
> > }
> > }
> >
> > -static bool damon_va_filter_pass(struct folio *folio, struct damon_probe *p)
> > +static bool damon_va_young_addr(struct folio *folio, pte_t *pte, pmd_t *pmd,
> > + struct mm_struct *mm, unsigned long addr)
> > +{
> > + bool young = false;
> > +
> > + if (pte)
> > + young = pte_young(*pte);
> > + else if (pmd)
> > + young = pmd_young(*pmd);
>
> Hi SJ,
> I see that all callers already check pte_present() / pmd_present()
> before calling this helper, so I don't see a correctness issue here.
>
> However, the other DAMON young/accessed helpers, such as
> damon_pte_young(), damon_hugetlb_young(), and the PMD path in
> damon_folio_young_one(), keep the present check together with the
> young check.
>
> Would it make sense to keep the same check here for consistency?
In my humble opinion, it is already consistent as long as we didn't miss
present check in callers. If you concern a case that we call
damon_va_young_addr() without present check in future, how about adding a
comment noting that on damon_va_young_addr() as a followup work?
Also, thank you for your reviews to this series!
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-09-11 13:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 14:04 [PATCH REPOST 0/5] mm/damon/vaddr: support {prep,apply}_probes SJ Park
2026-09-09 14:04 ` [PATCH REPOST 1/5] mm/damon/vaddr: support prep_probes SJ Park
2026-09-11 1:59 ` Lian Wang
2026-09-09 14:04 ` [PATCH REPOST 2/5] mm/damon/paddr: move probe filter handling to ops-common SJ Park
2026-09-11 2:00 ` Lian Wang
2026-09-09 14:04 ` [PATCH REPOST 3/5] mm/damon/vaddr: support apply_probe SJ Park
2026-09-09 14:04 ` [PATCH REPOST 4/5] mm/damon/vaddr: extend apply_probes() for hugetlb SJ Park
2026-09-11 2:00 ` Lian Wang
2026-09-11 9:53 ` Kunwu Chan
2026-09-09 14:04 ` [PATCH REPOST 5/5] mm/damon/vaddr: support pgidle_unset probe filter type SJ Park
2026-09-11 2:01 ` Lian Wang
2026-09-11 13:33 ` SJ Park
2026-09-11 10:04 ` Kunwu Chan
2026-09-11 13:32 ` SJ Park [this message]
2026-09-11 15:32 ` KunWu Chan
2026-09-09 14:25 ` [PATCH REPOST 0/5] mm/damon/vaddr: support {prep,apply}_probes Gutierrez Asier
2026-09-09 14:31 ` SJ Park
2026-09-09 14:39 ` Gutierrez Asier
2026-09-09 14:43 ` SJ Park
2026-09-09 14:33 ` 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=20260911133232.91581-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kunwu.chan@gmail.com \
--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
all inboxes | Powered by JetHome®