|
|
Subscribe / Log in / New account

Multi-generational approach is better optimised for CPU.

Multi-generational approach is better optimised for CPU.

Posted Apr 4, 2021 10:00 UTC (Sun) by xoddam (subscriber, #2322)
In reply to: The multi-generational LRU by ibukanov
Parent article: The multi-generational LRU

The multi-generational version uses *less* CPU time, ie. "demonstrates 51% less CPU usage from kswapd" under one workload. This is possible because the existing code has suboptimal algorithms which scan the global page array and must do costly reverse lookups for each page into the per-process page tables, touching tables that are not necessarily in cache for any other reason.

The new code improves on this by doing new-generation scans on active processes directly, improving cache locality on the "fast path", avoiding the reverse lookups altogether, making better decisions on what pages get evicted and when, and seems even to reduce the amount of work that must be done when an eviction is necessary.


to post comments


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