iris: Defer closing and freeing VMA until buffers are idle

Graphics / Mesa 3D Graphics Library / Mesa - Kenneth Graunke [whitecape.org] - 2 July 2019 07:23 EDT

There will unfortunately be circumstances where we cannot re-use a
virtual memory address until it's no longer active on the GPU. To facilitate this, we instead move BOs to a "dead" list, and defer closing them and returning their VMA until they are idle. We periodically sweep these away in cleanup_bo_cache, which triggers every time a new object's refcount hits zero.

457a55716ea iris: Defer closing and freeing VMA until buffers are idle.
src/gallium/drivers/iris/iris_bufmgr.c | 61 ++++++++++++++++++++++++++++------
1 file changed, 51 insertions(+), 10 deletions(-)

Upstream: cgit.freedesktop.org


  • Share