amdgpu_bo: make cache_entry a extensible array

Graphics / Mesa 3D Graphics Library / Mesa - Pierre-Eric Pelloux-Prayer [amd.com] - 19 November 2020 12:44 UTC

Improves performance in SPECviewperf13 snx. e.g.: test10 fps evolution: 270 -> 280.

"pahole radeonsi_dri.so -C amdgpu_winsys_bo" after:

struct amdgpu_winsys_bo { struct pb_buffer base; /* 0 32 */ union { struct { amdgpu_va_handle va_handle; /* 32 8 */ uint32_t kms_handle; /* 40 4 */ int map_count; /* 44 4 */ } real; /* 32 16 */ [...] } u; /* 32 40 */ /* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */ [...] struct pb_cache_entry cache_entry[]; /* 144 0 */

/* size: 144, cachelines: 3, members: 17 */ };

2be8cebd0b0 amdgpu_bo: make cache_entry a extensible array
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 18 +++++++++++-------
src/gallium/winsys/amdgpu/drm/amdgpu_bo.h | 8 ++++----
2 files changed, 15 insertions(+), 11 deletions(-)

Upstream: cgit.freedesktop.org


  • Share