intel: Track whether a buffer is idle to avoid trips to the kernel.
authorEric Anholt <eric@anholt.net>
Wed, 15 Jan 2014 08:38:39 +0000 (00:38 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 20 Jan 2014 18:58:13 +0000 (10:58 -0800)
commit02f93c21e6e1c3dad9d99349989daa84a8c0b5fb
tree58131aeb2eebd1da65624eb96e087aaa99735ab7
parent734de7093db296912da0027e4fa1094f60787c11
intel: Track whether a buffer is idle to avoid trips to the kernel.

I've seen a number of apps spending unreasonable amounts of time in
drm_intel_bo_busy during the buffer mapping process.

We can't track idleness in general, in the case of buffers shared
across processes.  But this should significantly reduce our overhead
for checking for busy on things like VBOs.

Improves (unoptimized) glamor x11perf -f8text by 0.243334% +/-
0.161498% (n=1549), which has formerly been spending about .5% of its
time hitting the kernel for drm_intel_gem_bo_busy().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
intel/intel_bufmgr_gem.c