Commit 36ac9b71 authored by Zhigang Gong's avatar Zhigang Gong Committed by Eric Anholt

glamor-fbo: Tweek the cache bucket calculation.

And also reduce the expire count to 100 which should be
good enough on x11perf and cairo-trace testing.
Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent a1de528c
......@@ -6,7 +6,7 @@
#include "glamor_priv.h"
#define GLAMOR_CACHE_EXPIRE_MAX 1000
#define GLAMOR_CACHE_EXPIRE_MAX 100
#define GLAMOR_CACHE_DEFAULT 0
#define GLAMOR_CACHE_EXACT_SIZE 1
......@@ -51,7 +51,7 @@ static inline unsigned long __fls(unsigned long x)
inline static int cache_wbucket(int size)
{
int order = __fls(size / 256);
int order = __fls(size / 32);
if (order >= CACHE_BUCKET_WCOUNT)
order = CACHE_BUCKET_WCOUNT - 1;
return order;
......@@ -59,7 +59,7 @@ inline static int cache_wbucket(int size)
inline static int cache_hbucket(int size)
{
int order = __fls(size / 256);
int order = __fls(size / 32);
if (order >= CACHE_BUCKET_HCOUNT)
order = CACHE_BUCKET_HCOUNT - 1;
return order;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment