pan/decode: Use a page table for tracking mmaps
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 15 May 2020 16:57:38 +0000 (12:57 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 16:24:49 +0000 (16:24 +0000)
commitdeb78eec1b7c2fa019c5f8ab8284dab2818b68f7
tree038fd702af8a591bdca606b4c5f055f8e67e1556
parent3c355f1ae8be2a7e1f9141c5433bdbb35fdcd7e6
pan/decode: Use a page table for tracking mmaps

We create a hash table mapping GPU va's to mmap structures, such that
searching for a mapped address is effectively O(1) rather than O(N) to
the number of mapped entries as with the previous linked list approach.
This is a memory-time tradeoff, but the speed-up is tracing is notable.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5099>
src/panfrost/pandecode/common.c
src/panfrost/pandecode/decode.h