3 ms·
Aren't there already well-tested LRU cache algorithms out there? It seems like adapting one of those to the general problem of kernel cache management would be
by pdonis 5y ago
Aren't there already well-tested LRU cache algorithms out there? It seems like adapting one of those to the general problem of kernel cache management would be a good way to address the general problem described in the article.
- Groxx 5y agotbh this was my thought too. No need for background processing either, there are quite a few options for amortized-constant-time old-value deletion at lookup time. Or do that cleanup while checking the disk on a cache miss - if you have no misses, the cache is working fantastically and probably shouldn't be pruned. Or is there some reason those aren't acceptable in-kernel, while apparently a lack of cleanup is fine? Maybe CPU use is too high...?
- tedunangst 5y agoAnd how many entries will you keep in the LRU?
- MBCook 5y agoLRU works by by using a specific cache size. How big should that be? Will that number work for small microcontrollers and giant servers? Is that per disc? Per directory? Per system? Per kernel? Should that size expand and contract overtime somehow? The article gets into a little bit of that stuff, but they’re all real problems.
- pdonis 5y agoSure, I get that there are still decisions to be made, but the discussion in the article makes it seem like nobody has even thought of using an LRU cache and then having a discussion about how to tune the cache size.
- zaphirplane 5y agoThere is a million configurable variables already this can be another Not me I’m watching Netflix :)