The kernel radar: folios, multi-generational LRU, and Rust
The kernel radar: folios, multi-generational LRU, and Rust
Posted Jan 21, 2022 3:07 UTC (Fri) by willy (subscriber, #9762)In reply to: The kernel radar: folios, multi-generational LRU, and Rust by developer122
Parent article: The kernel radar: folios, multi-generational LRU, and Rust
Ok, I'll bite ... How do you efficiently implement an LRU with a B-tree? Every time you access an element (let's say an inode) in the inode cache, you remove it from wherever it currently is in the B-tree and move it to the highest unused index. That's two O(log n) operations, versus a linked list, which is two O(1) operations.
