lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYypm59N7SlS3Gme@gourry-fedora-PF4VCD3F>
Date: Wed, 11 Feb 2026 11:08:59 -0500
From: Gregory Price <gourry@...rry.net>
To: Bharata B Rao <bharata@....com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Jonathan.Cameron@...wei.com, dave.hansen@...el.com,
	mgorman@...hsingularity.net, mingo@...hat.com, peterz@...radead.org,
	raghavendra.kt@....com, riel@...riel.com, rientjes@...gle.com,
	sj@...nel.org, weixugc@...gle.com, willy@...radead.org,
	ying.huang@...ux.alibaba.com, ziy@...dia.com, dave@...olabs.net,
	nifan.cxl@...il.com, xuezhengchu@...wei.com, yiannis@...corp.com,
	akpm@...ux-foundation.org, david@...hat.com, byungchul@...com,
	kinseyho@...gle.com, joshua.hahnjy@...il.com, yuanchu@...gle.com,
	balbirs@...dia.com, alok.rathore@...sung.com, shivankg@....com
Subject: Re: [RFC PATCH v5 03/10] mm: Hot page tracking and promotion

On Wed, Feb 11, 2026 at 09:10:23PM +0530, Bharata B Rao wrote:
> On 29-Jan-26 8:10 PM, Bharata B Rao wrote:
> > +
> > +/*
> > + * Walks the PFNs of the zone, isolates and migrates them in batches.
> > + */
> > +static void kmigrated_walk_zone(unsigned long start_pfn, unsigned long end_pfn,
> > +				int src_nid)
> > +{
> > +	int cur_nid = NUMA_NO_NODE;
> > +	LIST_HEAD(migrate_list);
> > +	int batch_count = 0;
> > +	struct folio *folio;
> > +	struct page *page;
> > +	unsigned long pfn;
> > +
> > +	pfn = start_pfn;
> > +	do {
> > +		int nid = NUMA_NO_NODE, nr = 1;
> > +		int freq = 0;
> > +		unsigned long time = 0;
> > +
> > +		if (!pfn_valid(pfn))
> > +			goto out_next;
> > +
> > +		page = pfn_to_online_page(pfn);
> > +		if (!page)
> > +			goto out_next;
> > +
> > +		folio = page_folio(page);
> > +		nr = folio_nr_pages(folio);
> > +		if (folio_nid(folio) != src_nid)
> > +			goto out_next;
> > +
> > +		if (!folio_test_lru(folio))
> > +			goto out_next;
> > +
> > +		if (pghot_get_hotness(pfn, &nid, &freq, &time))
> > +			goto out_next;
> > +
> > +		if (nid == NUMA_NO_NODE)
> > +			nid = pghot_target_nid;
> > +
> > +		if (folio_nid(folio) == nid)
> > +			goto out_next;
> > +
> > +		if (migrate_misplaced_folio_prepare(folio, NULL, nid))
> > +			goto out_next;
> 
> We should hold a folio reference before the above call which will isolate the
> folio from LRU. Otherwise we may hit
> 

Also relevant note from other work I'm doing, we may want a fast-out for
zone-device folios here.  We should not bother tracking those at all.

(this may also become relevant for private-node memory as well, but I
may try to generalize zone_device & private-node checks as the
conditions are very similar).

~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ