[Mesa-dev] [PATCH 06/37] util: add a disk_cache_remove() function

Timothy Arceri timothy.arceri at collabora.com
Wed Jan 25 00:23:27 UTC 2017


On Tue, 2017-01-24 at 15:54 -0800, Eric Anholt wrote:
> Timothy Arceri <t_arceri at yahoo.com.au> writes:
> 
> > From: Timothy Arceri <timothy.arceri at collabora.com>
> > 
> > This will be used to remove cache items created with old versions
> > of Mesa or other invalid cache items from the cache.
> 
> I'm not convinced that removing the item from cache when we get a hit
> on
> everything in the key except for Mesa version is the right way to
> go.  I
> think we should just be hashing the Mesa version in the key so that
> we
> don't hit on mismatched versions.  Then we wouldn't thrash our cache
> when we're, say, checking out around different versions of Mesa and
> re-pigliting things.

I agree. I mention this problem in the cover letter, it's going to take
some reworking so I was hoping to fix it in a follow-up.

The plan is to create directory structures like so:

Mesa-17.0.0/i965-BDW/
Mesa-17.1.0/i965-BDW/

This will allow us to just delete and entire directory if we are
hitting the cache limit and also easily allows third parties to install
precompiled shaders in those dirs.




More information about the mesa-dev mailing list