[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ff6fe9be-26db-4f7b-8f2e-339b8e456f6b@amd.com>
Date: Sat, 6 Dec 2025 15:52:06 +0530
From: Bharata B Rao <bharata@....com>
To: Alok Rathore <alok.rathore@...sung.com>
CC: <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<Jonathan.Cameron@...wei.com>, <dave.hansen@...el.com>, <gourry@...rry.net>,
<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>, <shivankg@....com>, <alokrathore20@...il.com>,
<cpgs@...sung.com>
Subject: Re: [RFC PATCH v3 3/8] mm: Hot page tracking and promotion
On 26-Nov-25 6:54 PM, Alok Rathore 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 {
>> + unsigned long nid = NUMA_NO_NODE, freq = 0, time = 0, nr = 1;
>> +
>> + 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))
>
> Better to remove freq value, it’s not used later.
Yes, can be removed. I am leaving it here just for a future possibility
of having kmigrated being driven to migrate hottest pages on priority
compared to hot pages at which point frequency value may come in handy.
Regards,
Bharata.
Powered by blists - more mailing lists