f58e6fee74
Currently the cache just deletes enough items when the cache is full to make room for the new item being stored. This hasn't been too much of a problem in practice but for things like running piglit where we have thousands of unique shaders and all threads being utilised we end up with a pretty big bottle neck. With this change rather than just brute forcing our way to having enough room for the new item, we instead grab 10% of the least recently used items in the random directory we chose and delete them all. This should only be around 0.04% of total cache items but should hopefully releave some of the pressure on system calls like fstatat(). Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11523>