linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kaixu Xia <xiakaixu1987@gmail.com>
To: SeongJae Park <sj@kernel.org>
Cc: akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH 2/2] mm/damon/vaddr: remove comparison between mm and last_mm when checking region accesses
Date: Sat, 27 Aug 2022 05:06:12 +0800	[thread overview]
Message-ID: <CAGjdHunJ4bRbzm6gGKaZONTa1sY8macitByxattRSbwJZR5J2g@mail.gmail.com> (raw)
In-Reply-To: <20220826171629.50210-1-sj@kernel.org>

On Sat, Aug 27, 2022 at 1:16 AM SeongJae Park <sj@kernel.org> wrote:
>
> Hi Kaixu,
>
> On Fri, 26 Aug 2022 16:31:18 +0800 xiakaixu1987@gmail.com wrote:
>
> > From: Kaixu Xia <kaixuxia@tencent.com>
> >
> > The damon regions that belong to the same damon target have the same
> > 'struct mm_struct *mm', so it's unnecessary to compare the mm and last_mm
> > objects among the damon regions in one damon target when checking accesses.
>
> There could be multiple targets, and 'damon_va_check_accesses()' calls
> '__damon_va_check_accesses()' for all the targets.  However,
> 'damon_va_check_accesses()' doesn't note if '__damon_va_check_accesses()' is
> called with a target that same to the target it was called with for the last
> time.  Hence the check is necessary.

There could be many regions(1000 max limit) in one target and the mm
is same within
the target, maybe we don't need to maintain the 'last_mm' and do the
check every time
when the target is same.
But yes, the check is necessary when the target changed in
'__damon_va_check_accesses()',
this RFC patch missed this case :)  will fix it.

>
> If I'm missing something, please let me know.
>
>
> Thanks,
> SJ
>
> [...]

      reply	other threads:[~2022-08-26 21:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  8:31 [PATCH 0/2] Simplify the damon regions access check xiakaixu1987
2022-08-26  8:31 ` [PATCH 1/2] mm/damon: simplify the parameter passing for 'check_accesses' xiakaixu1987
2022-08-26 17:08   ` SeongJae Park
2022-08-26 20:32     ` Kaixu Xia
2022-08-26  8:31 ` [PATCH 2/2] mm/damon/vaddr: remove comparison between mm and last_mm when checking region accesses xiakaixu1987
2022-08-26 17:16   ` SeongJae Park
2022-08-26 21:06     ` Kaixu Xia [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=CAGjdHunJ4bRbzm6gGKaZONTa1sY8macitByxattRSbwJZR5J2g@mail.gmail.com \
    --to=xiakaixu1987@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=kaixuxia@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).