mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
gallium/radeon/winsyses: reduce the number of pb_cache buckets
Small buffers are now handled via the slabs code, so separate buckets in pb_cache have become redundant. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
fb827c055c
commit
4421c0fb0d
3 changed files with 5 additions and 9 deletions
|
|
@ -50,7 +50,7 @@ struct pb_cache
|
|||
/* The cache is divided into buckets for minimizing cache misses.
|
||||
* The driver controls which buffer goes into which bucket.
|
||||
*/
|
||||
struct list_head buckets[8];
|
||||
struct list_head buckets[4];
|
||||
|
||||
pipe_mutex mutex;
|
||||
uint64_t cache_size;
|
||||
|
|
|
|||
|
|
@ -741,12 +741,10 @@ no_slab:
|
|||
|
||||
/* Determine the pb_cache bucket for minimizing pb_cache misses. */
|
||||
pb_cache_bucket = 0;
|
||||
if (size <= 4096) /* small buffers */
|
||||
pb_cache_bucket += 1;
|
||||
if (domain & RADEON_DOMAIN_VRAM) /* VRAM or VRAM+GTT */
|
||||
pb_cache_bucket += 2;
|
||||
pb_cache_bucket += 1;
|
||||
if (flags == RADEON_FLAG_GTT_WC) /* WC */
|
||||
pb_cache_bucket += 4;
|
||||
pb_cache_bucket += 2;
|
||||
assert(pb_cache_bucket < ARRAY_SIZE(ws->bo_cache.buckets));
|
||||
|
||||
/* Get a buffer from the cache. */
|
||||
|
|
|
|||
|
|
@ -1014,12 +1014,10 @@ no_slab:
|
|||
|
||||
/* Determine the pb_cache bucket for minimizing pb_cache misses. */
|
||||
pb_cache_bucket = 0;
|
||||
if (size <= 4096) /* small buffers */
|
||||
pb_cache_bucket += 1;
|
||||
if (domain & RADEON_DOMAIN_VRAM) /* VRAM or VRAM+GTT */
|
||||
pb_cache_bucket += 2;
|
||||
pb_cache_bucket += 1;
|
||||
if (flags == RADEON_FLAG_GTT_WC) /* WC */
|
||||
pb_cache_bucket += 4;
|
||||
pb_cache_bucket += 2;
|
||||
assert(pb_cache_bucket < ARRAY_SIZE(ws->bo_cache.buckets));
|
||||
|
||||
bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue