[PATCH] intel: Track whether a buffer is idle to avoid trips to the kernel.
Kenneth Graunke
kenneth at whitecape.org
Mon Jan 20 10:57:33 PST 2014
On 01/15/2014 12:38 AM, Eric Anholt wrote:
> 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().
> ---
>
> I've still got a patch outstanding on the list for valgrind-cleaning
> the modesetting paths. Since we're probably rolling a release soon,
> that might be nice to get in.
>
> intel/intel_bufmgr_gem.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
Nice, makes sense...if they submit a batch referencing the buffer, it
might be busy, so we need to check...if not, and it isn't shared, it's
definitely idle, so skip the check. I like it.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the dri-devel
mailing list