On Wed, 19 Mar 2025 19:30:24 +0000 Raghavendra K T wrote
One of the key challenges in PTE A bit based scanning is to find rightMy $.02 for selecting promotion target node given a simple multi tier system.
target node to promote to.
Here is a simple heuristic based approach:
While scanning pages of any mm we also scan toptier pages that belong
to that mm. We get an insight on the distribution of pages that potentially
belonging to particular toptier node and also its recent access.
Current logic walks all the toptier node, and picks the one with highest
accesses.
Tk /* top Tierk (k > 0) has K (K > 0) nodes */
...
Tj /* Tierj (j > 0) has J (J > 0) nodes */
...
T0 /* bottom Tier0 has O (O > 0) nodes */
Unless config comes from user space (sysfs window for example should be opened),
1, adopt the data flow pattern of L3 cache <--> DRAM <--> SSD, to only
select Tj+1 when promoting pages in Tj.
2, select the node in Tj+1 that has the most free pages for promotion
by default.
3, nothing more.