linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Prasad, Aravinda" <aravinda.prasad@intel.com>
To: Yu Zhao <yuzhao@google.com>
Cc: "damon@lists.linux.dev" <damon@lists.linux.dev>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"sj@kernel.org" <sj@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"s2322819@ed.ac.uk" <s2322819@ed.ac.uk>,
	"Kumar, Sandeep4" <sandeep4.kumar@intel.com>,
	"Huang, Ying" <ying.huang@intel.com>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Subramoney, Sreenivas" <sreenivas.subramoney@intel.com>,
	"Kervinen, Antti" <antti.kervinen@intel.com>,
	"Kanevskiy, Alexander" <alexander.kanevskiy@intel.com>,
	Alan Nair <alan.nair@intel.com>,
	"Juergen Gross" <jgross@suse.com>,
	Ryan Roberts <ryan.roberts@arm.com>
Subject: RE: mm/DAMON: Profiling enhancements for DAMON
Date: Fri, 15 Dec 2023 10:07:54 +0000	[thread overview]
Message-ID: <MW5PR11MB5907BA0C9546C069925C9955F293A@MW5PR11MB5907.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAOUHufZW8ZbNDnu3Cfc61oJ4FkXK+AbT90XpS5Ei++1_5mcFFQ@mail.gmail.com>



> -----Original Message-----
> From: Yu Zhao <yuzhao@google.com>
> Sent: Friday, December 15, 2023 2:03 PM
> To: Prasad, Aravinda <aravinda.prasad@intel.com>
> Cc: damon@lists.linux.dev; linux-mm@kvack.org; sj@kernel.org; linux-
> kernel@vger.kernel.org; s2322819@ed.ac.uk; Kumar, Sandeep4
> <sandeep4.kumar@intel.com>; Huang, Ying <ying.huang@intel.com>;
> Hansen, Dave <dave.hansen@intel.com>; Williams, Dan J
> <dan.j.williams@intel.com>; Subramoney, Sreenivas
> <sreenivas.subramoney@intel.com>; Kervinen, Antti
> <antti.kervinen@intel.com>; Kanevskiy, Alexander
> <alexander.kanevskiy@intel.com>; Alan Nair <alan.nair@intel.com>; Juergen
> Gross <jgross@suse.com>; Ryan Roberts <ryan.roberts@arm.com>
> Subject: Re: mm/DAMON: Profiling enhancements for DAMON
> 
> On Fri, Dec 15, 2023 at 12:42 AM Aravinda Prasad
> <aravinda.prasad@intel.com> wrote:
> ...
> 
> > This patch proposes profiling different levels of the application’s
> > page table tree to detect whether a region is accessed or not. This
> > patch is based on the observation that, when the accessed bit for a
> > page is set, the accessed bits at the higher levels of the page table
> > tree (PMD/PUD/PGD) corresponding to the path of the page table walk
> > are also set. Hence, it is efficient to  check the accessed bits at
> > the higher levels of the page table tree to detect whether a region is
> > accessed or not.
> 
> This patch can crash on Xen. See commit 4aaf269c768d("mm: introduce
> arch_has_hw_nonleaf_pmd_young()")

Will fix as suggested in the commit.

> 
> MGLRU already does this in the correct way. See mm/vmscan.c.

I don't see access bits at PUD or PGD checked for 4K page size. Can you
point me to the code where access bits are checked at PUD and PGD level? 

> 
> This patch also can cause USER DATA CORRUPTION. See commit
> c11d34fa139e ("mm/damon/ops-common: atomically test and clear young
> on ptes and pmds").

Ok. Will atomically test and set the access bits.

> 
> The quality of your patch makes me very much doubt the quality of your
> paper, especially your results on Google's kstaled and MGLRU in table 6.2.

The results are very much reproducible. We have not used kstaled/MGLRU for
the data in Figure 3, but we linearly scan pages similar to kstaled by implementing
a kernel thread for scanning. 

Our argument for kstaled/MGLRU is that, scanning individual pages at 4K
granularity may not be efficient for large footprint applications. Instead, 
access bits at the higher level of the page table tree can be used. In the 
paper we have demonstrated this with DAMON but the concept can be
applied to kstaled/MGLRU as well.

Regards,
Aravinda

  reply	other threads:[~2023-12-15 10:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15  7:46 Aravinda Prasad
2023-12-15  8:33 ` Yu Zhao
2023-12-15 10:07   ` Prasad, Aravinda [this message]
2023-12-16  5:41     ` Yu Zhao
2023-12-18 11:32       ` Prasad, Aravinda
2023-12-15 18:10 ` Dave Hansen
2023-12-18 11:41   ` Prasad, Aravinda
2023-12-15 20:11 ` SeongJae Park
2023-12-18 13:05   ` Prasad, Aravinda
2024-02-26  6:09 罗午阳
2024-03-04  1:54 罗午阳
2024-03-04  6:23 ` Prasad, Aravinda
2024-03-04  6:26   ` Prasad, Aravinda

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=MW5PR11MB5907BA0C9546C069925C9955F293A@MW5PR11MB5907.namprd11.prod.outlook.com \
    --to=aravinda.prasad@intel.com \
    --cc=alan.nair@intel.com \
    --cc=alexander.kanevskiy@intel.com \
    --cc=antti.kervinen@intel.com \
    --cc=damon@lists.linux.dev \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=s2322819@ed.ac.uk \
    --cc=sandeep4.kumar@intel.com \
    --cc=sj@kernel.org \
    --cc=sreenivas.subramoney@intel.com \
    --cc=ying.huang@intel.com \
    --cc=yuzhao@google.com \
    /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