Current logic used by brute force eviction can lead to a perpetual random eviction pattern.
For instance if the cache build a small pocket of free memory where the total size is greater than incoming allocation request, the allocator will randomly evict block that fits a particular size.
This can happen over and over therefore all the eviction will be random.
In Addition this random eviction will lead a leak in the linked list maintained by the policy since it does not know anymore about what is evicted and what not.
The improvement of this patch is very substantial to TPC-DS benchmark. I have tested it with 10TB scale 9 llap nodes and 32GB cache size per node. The patch has showed very noticeable difference in the Hit rate for raw number Cache_hitrate_improvement.csv