OSDN Git Service

intel: Migrate handle/name lookups from linear lists to hashtables
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Sep 2016 13:44:50 +0000 (14:44 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 22 Oct 2016 08:32:54 +0000 (09:32 +0100)
commit9e24d0c54b162b443e3e144740deb0e1d5f8760b
treec073704460fd30a0c9b41c7f12a411c02f500d93
parent455e9b491723b89b19b6efc6590fc9c5558f7858
intel: Migrate handle/name lookups from linear lists to hashtables

Walking a linear list to find a matching PRIME handle or flinked name
does not scale and becomes a major burden with just a few objects.
That said, the fixed size hash is not much better, it just buckets the
look into a few separate chains rather than one long one.

References: https://bugs.freedesktop.org/show_bug.cgi?id=94631
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel/intel_bufmgr_gem.c
intel/uthash.h [new file with mode: 0644]