Mesa-DB cache eviction optimization (new multipart mesa-db feature)
Whenever mesa-db cache hits size limit, a half of cache is evicted. It works fine in general, but some use-cases are suffering from the large cache evictions. In particular a Steam shader pre-caching can easily fill up Mesa shader cache and in this case it's much more preferred to keep more entries in cache rather than remove half of the cache.
To mitigate large cache evictions, we will split mesa-db cache into multiple smaller parts such that only one part will be evicted at a time. In average this MR reduces cache eviction time by x40 and significantly improves cache hit rate after reaching the cache size limit.
Please see the commit messages for more details.
@tarceri @xexaxo @davidriley @ryanneph @chadversary @endlesspring @justonli @zzyiwei