mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 06:00:14 +01:00
disk_cache: reduce default cache size to 5% of filesystem
Modern disks are extremely large and are only going to get bigger.
Usage has shown frequent Mesa upgrades can result in the cache
growing very fast i.e. wasting a lot of disk space unnecessarily.
5% seems like a more reasonable default.
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
Acked-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit ce41237151)
This commit is contained in:
parent
791f0fb429
commit
505e7cd232
1 changed files with 2 additions and 2 deletions
|
|
@ -331,10 +331,10 @@ disk_cache_create(const char *gpu_name, const char *timestamp)
|
|||
}
|
||||
}
|
||||
|
||||
/* Default to 1GB or 10% of filesystem for maximum cache size. */
|
||||
/* Default to 1GB or 5% of filesystem for maximum cache size. */
|
||||
if (max_size == 0) {
|
||||
statvfs(path, &vfs);
|
||||
max_size = MAX2(1024*1024*1024, vfs.f_blocks * vfs.f_bsize / 10);
|
||||
max_size = MAX2(1024*1024*1024, vfs.f_blocks * vfs.f_bsize / 20);
|
||||
}
|
||||
|
||||
cache->max_size = max_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue