mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hyeonggon Yoo <hyeonggon.yoo@sk.com>
To: Raghavendra K T <raghavendra.kt@amd.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"lsf-pc@lists.linux-foundation.org"
	<lsf-pc@lists.linux-foundation.org>,
	"bharata@amd.com" <bharata@amd.com>
Cc: kernel_team@skhynix.com, 42.hyeyoo@gmail.com,
	"gourry@gourry.net" <gourry@gourry.net>,
	"nehagholkar@meta.com" <nehagholkar@meta.com>,
	"abhishekd@meta.com" <abhishekd@meta.com>,
	"ying.huang@linux.alibaba.com" <ying.huang@linux.alibaba.com>,
	"nphamcs@gmail.com" <nphamcs@gmail.com>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"feng.tang@intel.com" <feng.tang@intel.com>,
	"kbusch@meta.com" <kbusch@meta.com>,
	"Hasan.Maruf@amd.com" <Hasan.Maruf@amd.com>,
	"sj@kernel.org" <sj@kernel.org>,
	"david@redhat.com" <david@redhat.com>,
	"willy@infradead.org" <willy@infradead.org>,
	"k.shutemov@gmail.com" <k.shutemov@gmail.com>,
	"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"hughd@google.com" <hughd@google.com>,
	"rientjes@google.com" <rientjes@google.com>,
	"shy828301@gmail.com" <shy828301@gmail.com>,
	"liam.howlett@oracle.com" <liam.howlett@oracle.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"nadav.amit@gmail.com" <nadav.amit@gmail.com>,
	"shivankg@amd.com" <shivankg@amd.com>,
	"ziy@nvidia.com" <ziy@nvidia.com>,
	"jhubbard@nvidia.com" <jhubbard@nvidia.com>,
	"AneeshKumar.KizhakeVeetil@arm.com"
	<AneeshKumar.KizhakeVeetil@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jon.grimm@amd.com" <jon.grimm@amd.com>,
	"santosh.shukla@amd.com" <santosh.shukla@amd.com>,
	"Michael.Day@amd.com" <Michael.Day@amd.com>,
	"riel@surriel.com" <riel@surriel.com>,
	"weixugc@google.com" <weixugc@google.com>,
	"leesuyeon0506@gmail.com" <leesuyeon0506@gmail.com>,
	honggyu.kim@sk.com, "leillc@google.com" <leillc@google.com>,
	"kmanaouil.dev@gmail.com" <kmanaouil.dev@gmail.com>,
	"rppt@kernel.org" <rppt@kernel.org>,
	"dave.hansen@intel.com" <dave.hansen@intel.com>,
	yuanchu@google.com
Subject: Re: [LSF/MM/BPF TOPIC] Overhauling hot page detection and promotion based on PTE A bit scanning
Date: Fri, 24 Jan 2025 14:53:08 +0900	[thread overview]
Message-ID: <0a9914f8-bec7-4e58-ab12-a87fe3876187@sk.com> (raw)
In-Reply-To: <20250123105721.424117-1-raghavendra.kt@amd.com>



On 1/23/2025 7:57 PM, Raghavendra K T wrote:
> Bharata and I would like to propose the following topic for LSFMM.
> 
> Topic: Overhauling hot page detection and promotion based on PTE A bit scanning.
>   
> In the Linux kernel, hot page information can potentially be obtained from
> multiple sources:
>   
> a. PROT_NONE faults (NUMA balancing)
> b. PTE Access bit (LRU scanning)
> c. Hardware provided page hotness info (like AMD IBS)
>   
> This information is further used to migrate (or promote) pages from slow memory
> tier to top tier to increase performance.
> 
> In the current hot page promotion mechanism, all the activities including the
> process address space scanning, NUMA hint fault handling and page migration are
> performed in the process context. i.e., scanning overhead is borne by the
> applications.
>  
> I had recently posted a patch [1] to improve this in the context of slow-tier
> page promotion. Here, Scanning is done by a global kernel thread which routinely
> scans all the processes' address spaces and checks for accesses by reading the
> PTE A bit. The hot pages thus identified are maintained in list and subsequently> are promoted to a default top-tier node. Thus, the approach pushes overhead of
> scanning, NUMA hint faults and migrations off from process context.
> 
> The topic was presented in the MM alignment session hosted by David Rientjes [2].
> The topic also finds a mention in S J Park's LSFMM proposal [3].
>   
> Here is the list of potential discussion points:
> 1. Other improvements and enhancements to PTE A bit scanning approach. Use of
> multiple kernel threads, throttling improvements, promotion policies, per-process
> opt-in via prctl, virtual vs physical address based scanning, tuning hot page
> detection algorithm etc.

Yuanchu's MGLRU periodic aging series [1] seems quite relevant here,
you might want to look at it. adding Yuanchu to Cc.

By the way, do you have any reason why you'd prefer opt-in prctl
over per-memcg control?

[1] https://lore.kernel.org/all/20221214225123.2770216-1-yuanchu@google.com/
  
> 2. Possibility of maintaining single source of truth for page hotness that would
> maintain hot page information from multiple sources and let other sub-systems
> use that info.
> 
> 3. Discuss how hardware provided hotness info (like AMD IBS) can further aid
> promotion. Bharata had posted an RFC [4] on this a while back.
> 
> 4. Overlap with DAMON and potential reuse.
>   
> Links:
> 
> [1] https://lore.kernel.org/all/20241201153818.2633616-1-raghavendra.kt@amd.com/
> [2] https://lore.kernel.org/linux-mm/20241226012833.rmmbkws4wdhzdht6@ed.ac.uk/T/
> [3] https://lore.kernel.org/lkml/Z4XUoWlU-UgRik18@gourry-fedora-PF4VCD3F/T/
> [4] https://lore.kernel.org/lkml/20230208073533.715-2-bharata@amd.com/
>   
> 


  parent reply	other threads:[~2025-01-24  5:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23 10:57 Raghavendra K T
2025-01-23 18:20 ` SeongJae Park
2025-01-24  8:54   ` Raghavendra K T
2025-01-24 18:05     ` Jonathan Cameron
2025-01-24  5:53 ` Hyeonggon Yoo [this message]
2025-01-24  9:02   ` Raghavendra K T
2025-01-27  7:01     ` David Rientjes
2025-01-27  7:11       ` Raghavendra K T
2025-02-06  3:14   ` Yuanchu Xie
2025-01-26  2:27 ` Huang, Ying
2025-01-27  5:11   ` Bharata B Rao
2025-01-27 18:34     ` SeongJae Park
2025-02-07  8:10       ` Huang, Ying
2025-02-07  9:06         ` Gregory Price
2025-02-07 19:52         ` SeongJae Park
2025-02-07 19:06   ` Davidlohr Bueso
2025-03-14  1:56     ` Raghavendra K T
2025-03-14  2:12       ` Raghavendra K T
2025-01-31 12:28 ` Jonathan Cameron
2025-01-31 13:09   ` [LSF/MM/BPF TOPIC] Unifying sources of page temperature information - what info is actually wanted? Jonathan Cameron
2025-02-05  6:24     ` Bharata B Rao
2025-02-05 16:05       ` Johannes Weiner
2025-02-06  6:46         ` SeongJae Park
2025-02-06 15:30         ` Jonathan Cameron
2025-02-07  9:50       ` Matthew Wilcox
2025-02-16  7:04       ` Huang, Ying
2025-02-16  6:49     ` Huang, Ying
2025-02-17  4:10       ` Bharata B Rao
2025-02-17  8:06         ` Huang, Ying
2025-03-14 14:24       ` Jonathan Cameron
2025-02-03  2:23   ` [LSF/MM/BPF TOPIC] Overhauling hot page detection and promotion based on PTE A bit scanning Raghavendra K T
2025-04-07  3:13 ` Bharata B Rao

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=0a9914f8-bec7-4e58-ab12-a87fe3876187@sk.com \
    --to=hyeonggon.yoo@sk.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=AneeshKumar.KizhakeVeetil@arm.com \
    --cc=Hasan.Maruf@amd.com \
    --cc=Michael.Day@amd.com \
    --cc=abhishekd@meta.com \
    --cc=akpm@linux-foundation.org \
    --cc=bharata@amd.com \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=feng.tang@intel.com \
    --cc=gourry@gourry.net \
    --cc=hannes@cmpxchg.org \
    --cc=honggyu.kim@sk.com \
    --cc=hughd@google.com \
    --cc=jhubbard@nvidia.com \
    --cc=jon.grimm@amd.com \
    --cc=k.shutemov@gmail.com \
    --cc=kbusch@meta.com \
    --cc=kernel_team@skhynix.com \
    --cc=kmanaouil.dev@gmail.com \
    --cc=leesuyeon0506@gmail.com \
    --cc=leillc@google.com \
    --cc=liam.howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=nadav.amit@gmail.com \
    --cc=nehagholkar@meta.com \
    --cc=nphamcs@gmail.com \
    --cc=peterz@infradead.org \
    --cc=raghavendra.kt@amd.com \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=santosh.shukla@amd.com \
    --cc=shivankg@amd.com \
    --cc=shy828301@gmail.com \
    --cc=sj@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@linux.alibaba.com \
    --cc=yuanchu@google.com \
    --cc=ziy@nvidia.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

all inboxes | Powered by JetHome®