diff options
author | Grazvydas Ignotas <[email protected]> | 2017-03-15 20:53:56 +0200 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-16 09:36:18 +1100 |
commit | eb5a61f77a551e98b35bd9f4de3e44ed6c98dd1f (patch) | |
tree | 464d27edba910ba5058a5db33f1adeb054a6f1a8 /src/gallium/auxiliary/postprocess | |
parent | a7ce0490e42b056dc20e13af795ca3e4cb73ed52 (diff) |
util/disk_cache: do eviction before creating .tmp
cache_put() first creates a .tmp file and then tries to do eviction.
The recently added LRU eviction code selects non-empty directory with
the oldest access time, but that may easily be the one with just the
new .tmp file, especially on Linux where atime is updated lazily
(with "relatime" mount option, which is the default). So when cache is
small, if random doesn't hit another dir LRU keeps selecting the same
dir with just the .tmp and not deleting anything. To fix this (and the
tests), do eviction earlier.
Signed-off-by: Grazvydas Ignotas <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/postprocess')
0 files changed, 0 insertions, 0 deletions