The LRU lock and mmap_sem
The LRU lock and mmap_sem
Posted Apr 30, 2018 19:22 UTC (Mon) by willy (subscriber, #9762)Parent article: The LRU lock and mmap_sem
I have an entirely different approach in mind which I need to get to the top of my investigation list in the next year or so.
list_heads suck. To remove something from a list you touch three cachelines. By using a data structure like the XArray (currently called the XQueue), you can get all the functionality of a list (insert anywhere, delete any element) with reduced memory consumption and reduced cacheline usage. It gets even better when you take advantage of the data structure to do something like "remove batch from head of list" and get an array of between 1 and 64 pointers to process.