diff options
author | Marek Olšák <marek.olsak@amd.com> | 2021-02-02 22:37:28 -0500 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-02-06 05:41:22 +0000 |
commit | ff311df6b54e2cab3c6afa3d00adc0a534b0eb5c (patch) | |
tree | bebcc5e9bbd8c1780a03fbaff314b6268994657d /src/gallium/winsys/amdgpu/drm/amdgpu_bo.h | |
parent | 06b9dedfd91f45244af758e342f3beac22afece8 (diff) |
winsys/amdgpu: remove amdgpu_winsys_bo::num_cs_references to remove atomics
This decreases the CPU time percentage of amdgpu_cs_add_buffer by 50%
on Ryzen 3900X.
We don't need to call amdgpu_bo_is_referenced_by_any_cs
in amdgpu_bo_can_reclaim. The reclaim function is only called for buffers
that have 0 references.
The only downside is that amdgpu_bo_is_referenced_by_cs might be slower
in some very rare cases. Overall the driver overhead is better.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849>
Diffstat (limited to 'src/gallium/winsys/amdgpu/drm/amdgpu_bo.h')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_bo.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.h b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.h index c9b1cb6a517..99bedcadf82 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.h @@ -93,9 +93,6 @@ struct amdgpu_winsys_bo { uint64_t va; simple_mtx_t lock; - /* how many command streams is this bo referenced in? */ - int num_cs_references; - /* how many command streams, which are being emitted in a separate * thread, is this bo referenced in? */ volatile int num_active_ioctls; |