All of lore.kernel.org
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: sashiko-bot@kernel.org
Cc: SJ Park <sj@kernel.org>, damon@lists.linux.dev
Subject: Re: [PATCH 6.1.y] mm/damon/paddr: drop last same folio access check reuse optimization
Date: Tue,  8 Sep 2026 23:40:54 -0700	[thread overview]
Message-ID: <20260909064055.102003-1-sj@kernel.org> (raw)
In-Reply-To: <20260909055216.13A781F00A3A@smtp.kernel.org>

On Wed, 09 Sep 2026 05:52:15 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Unused field `page_sz` left in `struct damon_pa_access_chk_result` after dropping the optimization.
> --
> 
> commit 9b0877a60d53720420f674776094bf4134b4f6d7
> Author: SJ Park <sj@kernel.org>
> 
> mm/damon/paddr: drop last same folio access check reuse optimization
> 
> This commit drops the optimization that reuses the last access check result
> if the region is in the same page. This removes the race condition when
> multiple kdamonds are used and favors code simplicity.
> 
> Link: https://lore.kernel.org/20260715031002.108504-5-sj@kernel.org
> Link: https://lore.kernel.org/20260621204050.10993-1-sj@kernel.org [1]
> 
> > diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
> > index 7bc8d79c7fa07..d1d047f494aed 100644
> > --- a/mm/damon/paddr.c
> > +++ b/mm/damon/paddr.c
> 
> [ ... ]
> 
> > @@ -161,29 +161,16 @@ static bool damon_pa_young(unsigned long paddr, unsigned long *page_sz)
> >  	folio_put(folio);
> >  
> >  out:
> > -	*page_sz = result.page_sz;
> 
> [Severity: Low]
> Since the optimization was removed and page_sz is no longer returned, is it
> necessary to keep the page_sz field in struct damon_pa_access_chk_result?
> 
> It looks like result.page_sz is still being assigned in __damon_pa_young()
> and initialized in damon_pa_young(), but the value is never used by any
> caller after this patch. Can the field and its assignments be removed
> entirely to clean up the remaining dead stores?

Apparently the upstream fix is not making such change.  Let's keep it as-is to
reduce unnecessary changes.

> 
> >  	return result.accessed;
> >  }
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20260909054255.253652-1-sj@kernel.org?part=1
> 


Thanks,
SJ

  reply	other threads:[~2026-09-09  6:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2026090853-handoff-bootlace-9e07@gregkh>
2026-09-09  5:42 ` [PATCH 6.1.y] mm/damon/paddr: drop last same folio access check reuse optimization SJ Park
2026-09-09  5:52   ` sashiko-bot
2026-09-09  6:40     ` SJ Park [this message]
2026-09-09 20:26   ` Sasha Levin

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=20260909064055.102003-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=sashiko-bot@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.