linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@linux.alibaba.com>
To: Bharata B Rao <bharata@amd.com>
Cc: <linux-kernel@vger.kernel.org>,  <linux-mm@kvack.org>,
	<Jonathan.Cameron@huawei.com>,  <dave.hansen@intel.com>,
	<gourry@gourry.net>,  <hannes@cmpxchg.org>,
	<mgorman@techsingularity.net>,  <mingo@redhat.com>,
	<peterz@infradead.org>,  <raghavendra.kt@amd.com>,
	 <riel@surriel.com>, <rientjes@google.com>,  <sj@kernel.org>,
	 <weixugc@google.com>, <willy@infradead.org>,  <ziy@nvidia.com>,
	 <dave@stgolabs.net>, <nifan.cxl@gmail.com>,
	 <xuezhengchu@huawei.com>,  <yiannis@zptcorp.com>,
	<akpm@linux-foundation.org>,  <david@redhat.com>,
	 <byungchul@sk.com>, <kinseyho@google.com>,
	 <joshua.hahnjy@gmail.com>,  <yuanchu@google.com>,
	<balbirs@nvidia.com>
Subject: Re: [RFC PATCH v1 3/7] mm: Hot page tracking and promotion
Date: Fri, 15 Aug 2025 09:56:01 +0800	[thread overview]
Message-ID: <871ppde4b2.fsf@DESKTOP-5N7EMDA> (raw)
In-Reply-To: <20250814134826.154003-4-bharata@amd.com> (Bharata B. Rao's message of "Thu, 14 Aug 2025 19:18:22 +0530")

Bharata B Rao <bharata@amd.com> writes:

> This introduces a sub-system for collecting memory access
> information from different sources. It maintains the hotness
> information based on the access history and time of access.
>
> Additionally, it provides per-lowertier-node kernel threads
> (named kpromoted) that periodically promote the pages that
> are eligible for promotion.
>
> Sub-systems that generate hot page access info can report that
> using this API:
>
> int pghot_record_access(u64 pfn, int nid, int src,
> 			unsigned long time)
>
> @pfn: The PFN of the memory accessed
> @nid: The accessing NUMA node ID
> @src: The temperature source (sub-system) that generated the
>       access info
> @time: The access time in jiffies

How will the page hotness information gather with NUMA balancing hint
page fault be expressed with this interface?

> Some temperature sources may not provide the nid from which
> the page was accessed. This is true for sources that use
> page table scanning for PTE Accessed bit. For such sources,
> the default toptier node to which such pages should be promoted
> is hard coded.
>
> Also, the access time provided some sources may at best be
> considered approximate. This is especially true for hot pages
> detected by PTE A bit scanning.
>
> The hot PFN records are stored in hash lists hashed by PFN value.
> The PFN records that are categorized as hot enough to be promoted
> are maintained in a per-lowertier-node max heap from which
> kpromoted extracts and promotes them.
>
> Each record stores the following info:
>
> struct pghot_info {
> 	unsigned long pfn;
>
> 	unsigned long last_update; /* Most recent access time */
> 	int frequency; /* Number of accesses within current window */
> 	int nid; /* Most recent access from this node */
>
> 	struct hlist_node hnode;
> 	size_t heap_idx; /* Position in max heap for quick retreival */
> };
>
> The way in which a page is categorized as hot enough to be
> promoted is pretty primitive now.
>

[snip]

---
Best Regards,
Huang, Ying


  reply	other threads:[~2025-08-15  1:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 13:48 [RFC PATCH v1 0/7] A subsystem for hot page detection " Bharata B Rao
2025-08-14 13:48 ` [RFC PATCH v1 1/7] mm: migrate: Allow misplaced migration without VMA too Bharata B Rao
2025-08-15  1:29   ` Huang, Ying
2025-08-14 13:48 ` [RFC PATCH v1 2/7] migrate: implement migrate_misplaced_folios_batch Bharata B Rao
2025-08-15  1:39   ` Huang, Ying
2025-08-14 13:48 ` [RFC PATCH v1 3/7] mm: Hot page tracking and promotion Bharata B Rao
2025-08-15  1:56   ` Huang, Ying [this message]
2025-08-15 14:16     ` Bharata B Rao
     [not found]   ` <CGME20250821111729epcas5p4b57cdfb4a339e8ac7fc1ea803d6baa34@epcas5p4.samsung.com>
2025-08-21 11:17     ` Alok Rathore
2025-08-21 15:10       ` Bharata B Rao
2025-08-14 13:48 ` [RFC PATCH v1 4/7] x86: ibs: In-kernel IBS driver for memory access profiling Bharata B Rao
2025-08-14 13:48 ` [RFC PATCH v1 5/7] x86: ibs: Enable IBS profiling for memory accesses Bharata B Rao
2025-08-14 13:48 ` [RFC PATCH v1 6/7] mm: mglru: generalize page table walk Bharata B Rao
2025-08-14 13:48 ` [RFC PATCH v1 7/7] mm: klruscand: use mglru scanning for page promotion Bharata B Rao
2025-08-15 11:59 ` [RFC PATCH v1 0/7] A subsystem for hot page detection and promotion Balbir Singh
2025-08-15 15:35   ` 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=871ppde4b2.fsf@DESKTOP-5N7EMDA \
    --to=ying.huang@linux.alibaba.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbirs@nvidia.com \
    --cc=bharata@amd.com \
    --cc=byungchul@sk.com \
    --cc=dave.hansen@intel.com \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=gourry@gourry.net \
    --cc=hannes@cmpxchg.org \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kinseyho@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=nifan.cxl@gmail.com \
    --cc=peterz@infradead.org \
    --cc=raghavendra.kt@amd.com \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=sj@kernel.org \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=xuezhengchu@huawei.com \
    --cc=yiannis@zptcorp.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