|
|
Log in / Subscribe / Register

ARC, anyone?

ARC, anyone?

Posted Mar 6, 2026 20:29 UTC (Fri) by PeeWee (subscriber, #175777)
In reply to: ARC, anyone? by hnaz
Parent article: Reconsidering the multi-generational LRU

> And there is also refault distance tracking, though it seems to be limited to file pages There actually is shadow tracking for swap-backed pages. On classic LRU, swapbacked memory starts out on inactive list, just like file. It provides the same workingset protection against bulk accesses with low locality (e.g. a scan through a large, cold, mostly swapped out anon segment).
Thanks for pointing that out. Thinking about it some more, given this info, it makes perfect sense, because they are just file-backed pages as well, right? I've also had a glance at workset.c, which is exemplary well documented by comments, in the meantime, and it does contain MGLRU code, as well. Not that I read the actual code, or would be able to understand it, but I think it's just the same as in the classic active/inactive lists, the only difference being that there is no "inactive" list, only gen 0, the oldest generation LRU list, on which file-backed pages are placed.
You can observe the shadow list hits through /proc/vmstat::workingset_*.
TIL where to find the stats. Thanks! And it looks like it's just the same with MGLRU:
workingset_nodes 4530
workingset_refault_anon 4
workingset_refault_file 13627
workingset_activate_anon 4
workingset_activate_file 9981
workingset_restore_anon 4
workingset_restore_file 4655
workingset_nodereclaim 5396
There hasn't been much memory churn yet since last boot. But I do have two 16K mTHPs, as it seems (pool_total_size=32768), already in zswap, while still at 8.8 GiB committed, with ~7 GiB page cache. That's with vm.swappiness=180 and 14.5 GiB RAM total.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds