This limits reuse to 16MB per cache level to try and reduce application memory consumption.
Signed-off-by: Keith Packard <kei...@keithp.com> --- libdrm/intel/intel_bufmgr_gem.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index 4d1f7d1..5ba12a9 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -1291,7 +1291,13 @@ drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr) int i; for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) { - bufmgr_gem->cache_bucket[i].max_entries = -1; + int max; + + if (i > 12) + max = 1; + else + max = 4096 >> i; + bufmgr_gem->cache_bucket[i].max_entries = max; } } -- 1.5.6.5 ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel