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

Eric Anholt eric at anholt.net
Wed Jan 25 01:38:05 UTC 2017


Timothy Arceri <timothy.arceri at collabora.com> writes:

> 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.

I don't get how Mesa-17.0.0 identifies a specific compile of Mesa, so
that doesn't seem to solve versioning.  Are you going to have the Mesa
build date or something under that?

I'm pretty skeptical of anybody ever actually installing precompiled
shaders and their users successfully getting cache hits off of them, so
architecting for that seems strange to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170124/e6041c7c/attachment.sig>


More information about the mesa-dev mailing list