Mesa (master): disk_cache: reduce default cache size to 5% of filesystem
Timothy Arceri
tarceri at kemper.freedesktop.org
Thu Apr 27 10:44:10 UTC 2017
Module: Mesa
Branch: master
Commit: ce412371513c90bf9156f22c3567ee57750ef264
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce412371513c90bf9156f22c3567ee57750ef264
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Thu Apr 27 11:15:29 2017 +1000
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 at lists.freedesktop.org>
Acked-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/util/disk_cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index d9de8ef6e4..9fd7b96adc 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -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;
More information about the mesa-commit
mailing list