On Mon, 2008-12-15 at 15:08 -0800, Keith Packard wrote:
> This limits reuse to 16MB per cache level to try and reduce application
> memory consumption.

Is 16MB based on any measurements at all?

I don't like this patch.  I'd prefer to have us figure out bugs that
make the cache grow overly large, and free old buffers (which we *still*
haven't done), instead of having static limits that'll just hide failure
so that you end up with both poor performance and excessive memory
consumption.

> Signed-off-by: Keith Packard <[email protected]>
> ---
>  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;
>      }
>  }
>  
-- 
Eric Anholt
[email protected]                         [email protected]


Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to