Locality Optimizations for Multi-Level Caches