Mesa (master): util/disk_cache: make use of the total job size limiting feature

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 19 05:29:35 UTC 2019


Module: Mesa
Branch: master
Commit: ddd314f0cecb89004980618ac40171a079f324fe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ddd314f0cecb89004980618ac40171a079f324fe

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Tue Sep  3 14:22:50 2019 +1000

util/disk_cache: make use of the total job size limiting feature

This makes use of the total job size limiting feature added in the
previous patch.

The idea is to avoid an excessive build up in memory use due to the
use of both the UTIL_QUEUE_INIT_RESIZE_IF_FULL and
UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY flags.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/util/disk_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 46124b39c4c..9272e9c5471 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -1037,7 +1037,7 @@ disk_cache_put(struct disk_cache *cache, const cache_key key,
    if (dc_job) {
       util_queue_fence_init(&dc_job->fence);
       util_queue_add_job(&cache->cache_queue, dc_job, &dc_job->fence,
-                         cache_put, destroy_put_job, 0);
+                         cache_put, destroy_put_job, dc_job->size);
    }
 }
 




More information about the mesa-commit mailing list